1
0
mirror of https://git.libssh.org/projects/libssh.git synced 2025-07-28 01:41:48 +03:00

Pcap: more cleanup and minimalist API

This commit is contained in:
Aris Adamantiadis
2009-11-16 23:20:16 +01:00
parent 70b9475449
commit ae11589205
5 changed files with 36 additions and 15 deletions

View File

@ -464,7 +464,6 @@ static int client(ssh_session session){
ssh_pcap_file pcap;
void set_pcap(ssh_session session);
void set_pcap(ssh_session session){
ssh_pcap_context ctx;
if(!pcap_file)
return;
pcap=ssh_pcap_file_new();
@ -474,10 +473,9 @@ void set_pcap(ssh_session session){
pcap=NULL;
return;
}
ctx=ssh_pcap_context_new(session);
ssh_pcap_context_set_file(ctx,pcap);
ssh_set_pcap_context(session,ctx);
ssh_set_pcap_file(session,pcap);
}
void cleanup_pcap(void);
void cleanup_pcap(){
ssh_pcap_file_free(pcap);