projects
/
citadel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a80ff14
)
* protect access to client_sock here too.
author
Wilfried Göesgens
<willi@citadel.org>
Fri, 19 Feb 2010 18:36:55 +0000
(18:36 +0000)
committer
Wilfried Göesgens
<willi@citadel.org>
Fri, 19 Feb 2010 18:36:55 +0000
(18:36 +0000)
citadel/sysdep.c
patch
|
blob
|
history
diff --git
a/citadel/sysdep.c
b/citadel/sysdep.c
index c39d85ba6092ad975302b98d149e6253df48cc7b..416fc7b897a1c70b840e5af4333c35f13b5edcf4 100644
(file)
--- a/
citadel/sysdep.c
+++ b/
citadel/sysdep.c
@@
-1080,8
+1080,11
@@
do_select: force_purge = 0;
*/
begin_critical_section(S_SESSION_TABLE);
for (ptr = ContextList; ptr != NULL; ptr = ptr->next) {
- if ( (FD_ISSET(ptr->client_socket, &readfds))
- && (ptr->state == CON_IDLE) ) {
+ int checkfd = ptr->client_socket;
+ if ((checkfd != -1) &&
+ (FD_ISSET(checkfd, &readfds)) &&
+ (ptr->state == CON_IDLE) )
+ {
ptr->input_waiting = 1;
if (!bind_me) {
bind_me = ptr; /* I choose you! */