summaryrefslogtreecommitdiff
path: root/src/common/socket.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/common/socket.h')
-rw-r--r--src/common/socket.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/common/socket.h b/src/common/socket.h
index 2774b9c7f..02badae3f 100644
--- a/src/common/socket.h
+++ b/src/common/socket.h
@@ -58,7 +58,8 @@ extern time_t stall_time;
#define WFIFOHEAD(fd, x) char *wbPtr = session[fd]->wdata+session[fd]->wdata_size;
#define WFIFOP(fd,pos) (&wbPtr[pos])
#else
-#define WFIFOHEAD(fd, x) ;
+#define WFIFOHEAD(fd, size) { if((fd) && session[fd]->wdata_size + (size) > session[fd]->max_wdata ) realloc_writefifo(fd, size); }
+
#define WFIFOP(fd,pos) (session[fd]->wdata+session[fd]->wdata_size+(pos))
#endif
#define WFIFOB(fd,pos) (*(unsigned char*)WFIFOP(fd,pos))