git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@1434 ec53bebd-3082-4978-b11e-865c3cabbd6b
		
			
				
	
	
		
			24 lines
		
	
	
		
			342 B
		
	
	
	
		
			C
		
	
	
	
	
	
			
		
		
	
	
			24 lines
		
	
	
		
			342 B
		
	
	
	
		
			C
		
	
	
	
	
	
#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;
 | 
						|
}
 |