* Allow larger fields in UPnP requests, to work better with long Logitech Revue Search requests.
This commit is contained in:
parent
eb0278a905
commit
2a164e31d4
@ -47,7 +47,7 @@ NameValueParserStartElt(void * d, const char * name, int l)
|
||||
if(!data->head.lh_first)
|
||||
{
|
||||
struct NameValue * nv;
|
||||
nv = malloc(sizeof(struct NameValue));
|
||||
nv = malloc(sizeof(struct NameValue)+l+1);
|
||||
strcpy(nv->name, "rootElement");
|
||||
memcpy(nv->value, name, l);
|
||||
nv->value[l] = '\0';
|
||||
@ -60,9 +60,9 @@ NameValueParserGetData(void * d, const char * datas, int l)
|
||||
{
|
||||
struct NameValueParserData * data = (struct NameValueParserData *)d;
|
||||
struct NameValue * nv;
|
||||
nv = malloc(sizeof(struct NameValue));
|
||||
if(l>511)
|
||||
l = 511;
|
||||
if(l>1975)
|
||||
l = 1975;
|
||||
nv = malloc(sizeof(struct NameValue)+l+1);
|
||||
strncpy(nv->name, data->curelt, 64);
|
||||
nv->name[63] = '\0';
|
||||
memcpy(nv->value, datas, l);
|
||||
|
@ -38,7 +38,7 @@ extern "C" {
|
||||
struct NameValue {
|
||||
LIST_ENTRY(NameValue) entries;
|
||||
char name[64];
|
||||
char value[512];
|
||||
char value[];
|
||||
};
|
||||
|
||||
struct NameValueParserData {
|
||||
|
Loading…
x
Reference in New Issue
Block a user