diff options
author | Aris Adamantiadis <aris@0xbadc0de.be> | 2009-06-18 23:48:55 +0200 |
---|---|---|
committer | Aris Adamantiadis <aris@0xbadc0de.be> | 2009-06-18 23:48:55 +0200 |
commit | 1bea53375b2fb764d9a900a0946d71d7baafb00f (patch) | |
tree | 2b10cc34633155a0287895ac4120c09d146acbf1 /libssh/session.c | |
parent | 3af55a4f49f32ba73af86c6c47f0ed05044eec13 (diff) | |
download | libssh-1bea53375b2fb764d9a900a0946d71d7baafb00f.tar.gz libssh-1bea53375b2fb764d9a900a0946d71d7baafb00f.tar.xz libssh-1bea53375b2fb764d9a900a0946d71d7baafb00f.zip |
added ssh_message_callback support.
Not fully working yet. User can set his ssh_message_callback, and the function ssh_execute_message_callbacks will call them when appropriate. Messages are correctly stacked (in packet_parse) but no call to ssh_execute_callbacks exists yet.
Diffstat (limited to 'libssh/session.c')
-rw-r--r-- | libssh/session.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/libssh/session.c b/libssh/session.c index e8f6336..c83fecd 100644 --- a/libssh/session.c +++ b/libssh/session.c @@ -125,7 +125,14 @@ void ssh_cleanup(SSH_SESSION *session) { privatekey_free(session->dsa_key); privatekey_free(session->rsa_key); - ssh_message_free(session->ssh_message); + if(session->ssh_message_list){ + SSH_MESSAGE *msg; + while((msg=ssh_list_get_head(SSH_MESSAGE *,session->ssh_message_list)) + != NULL){ + ssh_message_free(msg); + } + ssh_list_free(session->ssh_message_list); + } ssh_options_free(session->options); /* burn connection, it could hang sensitive datas */ |