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

Diff of /imapfilter/socket.c

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

revision 1.3 by lefcha, Thu Nov 1 16:38:23 2001 UTC revision 1.4 by lefcha, Tue Nov 6 17:41:27 2001 UTC
# Line 177  int close_connection(void) Line 177  int close_connection(void)
177   */   */
178  int socket_read(char *buf)  int socket_read(char *buf)
179  {  {
180        char b[SOCKET_READ_BUF + 1];
181      int flags, e;      int flags, e;
182      fd_set fds;      fd_set fds;
183      struct timeval tv;      struct timeval tv;
184    
185      memset(buf, 0, RESPONSE_BUF);      memset(b, 0, SOCKET_READ_BUF + 1);
186    
187      tv.tv_sec = 20;      tv.tv_sec = 20;
188      tv.tv_usec = 0;      tv.tv_usec = 0;
# Line 197  int socket_read(char *buf) Line 198  int socket_read(char *buf)
198    
199  #ifdef SSL_TLS  #ifdef SSL_TLS
200          if (ssl)          if (ssl)
201              e = SSL_read(ssl, buf, RESPONSE_BUF - 1);              e = SSL_read(ssl, b, SOCKET_READ_BUF);
202          else          else
203  #endif  #endif
204              e = read(sock, buf, RESPONSE_BUF - 1);              e = read(sock, b, SOCKET_READ_BUF);
205    
206            strncat(buf, b, SOCKET_READ_BUF);
207    
208          fcntl(sock, F_SETFL, flags);          fcntl(sock, F_SETFL, flags);
209    

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4

webmaster@linux.gr
ViewVC Help
Powered by ViewVC 1.1.26