/[imapfilter]/imapfilter/socket.c
ViewVC logotype

Diff of /imapfilter/socket.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.21 by lefcha, Thu Oct 10 11:05:41 2002 UTC revision 1.22 by lefcha, Mon Oct 28 23:06:41 2002 UTC
# Line 252  int socket_read(int *sock, char *buf) Line 252  int socket_read(int *sock, char *buf)
252              }              }
253          }          }
254      } else      } else
255  #else  #endif
256      if ((s = select(*sock + 1, &fds, NULL, NULL, tvp)) > 0          if ((s = select(*sock + 1, &fds, NULL, NULL, tvp)) > 0
257          && FD_ISSET(*sock, &fds))              && FD_ISSET(*sock, &fds))
258          e = read(*sock, buf, RESPONSE_BUF - 1);          e = read(*sock, buf, RESPONSE_BUF - 1);
259    
260      if (e == -1)      if (e == -1)
261          fatal(ERROR_NETWORK, "imapfilter: reading data; %s",          fatal(ERROR_NETWORK, "imapfilter: reading data; %s",
262                strerror(errno));                strerror(errno));
 #endif  
   
263    
264      fcntl(*sock, F_SETFL, f);      fcntl(*sock, F_SETFL, f);
265    
# Line 328  int socket_write(int *sock, char *data) Line 326  int socket_write(int *sock, char *data)
326              }              }
327          }          }
328      } else      } else
329  #else  #endif
330      if ((s = select(*sock + 1, NULL, &fds, NULL, tvp)) > 0          if ((s = select(*sock + 1, NULL, &fds, NULL, tvp)) > 0
331          && FD_ISSET(*sock, &fds))              && FD_ISSET(*sock, &fds))
332          e = write(*sock, data, strlen(data));          e = write(*sock, data, strlen(data));
333    
334      if (e == -1)      if (e == -1)
335          fatal(ERROR_NETWORK, "imapfilter: writing data; %s",          fatal(ERROR_NETWORK, "imapfilter: writing data; %s",
336                strerror(errno));                strerror(errno));
 #endif  
337    
338      fcntl(*sock, F_SETFL, f);      fcntl(*sock, F_SETFL, f);
339    

Legend:
Removed from v.1.21  
changed lines
  Added in v.1.22

webmaster@linux.gr
ViewVC Help
Powered by ViewVC 1.1.26