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

@ -1843,9 +1843,9 @@ void adm_bip_help(struct link_client *ic, int admin)
"|all_connections"); "|all_connections");
bip_notify(ic, "/BIP ADD_CONN <connection name> <network>"); bip_notify(ic, "/BIP ADD_CONN <connection name> <network>");
bip_notify(ic, "/BIP DEL_CONN <connection name>"); bip_notify(ic, "/BIP DEL_CONN <connection name>");
} else { } else {
bip_notify(ic, "/BIP LIST networks|connections"); bip_notify(ic, "/BIP LIST networks|connections");
} }
bip_notify(ic, "/BIP JUMP # jump to next server (in same network)"); bip_notify(ic, "/BIP JUMP # jump to next server (in same network)");
bip_notify(ic, "/BIP BLRESET # reset backlog (this connection only). Add -q flag and the operation is quiet."); bip_notify(ic, "/BIP BLRESET # reset backlog (this connection only). Add -q flag and the operation is quiet.");
#ifdef HAVE_LIBSSL #ifdef HAVE_LIBSSL

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,9 +832,9 @@ 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)) {
if (cn_is_in_error(cn)) if (cn_is_in_error(cn))
toadd = 1; toadd = 1;
@ -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;
} }