From 15f258bc1a6adbb2034cb4dfd7672e5be23d9fe7 Mon Sep 17 00:00:00 2001 From: Justin Maggard Date: Wed, 25 Nov 2009 00:03:10 +0000 Subject: [PATCH] * Make UPnPSearch case insensitive like it's supposed to be. --- upnpsoap.c | 4 ++-- utils.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/upnpsoap.c b/upnpsoap.c index ca44d2a..261ce32 100644 --- a/upnpsoap.c +++ b/upnpsoap.c @@ -1121,8 +1121,8 @@ SearchContentDirectory(struct upnphttp * h, const char * action) SearchCriteria = modifyString(SearchCriteria, """, "\"", 0); SearchCriteria = modifyString(SearchCriteria, "'", "'", 0); SearchCriteria = modifyString(SearchCriteria, "object.", "", 0); - SearchCriteria = modifyString(SearchCriteria, "derivedfrom", "glob", 1); - SearchCriteria = modifyString(SearchCriteria, "contains", "glob", 2); + SearchCriteria = modifyString(SearchCriteria, "derivedfrom", "like", 1); + SearchCriteria = modifyString(SearchCriteria, "contains", "like", 2); SearchCriteria = modifyString(SearchCriteria, "dc:title", "d.TITLE", 0); SearchCriteria = modifyString(SearchCriteria, "dc:creator", "d.CREATOR", 0); SearchCriteria = modifyString(SearchCriteria, "upnp:class", "o.CLASS", 0); diff --git a/utils.c b/utils.c index c08284c..c4bebd2 100644 --- a/utils.c +++ b/utils.c @@ -120,12 +120,12 @@ modifyString(char * string, const char * before, const char * after, short like) if( like == 2 ) { memmove(t+2, t+1, strlen(t+1)+1); - *++t = '*'; + *++t = '%'; } while( *++t != '"' ) continue; memmove(t+1, t, strlen(t)+1); - *t = '*'; + *t = '%'; } } s = p + newlen;