* Add generic DLNA client type detection and caching, and don't use DLNA-specific MIME types if the client doesn't support DLNA.

This commit is contained in:
Justin Maggard
2009-05-01 19:36:43 +00:00
parent 35352221b2
commit 401da95831
5 changed files with 54 additions and 27 deletions

View File

@ -215,10 +215,17 @@ intervening space) by either an integer or the keyword "infinite". */
else if(strncmp(p, "PLAYSTATION", 11)==0)
{
h->req_client = EPS3;
h->reqflags |= FLAG_DLNA;
}
else if(strncmp(p, "SamsungWiselinkPro", 18)==0)
{
h->req_client = ESamsungTV;
h->reqflags |= FLAG_DLNA;
}
else if(strcasestr(p, "DLNADOC/"))
{
h->req_client = EUnknownClient;
h->reqflags |= FLAG_DLNA;
}
}
else if(strncasecmp(line, "Transfer-Encoding", 17)==0)
@ -311,10 +318,12 @@ intervening space) by either an integer or the keyword "infinite". */
}
}
clients[n].type = h->req_client;
clients[n].flags = h->reqflags & 0xFFF00000;
clients[n].age = time(NULL);
}
else if( n >= 0 )
{
h->reqflags |= clients[n].flags;
h->req_client = clients[n].type;
}
}