From b6788cccb0ff4fa5fca6bce3cf9a7b6e3f002ddf Mon Sep 17 00:00:00 2001 From: Justin Maggard Date: Fri, 18 Sep 2009 07:53:36 +0000 Subject: [PATCH] * Automatically adapt our friendly_name to meet Xbox360 requirements if we detect an Xbox360 client. --- upnphttp.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/upnphttp.c b/upnphttp.c index 560cf97..f9ca851 100644 --- a/upnphttp.c +++ b/upnphttp.c @@ -720,7 +720,17 @@ ProcessHttpQuery_upnphttp(struct upnphttp * h) } if(strcmp(ROOTDESC_PATH, HttpUrl) == 0) { - sendXMLdesc(h, genRootDesc); + /* If it's a Xbox360, we might need a special friendly_name to be recognized */ + if( (h->req_client == EXbox) && !strchr(friendly_name, ':') ) + { + strncat(friendly_name, ": 1", FRIENDLYNAME_MAX_LEN-4); + sendXMLdesc(h, genRootDesc); + friendly_name[strlen(friendly_name)-3] = '\0'; + } + else + { + sendXMLdesc(h, genRootDesc); + } } else if(strcmp(CONTENTDIRECTORY_PATH, HttpUrl) == 0) {