* SF Tracker [ 1652827 ] UpnpRegisterRootDevice returned -104
Submitted By: Michael Andersen - miwer Issue was found to be related to sizeof (size_t) != sizeof (int) on AMD64 systems. Emil Ljungdahl's AMD64 patch has been applied along with some other fixes. Original user report follows: When I run upnpd I get the above mentioned error (UPNP_E_OUTOF_MEMORY). I've tried with 1.4.1 and 1.4.2-RC3, it's the same. I don't understand why, because I have plenty of RAM, and I even tried closing some applications, but it didn't help. $ upnpd eth1 br0 The following is logged in the /var/log/messages: Feb 6 01:33:47 server upnpd[6933]: Error registering the root device with descDocUrl: http://192.168.0.1:49152/gatedesc.xml Feb 6 01:33:47 server upnpd[6933]: UpnpRegisterRootDevice returned -104 I tried enabling debugging and it looks like it cannot allocate memory through the membuffer_append function. It's wierd because it's only a few bytes. Please note, that I enabled some extra debugging lines that were commented, in order to get more information. See attached files. git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/trunk@154 119443c7-1b9e-41f8-b6fc-b9c35fce742c
This commit is contained in:
@@ -87,7 +87,7 @@ enum uriType { absolute, relative };
|
||||
* holds a pointer into a larger array */
|
||||
typedef struct TOKEN {
|
||||
const char *buff;
|
||||
int size;
|
||||
size_t size;
|
||||
} token;
|
||||
|
||||
|
||||
@@ -124,7 +124,7 @@ typedef struct URL_LIST {
|
||||
* Parameters :
|
||||
* char * in ; string of characters
|
||||
* int index ; index at which to start checking the characters
|
||||
* int *max ;
|
||||
* size_t *max ;
|
||||
*
|
||||
* Description : Replaces an escaped sequence with its unescaped version
|
||||
* as in http://www.ietf.org/rfc/rfc2396.txt (RFC explaining URIs)
|
||||
@@ -137,7 +137,7 @@ typedef struct URL_LIST {
|
||||
* string are shifted over, and NULL characters are placed at the
|
||||
* end of the string.
|
||||
************************************************************************/
|
||||
int replace_escaped(char * in, int index, int *max);
|
||||
int replace_escaped(char * in, int index, size_t *max);
|
||||
|
||||
/************************************************************************
|
||||
* Function : copy_URL_list
|
||||
@@ -303,7 +303,7 @@ int parse_hostport(const char *in, int max, hostport_type *out );
|
||||
*
|
||||
* Parameters :
|
||||
* INOUT char *in ; string of characters to be modified
|
||||
* INOUT int *size ; size limit for the number of characters
|
||||
* INOUT size_t *size ; size limit for the number of characters
|
||||
*
|
||||
* Description : removes http escaped characters such as: "%20" and
|
||||
* replaces them with their character representation. i.e.
|
||||
@@ -315,7 +315,7 @@ int parse_hostport(const char *in, int max, hostport_type *out );
|
||||
*
|
||||
* Note :
|
||||
************************************************************************/
|
||||
int remove_escaped_chars(char *in,int *size);
|
||||
int remove_escaped_chars(char *in, size_t *size);
|
||||
|
||||
/************************************************************************
|
||||
* Function : remove_dots
|
||||
|
Reference in New Issue
Block a user