]> granicus.if.org Git - curl/commitdiff
PROT_CLOSEACTION: added SFTP and SCP
authorDaniel Stenberg <daniel@haxx.se>
Sat, 12 Mar 2011 22:08:10 +0000 (23:08 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Sat, 12 Mar 2011 22:08:10 +0000 (23:08 +0100)
Both SFTP and SCP are protocols that need to shut down stuff properly
when the connection is about to get torned down. The primary effect of
not doing this shows up as memory leaks (when using SCP or SFTP with the
multi interface).

This is one of the problems detected by test 582.

lib/urldata.h

index 23ade02feb9fddc151b43bb3aa6c99c17c38ffdc..1d27d26266c9334b2fb9e2ec5ddefd1f9fd32c63 100644 (file)
@@ -771,7 +771,8 @@ struct connectdata {
 #define PROT_SSL     (1<<29) /* protocol requires SSL */
 
 /* these ones need action before socket close */
-#define PROT_CLOSEACTION (PROT_FTP | PROT_IMAP | PROT_POP3)
+#define PROT_CLOSEACTION (PROT_FTP | PROT_IMAP | PROT_POP3 |    \
+                          PROT_SFTP | PROT_SCP)
 #define PROT_DUALCHANNEL PROT_FTP /* these protocols use two connections */
 
   /* 'dns_entry' is the particular host we use. This points to an entry in the