]> granicus.if.org Git - transmission/commitdiff
add tr_webClose()
authorCharles Kerr <charles@transmissionbt.com>
Fri, 25 Apr 2008 19:46:36 +0000 (19:46 +0000)
committerCharles Kerr <charles@transmissionbt.com>
Fri, 25 Apr 2008 19:46:36 +0000 (19:46 +0000)
libtransmission/session.c
libtransmission/upnp.c
libtransmission/web.c
libtransmission/web.h

index 0131eafaf384c83a3bbfefbe034a67d7ca532850..0b1554406b526355ea63b968b88c9462b7e5a30d 100644 (file)
@@ -390,6 +390,7 @@ tr_closeImpl( void * vh )
     tr_handle * h = vh;
     tr_torrent * t;
 
+    tr_webClose( h->web );
     tr_sharedShuttingDown( h->shared );
     tr_trackerShuttingDown( h );
 
index ef0475bf1a3658c404a93735e1b3c35b8a3d514a..a5ec145d26488f11cb0d0df905345ef83a9f2319 100644 (file)
@@ -14,7 +14,6 @@
 #include <errno.h>
 #include <stdio.h> /* snprintf */
 
-#include <miniupnp/miniwget.h>
 #include <miniupnp/miniupnpc.h>
 #include <miniupnp/upnpcommands.h>
 
index dbc1250ae20793fbb31a95f89f72e97cab55584b..efbedfb92c0f53b2a62f922bd0f29e55b08a6c71 100644 (file)
@@ -7,7 +7,7 @@
  * This exemption does not extend to derived works not owned by
  * the Transmission project.
  *
- * $Id:$
+ * $Id$
  */
 
 #include <stdlib.h> /* bsearch */
@@ -308,6 +308,14 @@ tr_webInit( tr_session * session )
     return web;
 }
 
+void
+tr_webClose( tr_web * web )
+{
+    evtimer_del( &web->timer );
+    curl_multi_cleanup( web->cm );
+    tr_free( web );
+}
+
 /***
 ****
 ***/
index 7da79be285c6b41d32521bf8e960a8f9f58c51aa..ee58b781c5e2b6fd317e864e24dba11392ffd235 100644 (file)
@@ -7,7 +7,7 @@
  * This exemption does not extend to derived works not owned by
  * the Transmission project.
  *
- * $Id:$
+ * $Id$
  */
 
 #ifndef TR_HTTP_H
@@ -18,6 +18,8 @@ typedef struct tr_web tr_web;
 
 tr_web* tr_webInit( tr_handle * session );
 
+void tr_webClose( tr_web * );
+
 typedef void (tr_web_done_func)( tr_handle    * session,
                                   long          response_code,
                                   const void  * response,