1
0
forked from bip/bip

Fix fatal() on /bip jump.

This commit is contained in:
Arnaud Cornet 2007-12-14 22:06:20 +01:00
parent 7c3fc4bc27
commit cbcd4c18a3
3 changed files with 8 additions and 8 deletions

View File

@ -736,7 +736,7 @@ list_t *wait_event(list_t *cn_list, int *msec, int *nc)
struct timeval btv, etv; struct timeval btv, etv;
*nc = 0; *nc = 0;
cn_newdata = list_new(NULL); cn_newdata = list_new(list_ptr_cmp);
FD_ZERO(&fds_read); FD_ZERO(&fds_read);
FD_ZERO(&fds_write); FD_ZERO(&fds_write);
FD_ZERO(&fds_except); FD_ZERO(&fds_except);
@ -747,7 +747,7 @@ list_t *wait_event(list_t *cn_list, int *msec, int *nc)
mylog(LOG_DEBUGTOOMUCH, "I've seen socket %d !", cn->handle); mylog(LOG_DEBUGTOOMUCH, "I've seen socket %d !", cn->handle);
if (cn->connected == CONN_DISCONN) { if (cn->connected == CONN_DISCONN) {
list_add_first(cn_newdata, cn); list_add_first_uniq(cn_newdata, cn);
continue; continue;
} }
@ -832,7 +832,7 @@ list_t *wait_event(list_t *cn_list, int *msec, int *nc)
if (check_event_except(&fds_except, cn)) { if (check_event_except(&fds_except, cn)) {
mylog(LOG_DEBUGTOOMUCH, "Notify on FD %d (state %d)", mylog(LOG_DEBUGTOOMUCH, "Notify on FD %d (state %d)",
cn->handle, cn->connected); cn->handle, cn->connected);
list_add_first(cn_newdata, cn); list_add_first_uniq(cn_newdata, cn);
continue; continue;
} }
if (check_event_write(&fds_write, cn, nc)) { if (check_event_write(&fds_write, cn, nc)) {
@ -846,7 +846,7 @@ list_t *wait_event(list_t *cn_list, int *msec, int *nc)
toadd = 1; toadd = 1;
} }
if (toadd) if (toadd)
list_add_first(cn_newdata, cn); list_add_first_uniq(cn_newdata, cn);
} }
return cn_newdata; return cn_newdata;
} }