mirror of
https://github.com/transmission/transmission
synced 2025-01-31 03:12:44 +00:00
(gtk,daemon,cli) we don't need to statically link in all of libevnt, just libevent_core.
This commit is contained in:
parent
bfa9efc9f3
commit
3eaac2e16b
4 changed files with 25 additions and 6 deletions
|
@ -9,7 +9,7 @@ transmissioncli_SOURCES = transmissioncli.c
|
|||
|
||||
transmissioncli_LDADD = \
|
||||
$(top_builddir)/libtransmission/libtransmission.a \
|
||||
$(top_builddir)/third-party/libevent/libevent.la \
|
||||
$(top_builddir)/third-party/libevent/libevent_core.la \
|
||||
$(top_builddir)/third-party/libnatpmp/libnatpmp.a \
|
||||
$(top_builddir)/third-party/miniupnp/libminiupnp.a \
|
||||
$(INTLLIBS) \
|
||||
|
|
|
@ -31,7 +31,7 @@ COMMON_LDADD = \
|
|||
$(top_builddir)/libtransmission/libtransmission.a \
|
||||
$(top_builddir)/third-party/miniupnp/libminiupnp.a \
|
||||
$(top_builddir)/third-party/libnatpmp/libnatpmp.a \
|
||||
$(top_builddir)/third-party/libevent/libevent.la \
|
||||
$(top_builddir)/third-party/libevent/libevent_core.la \
|
||||
$(INTLLIBS) \
|
||||
$(OPENSSL_LIBS) \
|
||||
$(LIBCURL_LIBS) \
|
||||
|
|
|
@ -71,7 +71,7 @@ dist_man_MANS = transmission.1
|
|||
|
||||
transmission_LDADD = \
|
||||
$(top_builddir)/libtransmission/libtransmission.a \
|
||||
$(top_builddir)/third-party/libevent/libevent.la \
|
||||
$(top_builddir)/third-party/libevent/libevent_core.la \
|
||||
$(top_builddir)/third-party/miniupnp/libminiupnp.a \
|
||||
$(top_builddir)/third-party/libnatpmp/libnatpmp.a \
|
||||
$(GTK_LIBS) \
|
||||
|
|
25
gtk/util.c
25
gtk/util.c
|
@ -22,6 +22,7 @@
|
|||
* DEALINGS IN THE SOFTWARE.
|
||||
*****************************************************************************/
|
||||
|
||||
#include <ctype.h> /* isxdigit() */
|
||||
#include <stdarg.h>
|
||||
#include <stdlib.h> /* free() */
|
||||
#include <string.h> /* strcmp() */
|
||||
|
@ -223,9 +224,27 @@ freestrlist(GSList *list)
|
|||
char *
|
||||
decode_uri( const char * uri )
|
||||
{
|
||||
char * filename = evhttp_decode_uri( uri );
|
||||
char * ret = g_strdup( filename );
|
||||
free( filename );
|
||||
gboolean in_query = FALSE;
|
||||
char * ret = g_new( char, strlen( uri ) + 1 );
|
||||
char * out = ret;
|
||||
for( ; uri && *uri; ) {
|
||||
char ch = *uri;
|
||||
if( ch=='?' )
|
||||
in_query = TRUE;
|
||||
else if( ch=='+' && in_query )
|
||||
ch = ' ';
|
||||
else if( ch=='%' && isxdigit((unsigned char)uri[1])
|
||||
&& isxdigit((unsigned char)uri[2])) {
|
||||
char buf[3] = { uri[1], uri[2], '\0' };
|
||||
ch = (char) g_ascii_strtoull( buf, NULL, 16 );
|
||||
uri += 2;
|
||||
}
|
||||
|
||||
++uri;
|
||||
*out++ = ch;
|
||||
}
|
||||
|
||||
*out = '\0';
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue