converted listeners to the linked list functions

This commit is contained in:
Daniel Stenberg
2009-08-19 14:33:13 +02:00
parent 08cad8e14c
commit a871f0b214
4 changed files with 17 additions and 26 deletions

View File

@@ -734,11 +734,11 @@ session_free(LIBSSH2_SESSION *session)
}
if (session->state == libssh2_NB_state_sent) {
while (session->listeners) {
rc = libssh2_channel_forward_cancel(session->listeners);
if (rc == PACKET_EAGAIN) {
LIBSSH2_LISTENER *l;
while (l = _libssh2_list_first(&session->listeners)) {
rc = libssh2_channel_forward_cancel(l);
if (rc == PACKET_EAGAIN)
return PACKET_EAGAIN;
}
}
session->state = libssh2_NB_state_sent1;