Difference for socket/loop.c from version 1.9 to 1.10


version 1.9 version 1.10
Line 1
 
Line 1
   
 /*  /*
  * static char *rcsid_loop_c =   * static char *rcsid_loop_c =
  *    "$Id: loop.c,v 1.9 2001/03/30 07:52:24 mwedel Exp $";   *    "$Id: loop.c,v 1.10 2001/04/06 00:43:26 michtoen Exp $";
  */   */
   
 /*  /*
Line 36
 
Line 36
 #ifndef __CEXTRACT__  #ifndef __CEXTRACT__
 #include <sproto.h>  #include <sproto.h>
 #include <sockproto.h>  #include <sockproto.h>
   
 #endif  #endif
   
   #ifndef WIN32 // ---win32 exclude unix headers
 #include <sys/types.h>  #include <sys/types.h>
 #include <sys/time.h>  #include <sys/time.h>
 #include <sys/socket.h>  #include <sys/socket.h>
 #include <netinet/in.h>  #include <netinet/in.h>
 #include <netdb.h>  #include <netdb.h>
   #endif // end win32
   
 #ifdef HAVE_UNISTD_H  #ifdef HAVE_UNISTD_H
 #include <unistd.h>  #include <unistd.h>
Line 125
 
Line 127
      * or no more characters to read.       * or no more characters to read.
      */       */
     do {      do {
   #ifdef WIN32 // ***win32: change oldsocket read() to recv()
    stat = recv(ns->fd, ns->inbuf.buf + ns->inbuf.len, 1,0);
   
    if (stat==-1 && WSAGetLastError() !=WSAEWOULDBLOCK) {
   #else
  do {   do {
      stat = read(ns->fd, ns->inbuf.buf + ns->inbuf.len, 1);       stat = read(ns->fd, ns->inbuf.buf + ns->inbuf.len, 1);
  } while ((stat<0) && (errno == EINTR));   } while ((stat<0) && (errno == EINTR));
   
  if (stat<0 && errno != EAGAIN && errno !=EWOULDBLOCK) {   if (stat<0 && errno != EAGAIN && errno !=EWOULDBLOCK) {
   #endif
      perror("Handle_Oldsocket got an error.");       perror("Handle_Oldsocket got an error.");
      ns->status = Ns_Dead;       ns->status = Ns_Dead;
      return;       return;


Legend:
line(s) removed in v.1.9 
line(s) changed
 line(s) added in v.1.10

File made using version 1.98 of cvs2html by leaf at 2011-07-21 19:36