mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-05 21:00:33 +09:00
packets: allow removal of callbacks
Signed-off-by: Aris Adamantiadis <aris@0xbadc0de.be> Reviewed-by: Jakub Jelen <jjelen@redhat.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
This commit is contained in:
committed by
Andreas Schneider
parent
0197e5e1e5
commit
f4339df577
11
src/packet.c
11
src/packet.c
@@ -1241,6 +1241,17 @@ void ssh_packet_set_callbacks(ssh_session session, ssh_packet_callbacks callback
|
||||
}
|
||||
}
|
||||
|
||||
/** @internal
|
||||
* @brief remove the callbacks from the packet layer
|
||||
*/
|
||||
void ssh_packet_remove_callbacks(ssh_session session, ssh_packet_callbacks callbacks){
|
||||
struct ssh_iterator *it = NULL;
|
||||
it = ssh_list_find(session->packet_callbacks, callbacks);
|
||||
if (it != NULL) {
|
||||
ssh_list_remove(session->packet_callbacks, it);
|
||||
}
|
||||
}
|
||||
|
||||
/** @internal
|
||||
* @brief sets the default packet handlers
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user