From: Charles Kerr Date: Fri, 25 Apr 2008 19:46:36 +0000 (+0000) Subject: add tr_webClose() X-Git-Tag: 1.20~91 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=03572a0ad57d11c2a89d144c9f228e28e4554bad;p=transmission add tr_webClose() --- diff --git a/libtransmission/session.c b/libtransmission/session.c index 0131eafaf..0b1554406 100644 --- a/libtransmission/session.c +++ b/libtransmission/session.c @@ -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 ); diff --git a/libtransmission/upnp.c b/libtransmission/upnp.c index ef0475bf1..a5ec145d2 100644 --- a/libtransmission/upnp.c +++ b/libtransmission/upnp.c @@ -14,7 +14,6 @@ #include #include /* snprintf */ -#include #include #include diff --git a/libtransmission/web.c b/libtransmission/web.c index dbc1250ae..efbedfb92 100644 --- a/libtransmission/web.c +++ b/libtransmission/web.c @@ -7,7 +7,7 @@ * This exemption does not extend to derived works not owned by * the Transmission project. * - * $Id:$ + * $Id$ */ #include /* 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 ); +} + /*** **** ***/ diff --git a/libtransmission/web.h b/libtransmission/web.h index 7da79be28..ee58b781c 100644 --- a/libtransmission/web.h +++ b/libtransmission/web.h @@ -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,