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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user