From aba116a4452ab1d1674a707a323e62e1dae4c999 Mon Sep 17 00:00:00 2001 From: Justin Maggard Date: Thu, 6 Aug 2009 07:50:12 +0000 Subject: [PATCH] * Avoid using '&' in URIs for resized images, to avoid client compatibility issues. --- upnphttp.c | 4 ++-- upnpsoap.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/upnphttp.c b/upnphttp.c index 40dbbf3..d841bed 100644 --- a/upnphttp.c +++ b/upnphttp.c @@ -1321,7 +1321,7 @@ SendResp_resizedimg(struct upnphttp * h, char * object) path = strdup(object); if( strtok_r(path, "?", &saveptr) ) { - item = strtok_r(NULL, "&", &saveptr); + item = strtok_r(NULL, "&,", &saveptr); } while( item != NULL ) { @@ -1347,7 +1347,7 @@ SendResp_resizedimg(struct upnphttp * h, char * object) { pixelshape = val; } - item = strtok_r(NULL, "&", &saveptr); + item = strtok_r(NULL, "&,", &saveptr); } free(path); diff --git a/upnpsoap.c b/upnpsoap.c index f073fb3..127bc58 100644 --- a/upnpsoap.c +++ b/upnpsoap.c @@ -503,7 +503,7 @@ callback(void *args, int argc, char **argv, char **azColName) char str_buf[512]; char **result; int children, ret = 0; - static int warned = 0; + static short int warned = 0; /* Make sure we have at least 4KB left of allocated memory to finish the response. */ if( passed_args->size > 1044480 && !warned ) @@ -720,7 +720,7 @@ callback(void *args, int argc, char **argv, char **azColName) passed_args->size += ret; ret = sprintf(str_buf, "<res resolution=\"%dx%d\" " "protocolInfo=\"http-get:*:%s:%s\">" - "http://%s:%d/Resized/%s.jpg?width=%d&height=%d" + "http://%s:%d/Resized/%s.jpg?width=%d,height=%d" "</res>", dstw, dsth, mime, "DLNA.ORG_PN=JPEG_SM", lan_addr[0].str, runtime_vars.port,