/[svn]/ircd-hybrid/src/packet.c
ViewVC logotype

Diff of /ircd-hybrid/src/packet.c

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

revision 627 by michael, Sat Feb 11 12:26:18 2006 UTC revision 628 by adx, Mon May 29 20:04:32 2006 UTC
# Line 31  Line 31 
31  #include "packet.h"  #include "packet.h"
32  #include "send.h"  #include "send.h"
33    
 #define READBUF_SIZE 16384  
   
34  struct Callback *iorecv_cb = NULL;  struct Callback *iorecv_cb = NULL;
35  struct Callback *iorecvctrl_cb = NULL;  struct Callback *iorecvctrl_cb = NULL;
36    
# Line 421  read_packet(fde_t *fd, void *data) Line 419  read_packet(fde_t *fd, void *data)
419        /* translate openssl error codes, sigh */        /* translate openssl error codes, sigh */
420        if (length < 0)        if (length < 0)
421          switch (SSL_get_error(fd->ssl, length))          switch (SSL_get_error(fd->ssl, length))
422          {          {
423            case SSL_ERROR_WANT_WRITE:            case SSL_ERROR_WANT_WRITE:
424              fd->flags.pending_read = 1;              fd->flags.pending_read = 1;
425              SetSendqBlocked(client_p);              SetSendqBlocked(client_p);
426              comm_setselect(fd, COMM_SELECT_WRITE, (PF *) sendq_unblocked,              comm_setselect(fd, COMM_SELECT_WRITE, (PF *) sendq_unblocked,
427                             client_p, 0);                             client_p, 0);
428              return;              return;
429            case SSL_ERROR_WANT_READ:            case SSL_ERROR_WANT_READ:
430              errno = EWOULDBLOCK;              errno = EWOULDBLOCK;
431            case SSL_ERROR_SYSCALL:            case SSL_ERROR_SYSCALL:
432              break;              break;
433            case SSL_ERROR_SSL:            case SSL_ERROR_SSL:
434              if (errno == EAGAIN)              if (errno == EAGAIN)
435                break;                break;
436            default:            default:
437              length = errno = 0;              length = errno = 0;
438          }          }
439      }      }
440      else      else
441  #endif  #endif

Legend:
Removed from v.627  
changed lines
  Added in v.628

svnadmin@ircd-hybrid.org
ViewVC Help
Powered by ViewVC 1.1.28