new files
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@1434 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
23
lib/krb5/net_write.c
Normal file
23
lib/krb5/net_write.c
Normal file
@@ -0,0 +1,23 @@
|
||||
#include "krb5_locl.h"
|
||||
|
||||
RCSID("$Id$");
|
||||
|
||||
ssize_t
|
||||
krb5_net_write (krb5_context context,
|
||||
int fd,
|
||||
void *buf,
|
||||
size_t len)
|
||||
{
|
||||
char *cbuf = (char *)buf;
|
||||
ssize_t count;
|
||||
size_t rem = len;
|
||||
|
||||
while (rem > 0) {
|
||||
count = write (fd, cbuf, rem);
|
||||
if (count < 0)
|
||||
return count;
|
||||
cbuf += count;
|
||||
rem -= count;
|
||||
}
|
||||
return len;
|
||||
}
|
Reference in New Issue
Block a user