Merge branch 'branch-1.6.x' of ssh://pupnp.git.sourceforge.net/gitroot/pupnp/pupnp into branch-1.6.x
This commit is contained in:
commit
3e7bf14488
60
ChangeLog
60
ChangeLog
@ -2,6 +2,66 @@
|
|||||||
Version 1.6.16
|
Version 1.6.16
|
||||||
*******************************************************************************
|
*******************************************************************************
|
||||||
|
|
||||||
|
2012-03-05 Marcelo Roberto Jimenez <mroberto(at)users.sourceforge.net>
|
||||||
|
|
||||||
|
SF Bug Tracker id 2989399 - UpnpSetVirtualDirCallbacks API removal in 1.6.x
|
||||||
|
|
||||||
|
Submitted: Nick Leverton ( leveret ) - 2010-04-19 07:44:10 PDT
|
||||||
|
|
||||||
|
Details: The recent codebase merge has removed a significant API call
|
||||||
|
which is used by several pupnp devices such as mediatomb and gmediaserver.
|
||||||
|
UpnpSetVirtualDirCallbacks() has been replaced by individual routines to
|
||||||
|
set each callback. Essentially this means that 1.6.7 will in fact be a majo
|
||||||
|
bump and 1.6.6 devices can no longer link against it. Could we have the call
|
||||||
|
reinstated please, perhaps as a wrapper around the individual calls ? As
|
||||||
|
it is, all distros will have to patch their 1.6.x apps, rebuild and re-link them.
|
||||||
|
|
||||||
|
The other removed API calls and external variables don't seem to be used
|
||||||
|
by any of the apps I have copies of, but UpnpSetVirtualDirCallbacks is
|
||||||
|
important for maintaining compatibility within 1.6.x.
|
||||||
|
|
||||||
|
2012-03-05 Marcelo Roberto Jimenez <mroberto(at)users.sourceforge.net>
|
||||||
|
|
||||||
|
SF Bug Tracker id 3325246 - Memory Leak in XML Parser
|
||||||
|
|
||||||
|
Submitted: Terry Farnham ( tfarnham ) - 2011-06-23 09:45:54 PDT
|
||||||
|
|
||||||
|
Details: The following bit of xml results in a memory leak from the xml
|
||||||
|
parser:
|
||||||
|
|
||||||
|
const char *xmlbuffer="<?xml version=\"1.0\" encoding=\"utf-8\"?>
|
||||||
|
<root xmlns=\"urn:schemas-upnp-org:device-1-0\" xmlns:dlna=\"urn:schemas-dlna-org:device-1-0\">
|
||||||
|
<dlna:X_DLNADOC xmlns:dlna=\"urn:schemas-dlna-org:device-1-0\">DMS-1.50</dlna:X_DLNADOC></root>";
|
||||||
|
|
||||||
|
When I execute the following code:
|
||||||
|
|
||||||
|
IXML_Document *doc = ixmlParseBuffer(xmlbuffer);
|
||||||
|
ixmlDocument_free(doc);
|
||||||
|
|
||||||
|
It results in a memory leak in ixmlparser.c line 2107 where it calls
|
||||||
|
safe_strdup( newElement->namespaceURI ); It's difficult to figure out why.
|
||||||
|
|
||||||
|
2012-03-05 Marcelo Roberto Jimenez <mroberto(at)users.sourceforge.net>
|
||||||
|
|
||||||
|
SF Bug Tracker id 3417134 - Crash seen in UpnpFinish
|
||||||
|
|
||||||
|
Submitted: Sunil ( sunilangadi ) - 2011-10-02 08:28:47 PDT
|
||||||
|
|
||||||
|
Details: I observed crash in the below mentioned log statement in
|
||||||
|
function upnpfinish(file: upnpapi.c).
|
||||||
|
UpnpPrintf(UPNP_INFO, API, __FILE__, __LINE__, "Exiting UpnpFinish:
|
||||||
|
UpnpSdkInit is :%d:\n", UpnpSdkInit);
|
||||||
|
|
||||||
|
In particular it was crashing in ithread_self in
|
||||||
|
UpnpDisplayFileAndLine(file upnpdebug.c) on WIN32.
|
||||||
|
|
||||||
|
Moving the call ithread_cleanup_library() below the upnp printf call
|
||||||
|
mentioned above in function upnpfinish fixed the crash but I couldn't get
|
||||||
|
to the root of the problem.
|
||||||
|
|
||||||
|
The problem was observed on WIN32.
|
||||||
|
|
||||||
|
|
||||||
2012-03-05 Fabrice Fontaine <fabrice.fontaine(at)orange.com>
|
2012-03-05 Fabrice Fontaine <fabrice.fontaine(at)orange.com>
|
||||||
|
|
||||||
SF Bug Tracker id 3497159 - Bug fix in Parser_readFileOrBuffer
|
SF Bug Tracker id 3497159 - Bug fix in Parser_readFileOrBuffer
|
||||||
|
19
configure.ac
19
configure.ac
@ -284,16 +284,23 @@ dnl ############################################################################
|
|||||||
dnl # Release 1.6.16:
|
dnl # Release 1.6.16:
|
||||||
dnl # "current:revision:age"
|
dnl # "current:revision:age"
|
||||||
dnl #
|
dnl #
|
||||||
dnl # -
|
dnl # - Code has changed in ixml
|
||||||
|
dnl # revision: 6 -> 7
|
||||||
|
dnl # - Code has changed in upnp
|
||||||
|
dnl # revision: 1 -> 2
|
||||||
|
dnl # - interface changed/added/removed in upnp
|
||||||
|
dnl # current++(9); revision = 0
|
||||||
|
dnl # - interface added in upnp
|
||||||
|
dnl # age++(3)
|
||||||
dnl #
|
dnl #
|
||||||
dnl #AC_SUBST([LT_VERSION_IXML], [::])
|
dnl #AC_SUBST([LT_VERSION_IXML], [2:7:0])
|
||||||
dnl #AC_SUBST([LT_VERSION_THREADUTIL], [::])
|
dnl #AC_SUBST([LT_VERSION_THREADUTIL], [6:0:0])
|
||||||
dnl #AC_SUBST([LT_VERSION_UPNP], [::])
|
dnl #AC_SUBST([LT_VERSION_UPNP], [9:0:3])
|
||||||
dnl #
|
dnl #
|
||||||
dnl ############################################################################
|
dnl ############################################################################
|
||||||
AC_SUBST([LT_VERSION_IXML], [2:6:0])
|
AC_SUBST([LT_VERSION_IXML], [2:7:0])
|
||||||
AC_SUBST([LT_VERSION_THREADUTIL], [6:0:0])
|
AC_SUBST([LT_VERSION_THREADUTIL], [6:0:0])
|
||||||
AC_SUBST([LT_VERSION_UPNP], [8:1:2])
|
AC_SUBST([LT_VERSION_UPNP], [9:0:3])
|
||||||
dnl ############################################################################
|
dnl ############################################################################
|
||||||
dnl # Repeating the algorithm to place it closer to the modificatin place:
|
dnl # Repeating the algorithm to place it closer to the modificatin place:
|
||||||
dnl # - library code modified: revision++
|
dnl # - library code modified: revision++
|
||||||
|
@ -1594,6 +1594,9 @@ static int Parser_xmlNamespace(
|
|||||||
}
|
}
|
||||||
if (pCur->prefix != NULL &&
|
if (pCur->prefix != NULL &&
|
||||||
strcmp(pCur->prefix, newNode->localName) == 0) {
|
strcmp(pCur->prefix, newNode->localName) == 0) {
|
||||||
|
if (pCur->namespaceUri != NULL) {
|
||||||
|
free(pCur->namespaceUri);
|
||||||
|
}
|
||||||
pCur->namespaceUri = safe_strdup(newNode->nodeValue);
|
pCur->namespaceUri = safe_strdup(newNode->nodeValue);
|
||||||
if (pCur->namespaceUri == NULL) {
|
if (pCur->namespaceUri == NULL) {
|
||||||
ret = IXML_INSUFFICIENT_MEMORY;
|
ret = IXML_INSUFFICIENT_MEMORY;
|
||||||
|
@ -2790,6 +2790,21 @@ typedef int (*VDCallback_Close)(
|
|||||||
*/
|
*/
|
||||||
EXPORT_SPEC int UpnpVirtualDir_set_CloseCallback(VDCallback_Close callback);
|
EXPORT_SPEC int UpnpVirtualDir_set_CloseCallback(VDCallback_Close callback);
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* \brief The {\bf UpnpVirtualDirCallbacks} structure contains the pointers to
|
||||||
|
* file-related callback functions a device application can register to
|
||||||
|
* virtualize URLs.
|
||||||
|
*/
|
||||||
|
struct UpnpVirtualDirCallbacks
|
||||||
|
{
|
||||||
|
VDCallback_GetInfo get_info;
|
||||||
|
VDCallback_Open open;
|
||||||
|
VDCallback_Read read;
|
||||||
|
VDCallback_Write write;
|
||||||
|
VDCallback_Seek seek;
|
||||||
|
VDCallback_Close close;
|
||||||
|
};
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Enables or disables the webserver.
|
* \brief Enables or disables the webserver.
|
||||||
*
|
*
|
||||||
@ -2810,6 +2825,17 @@ EXPORT_SPEC int UpnpEnableWebserver(
|
|||||||
*/
|
*/
|
||||||
EXPORT_SPEC int UpnpIsWebserverEnabled(void);
|
EXPORT_SPEC int UpnpIsWebserverEnabled(void);
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* \brief Sets the callback functions to be used to access a virtual directory.
|
||||||
|
*
|
||||||
|
* \return An integer representing one of the following:
|
||||||
|
* \li \c UPNP_E_SUCCESS: The operation completed successfully.
|
||||||
|
* \li \c UPNP_E_INVALID_PARAM: one of the callbacks is not valid.
|
||||||
|
*/
|
||||||
|
EXPORT_SPEC int UpnpSetVirtualDirCallbacks(
|
||||||
|
/*! [in] A structure that contains the callback functions. */
|
||||||
|
struct UpnpVirtualDirCallbacks *callbacks );
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Adds a virtual directory mapping.
|
* \brief Adds a virtual directory mapping.
|
||||||
*
|
*
|
||||||
|
@ -636,12 +636,12 @@ int UpnpFinish(void)
|
|||||||
ithread_mutex_destroy(&gUUIDMutex);
|
ithread_mutex_destroy(&gUUIDMutex);
|
||||||
/* remove all virtual dirs */
|
/* remove all virtual dirs */
|
||||||
UpnpRemoveAllVirtualDirs();
|
UpnpRemoveAllVirtualDirs();
|
||||||
/* Clean-up ithread library resources */
|
|
||||||
ithread_cleanup_library();
|
|
||||||
UpnpSdkInit = 0;
|
UpnpSdkInit = 0;
|
||||||
UpnpPrintf(UPNP_INFO, API, __FILE__, __LINE__,
|
UpnpPrintf(UPNP_INFO, API, __FILE__, __LINE__,
|
||||||
"Exiting UpnpFinish: UpnpSdkInit is :%d:\n", UpnpSdkInit);
|
"Exiting UpnpFinish: UpnpSdkInit is :%d:\n", UpnpSdkInit);
|
||||||
UpnpCloseLog();
|
UpnpCloseLog();
|
||||||
|
/* Clean-up ithread library resources */
|
||||||
|
ithread_cleanup_library();
|
||||||
|
|
||||||
return UPNP_E_SUCCESS;
|
return UPNP_E_SUCCESS;
|
||||||
}
|
}
|
||||||
@ -3989,6 +3989,27 @@ int UpnpIsWebserverEnabled(void)
|
|||||||
return bWebServerState == WEB_SERVER_ENABLED;
|
return bWebServerState == WEB_SERVER_ENABLED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int UpnpSetVirtualDirCallbacks(struct UpnpVirtualDirCallbacks *callbacks)
|
||||||
|
{
|
||||||
|
int ret = 0;
|
||||||
|
|
||||||
|
if( UpnpSdkInit != 1 ) {
|
||||||
|
/* SDK is not initialized */
|
||||||
|
return UPNP_E_FINISH;
|
||||||
|
}
|
||||||
|
|
||||||
|
if( callbacks == NULL )
|
||||||
|
return UPNP_E_INVALID_PARAM;
|
||||||
|
|
||||||
|
ret = UpnpVirtualDir_set_GetInfoCallback(callbacks->get_info) == UPNP_E_SUCCESS
|
||||||
|
&& UpnpVirtualDir_set_OpenCallback(callbacks->open) == UPNP_E_SUCCESS
|
||||||
|
&& UpnpVirtualDir_set_ReadCallback(callbacks->read) == UPNP_E_SUCCESS
|
||||||
|
&& UpnpVirtualDir_set_WriteCallback(callbacks->write) == UPNP_E_SUCCESS
|
||||||
|
&& UpnpVirtualDir_set_SeekCallback(callbacks->seek) == UPNP_E_SUCCESS
|
||||||
|
&& UpnpVirtualDir_set_CloseCallback(callbacks->close) == UPNP_E_SUCCESS;
|
||||||
|
|
||||||
|
return ret ? UPNP_E_SUCCESS : UPNP_E_INVALID_PARAM;
|
||||||
|
}
|
||||||
|
|
||||||
int UpnpVirtualDir_set_GetInfoCallback(VDCallback_GetInfo callback)
|
int UpnpVirtualDir_set_GetInfoCallback(VDCallback_GetInfo callback)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user