summaryrefslogtreecommitdiff
path: root/src/sockutil.c
diff options
context:
space:
mode:
authorrob rob@31f1291d-b8d6-0310-a050-a5561fc1590b <rob rob@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864>2006-07-13 09:51:57 +0000
committerrob rob@31f1291d-b8d6-0310-a050-a5561fc1590b <rob rob@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864>2006-07-13 09:51:57 +0000
commit18c0fe03fc7688a739ac7cb69717cabe23df872b (patch)
tree7b5714c448525f27b6ccdb36a4af923f2a2b437b /src/sockutil.c
parent9389fcfc68f7a1560a955d60e7505d7e75d5d81e (diff)
BUILD : 1.7.14 (1086) BUGS : N/A NOTES : Applied gds socket buffering patch, we should play nice with inspircd now.
git-svn-id: svn://svn.anope.org/anope/trunk@1086 31f1291d-b8d6-0310-a050-a5561fc1590b git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@810 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'src/sockutil.c')
-rw-r--r--src/sockutil.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/sockutil.c b/src/sockutil.c
index d5f390fbf..2308dd528 100644
--- a/src/sockutil.c
+++ b/src/sockutil.c
@@ -415,6 +415,8 @@ char *sgets(char *buf, int len, ano_socket_t s)
fd_set fds;
char *ptr = buf;
+ flush_write_buffer(0);
+
if (len == 0)
return NULL;
FD_SET(s, &fds);
@@ -424,6 +426,7 @@ char *sgets(char *buf, int len, ano_socket_t s)
(c = select(s + 1, &fds, NULL, NULL, &tv)) < 0) {
if (ano_sockgeterr() != EINTR)
break;
+ flush_write_buffer(0);
}
if (read_buffer_len() == 0 && c == 0)
return (char *) -1;