1
0
mirror of https://git.libssh.org/projects/libssh.git synced 2025-12-02 01:17:52 +03:00

Removed the global poll ctx in fav. of /session ctx

This commit is contained in:
Aris Adamantiadis
2010-10-12 17:57:15 +02:00
parent 7b1359042c
commit 4f8907a524
5 changed files with 21 additions and 35 deletions

View File

@@ -178,6 +178,9 @@ void ssh_free(ssh_session session) {
crypto_free(session->current_crypto);
crypto_free(session->next_crypto);
ssh_socket_free(session->socket);
if(session->default_poll_ctx){
ssh_poll_ctx_free(session->default_poll_ctx);
}
/* delete all channels */
while (session->channels) {
ssh_channel_free(session->channels);
@@ -365,7 +368,7 @@ int ssh_handle_packets(ssh_session session, int timeout) {
ssh_poll_add_events(spoll_in, POLLIN | POLLERR);
ctx=ssh_poll_get_ctx(spoll_in);
if(ctx==NULL){
ctx=ssh_get_global_poll_ctx(session);
ctx=ssh_poll_get_default_ctx(session);
ssh_poll_ctx_add(ctx,spoll_in);
if(spoll_in != spoll_out)
ssh_poll_ctx_add(ctx,spoll_out);