diff options
Diffstat (limited to 'src/common/socket.c')
-rw-r--r-- | src/common/socket.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/common/socket.c b/src/common/socket.c index 4afcf50d4..703361627 100644 --- a/src/common/socket.c +++ b/src/common/socket.c @@ -121,8 +121,10 @@ static int send_from_fifo(int fd) int len; //printf("send_from_fifo : %d\n",fd); - if(session[fd]->eof) + if(session[fd]->eof || session[fd]->wdata == 0) return -1; + if (session[fd]->wdata_size == 0) + return 0; #ifdef _WIN32 len=send(fd, session[fd]->wdata,session[fd]->wdata_size, 0); @@ -148,6 +150,15 @@ static int send_from_fifo(int fd) return 0; } +void flush_fifos_for_final() +{ + int i; + for(i=0;i<fd_max;i++) + if(session[i] != NULL && + session[i]->func_send == send_from_fifo) + send_from_fifo(i); +} + static int null_parse(int fd) { printf("null_parse : %d\n",fd); |