(init_ivecs): if we don't have an errsock the ivecs should point to

the same data


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@14235 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Johan Danielsson
2004-09-21 11:32:54 +00:00
parent 65d153a293
commit 9179e1d2f7

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 1997 - 1999, 2002 Kungliga Tekniska H<>gskolan
* Copyright (c) 1997-2004 Kungliga Tekniska H<>gskolan
* (Royal Institute of Technology, Stockholm, Sweden).
* All rights reserved.
*
@@ -43,7 +43,7 @@ void *ivec_in[2];
void *ivec_out[2];
void
init_ivecs(int client)
init_ivecs(int client, int have_errsock)
{
size_t blocksize;
@@ -52,14 +52,20 @@ init_ivecs(int client)
ivec_in[0] = malloc(blocksize);
memset(ivec_in[0], client, blocksize);
ivec_in[1] = malloc(blocksize);
memset(ivec_in[1], 2 | client, blocksize);
if(have_errsock) {
ivec_in[1] = malloc(blocksize);
memset(ivec_in[1], 2 | client, blocksize);
} else
ivec_in[1] = ivec_in[0];
ivec_out[0] = malloc(blocksize);
memset(ivec_out[0], !client, blocksize);
ivec_out[1] = malloc(blocksize);
memset(ivec_out[1], 2 | !client, blocksize);
if(have_errsock) {
ivec_out[1] = malloc(blocksize);
memset(ivec_out[1], 2 | !client, blocksize);
} else
ivec_out[1] = ivec_out[0];
}
#endif