projects
/
citadel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d0b06f8
)
* fix endless loop; respect kill_me
author
Wilfried Göesgens
<willi@citadel.org>
Sun, 21 Feb 2010 19:37:28 +0000
(19:37 +0000)
committer
Wilfried Göesgens
<willi@citadel.org>
Sun, 21 Feb 2010 19:37:28 +0000
(19:37 +0000)
citadel/sysdep.c
patch
|
blob
|
history
diff --git
a/citadel/sysdep.c
b/citadel/sysdep.c
index 28104218c251f66db999fe9208ea0a9db3a1998e..459b44ab22ca0fd271648e205191b130e1555912 100644
(file)
--- a/
citadel/sysdep.c
+++ b/
citadel/sysdep.c
@@
-632,7
+632,10
@@
int client_read_to(char *buf, int bytes, int timeout)
int HaveMoreLinesWaiting(CitContext *CCC)
{
- if ((CCC->Pos == NULL) && (StrLength(CCC->ReadBuf) == 0))
+ if ((CCC->kill_me == 1) &&
+ (CCC->Pos == NULL) &&
+ (StrLength(CCC->ReadBuf) == 0) &&
+ (CCC->client_socket != -1))
return 0;
else
return 1;
@@
-732,6
+735,9
@@
int client_getln(char *buf, int bufsize)
const char *pCh;
retval = CtdlClientGetLine(CCC->MigrateBuf);
+ if (retval < 0)
+ return(retval >= 0);
+
i = StrLength(CCC->MigrateBuf);
pCh = ChrPtr(CCC->MigrateBuf);