fix calls to krb5_net_{read,write}

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@3910 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Assar Westerlund
1997-11-11 01:37:57 +00:00
parent cdcd52185a
commit c264b952a5
12 changed files with 68 additions and 63 deletions

View File

@@ -47,15 +47,14 @@ krb5_write_message (krb5_context context,
{
u_int32_t len;
u_int8_t buf[4];
int fd = *((int *)p_fd);
len = data->length;
buf[0] = (len >> 24) & 0xFF;
buf[1] = (len >> 16) & 0xFF;
buf[2] = (len >> 8) & 0xFF;
buf[3] = (len >> 0) & 0xFF;
if (krb5_net_write (context, fd, buf, 4) != 4
|| krb5_net_write (context, fd, data->data, len) != len)
if (krb5_net_write (context, p_fd, buf, 4) != 4
|| krb5_net_write (context, p_fd, data->data, len) != len)
return errno;
return 0;
}