Fixes for client cache restructuring.

This commit is contained in:
Justin Maggard 2014-06-17 18:38:36 -07:00
parent 0e55facacd
commit a01ffa1787
2 changed files with 4 additions and 3 deletions

View File

@ -1296,6 +1296,7 @@ shutdown:
/* kill other child processes */ /* kill other child processes */
process_reap_children(); process_reap_children();
free(children);
/* close out open sockets */ /* close out open sockets */
while (upnphttphead.lh_first != NULL) while (upnphttphead.lh_first != NULL)

View File

@ -441,14 +441,14 @@ next_header:
else if (client) else if (client)
{ {
enum client_types type = client_types[client].type; enum client_types type = client_types[client].type;
enum client_types ctype = client_types[n].type; enum client_types ctype = h->req_client->type->type;
/* If we know the client and our new detection is generic, use our cached info */ /* If we know the client and our new detection is generic, use our cached info */
/* If we detected a Samsung Series B earlier, don't overwrite it with Series A info */ /* If we detected a Samsung Series B earlier, don't overwrite it with Series A info */
if ((ctype && ctype < EStandardDLNA150 && type >= EStandardDLNA150) || if ((ctype && ctype < EStandardDLNA150 && type >= EStandardDLNA150) ||
(ctype == ESamsungSeriesB && type == ESamsungSeriesA)) (ctype == ESamsungSeriesB && type == ESamsungSeriesA))
return; return;
clients[n].type = &client_types[client]; h->req_client->type = &client_types[client];
clients[n].age = time(NULL); h->req_client->age = time(NULL);
} }
} }