* Use a defined value for max SOAP response size. Previously we would probably crash if a response got over 1MB due. Now we will realloc in 1MB increments until we reach our prefined max response size. This should be useful for clients like djmount, which don't specify a result limit in their request, but also don't handle huge (>1MB) responses.

This commit is contained in:
Justin Maggard
2009-08-07 23:41:32 +00:00
parent 90dcf17785
commit d249992cc4
2 changed files with 30 additions and 6 deletions

View File

@ -7,6 +7,8 @@
#ifndef __UPNPSOAP_H__
#define __UPNPSOAP_H__
#define MAX_RESPONSE_SIZE 1048576
#define CONTENT_DIRECTORY_SCHEMAS \
" xmlns:dc=\"http://purl.org/dc/elements/1.1/\"" \
" xmlns:upnp=\"urn:schemas-upnp-org:metadata-1-0/upnp/\"" \
@ -21,6 +23,7 @@ struct Response
int returned;
int requested;
int size;
int alloced;
u_int32_t filter;
u_int32_t flags;
enum client_types client;