Compare commits

..

2 Commits

Author SHA1 Message Date
Marcelo Roberto Jimenez
34b38a27d5 Fixes unmerged changes from trunk@285 to tags/release-1.6.3. This has happened
due to improper handling of ISO-8859-1/UTF-8 by some software in the middle of
the process. My fault.


git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/tags/release-1.6.3@314 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2008-02-03 02:13:16 +00:00
Marcelo Roberto Jimenez
84f3b920a5 Creation of the tag for release-1.6.3.
git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/tags/release-1.6.3@285 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2007-12-27 02:16:27 +00:00
14 changed files with 82 additions and 146 deletions

View File

@@ -1,41 +1,3 @@
*******************************************************************************
Version 1.6.4
*******************************************************************************
2008-01-23 Marcelo Jimenez <mroberto(at)users.sourceforge.net>
* Workaround for a problem with the new automake AM_CONDITIONAL macro
from autotools-1.10. Thanks to Ingo Hofmann for helping with debugging
this one.
2008-01-22 Marcelo Jimenez <mroberto(at)users.sourceforge.net>
* Added quoting to macros AC_CONFIG_AUX_DIR, AC_CONFIG_MACRO_DIR and
AC_CONFIG_SRCDIR in configure.ac. Also changed the name of the
auxiliary directory in AC_CONFIG_AUX_DIR to build-aux.
2008-01-22 Marcelo Jimenez <mroberto(at)users.sourceforge.net>
* Fix for setsockopt() in Threadpool.c to allow more than one process
to join the multicast-group on OSX. Thanks to Ingo Hofmann.
2008-01-22 Marcelo Jimenez <mroberto(at)users.sourceforge.net>
* Using defined(__OSX__) || defined(__APPLE__) instead of just
defined(__OSX__) in the code. Thanks to Ingo Hofmann and Chris
Pickel.
2008-01-21 Marcelo Jimenez <mroberto(at)users.sourceforge.net>
* Fix for isFileInVirtualDir. Thanks to Peter Hartley for the patch.
2008-01-07 Marcelo Jimenez <mroberto(at)users.sourceforge.net>
* Putting back a "defined(__OSX__)" that has been removed in the
previous *BSD patch. Thanks to Chris Pickel for pointing it out.
2008-01-07 Marcelo Jimenez <mroberto(at)users.sourceforge.net>
* SF Patches Tracker [ 1865812 ] typo in docs comment
Submitted By: Hartmut Holzgraefe - hholzgra
typo in docs comment ACCAPTED instead of ACCEPTED in
@name UPNP_E_UNSUBSCRIBE_UNACCAPTED [-302]
Also, the documentation file name was mispelled and was corrected in
the Makefile.am.
******************************************************************************* *******************************************************************************
Version 1.6.3 Version 1.6.3
******************************************************************************* *******************************************************************************

4
THANKS
View File

@@ -10,7 +10,6 @@ exempt of errors.
- Arno Willig - Arno Willig
- Bob Ciora - Bob Ciora
- Chaos - Chaos
- Chris Pickel
- Craig Nelson - Craig Nelson
- David Maass - David Maass
- Emil Ljungdahl - Emil Ljungdahl
@@ -21,8 +20,6 @@ exempt of errors.
- Fabrice Fontaine - Fabrice Fontaine
- Fredrik Svensson - Fredrik Svensson
- Glen Masgai - Glen Masgai
- Hartmut Holzgraefe - hholzgra
- Ingo Hofmann
- Jiri Zouhar - Jiri Zouhar
- John Dennis - John Dennis
- Jonathan Casiot (no_dice) - Jonathan Casiot (no_dice)
@@ -37,7 +34,6 @@ exempt of errors.
- Oskar Liljeblad - Oskar Liljeblad
- Michael (oxygenic) - Michael (oxygenic)
- Paul Vixie - Paul Vixie
- Peter Hartley
- Rene Hexel - Rene Hexel
- Robert Gingher (robsbox) - Robert Gingher (robsbox)
- Siva Chandran - Siva Chandran

View File

@@ -9,7 +9,7 @@
AC_PREREQ(2.60) AC_PREREQ(2.60)
AC_INIT([libupnp], [1.6.4], [mroberto@users.sourceforge.net]) AC_INIT([libupnp], [1.6.3], [mroberto@users.sourceforge.net])
dnl ############################################################################ dnl ############################################################################
dnl # *Independently* of the above libupnp package version, the libtool version dnl # *Independently* of the above libupnp package version, the libtool version
dnl # of the 3 libraries need to be updated whenever there is a change released: dnl # of the 3 libraries need to be updated whenever there is a change released:
@@ -107,22 +107,9 @@ dnl #AC_SUBST([LT_VERSION_THREADUTIL], [4:1:2])
dnl #AC_SUBST([LT_VERSION_UPNP], [3:2:0]) dnl #AC_SUBST([LT_VERSION_UPNP], [3:2:0])
dnl # dnl #
dnl ############################################################################ dnl ############################################################################
dnl # Release 1.6.4:
dnl # "current:revision:age"
dnl #
dnl # - Code has changed in threadutil
dnl # revision: 1 -> 2
dnl # - Code has changed in upnp
dnl # revision: 2 -> 3
dnl #
dnl #AC_SUBST([LT_VERSION_IXML], [2:4:0])
dnl #AC_SUBST([LT_VERSION_THREADUTIL], [4:2:2])
dnl #AC_SUBST([LT_VERSION_UPNP], [3:3:0])
dnl #
dnl ############################################################################
AC_SUBST([LT_VERSION_IXML], [2:4:0]) AC_SUBST([LT_VERSION_IXML], [2:4:0])
AC_SUBST([LT_VERSION_THREADUTIL], [4:2:2]) AC_SUBST([LT_VERSION_THREADUTIL], [4:1:2])
AC_SUBST([LT_VERSION_UPNP], [3:3:0]) AC_SUBST([LT_VERSION_UPNP], [3:2:0])
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++
@@ -133,9 +120,9 @@ dnl # *please update only once, before a formal release, not for each change*
dnl ############################################################################ dnl ############################################################################
AC_CONFIG_AUX_DIR([build-aux]) AC_CONFIG_AUX_DIR(config.aux)
AC_CONFIG_MACRO_DIR([m4]) AC_CONFIG_MACRO_DIR(m4)
AC_CONFIG_SRCDIR([upnp/inc/upnp.h]) AC_CONFIG_SRCDIR(upnp/inc/upnp.h)
AM_INIT_AUTOMAKE([1.8 -Wall foreign subdir-objects dist-bzip2]) AM_INIT_AUTOMAKE([1.8 -Wall foreign subdir-objects dist-bzip2])

View File

@@ -39,7 +39,7 @@ EXTRA_DIST = \
./html/upnp/UPNP_E_SOCKET_ERROR-208.html \ ./html/upnp/UPNP_E_SOCKET_ERROR-208.html \
./html/upnp/UPNP_E_CANCELED-210.html \ ./html/upnp/UPNP_E_CANCELED-210.html \
./html/upnp/UPNP_E_SUBSCRIBE_UNACCEPTED-301.html \ ./html/upnp/UPNP_E_SUBSCRIBE_UNACCEPTED-301.html \
./html/upnp/UPNP_E_UNSUBSCRIBE_UNACCEPTED-302.html \ ./html/upnp/UPNP_E_UNSUBSCRIBE_UNACCAPTED-302.html \
./html/upnp/UPNP_E_NOTIFY_UNACCEPTED-303.html \ ./html/upnp/UPNP_E_NOTIFY_UNACCEPTED-303.html \
./html/upnp/UPNP_E_INVALID_ARGUMENT-501.html \ ./html/upnp/UPNP_E_INVALID_ARGUMENT-501.html \
./html/upnp/UPNP_E_FILE_NOT_FOUND-502.html \ ./html/upnp/UPNP_E_FILE_NOT_FOUND-502.html \
@@ -295,7 +295,7 @@ if WITH_DOCUMENTATION
./html/upnp/UPNP_E_SOCKET_ERROR-208.html \ ./html/upnp/UPNP_E_SOCKET_ERROR-208.html \
./html/upnp/UPNP_E_CANCELED-210.html \ ./html/upnp/UPNP_E_CANCELED-210.html \
./html/upnp/UPNP_E_SUBSCRIBE_UNACCEPTED-301.html \ ./html/upnp/UPNP_E_SUBSCRIBE_UNACCEPTED-301.html \
./html/upnp/UPNP_E_UNSUBSCRIBE_UNACCEPTED-302.html \ ./html/upnp/UPNP_E_UNSUBSCRIBE_UNACCAPTED-302.html \
./html/upnp/UPNP_E_NOTIFY_UNACCEPTED-303.html \ ./html/upnp/UPNP_E_NOTIFY_UNACCEPTED-303.html \
./html/upnp/UPNP_E_INVALID_ARGUMENT-501.html \ ./html/upnp/UPNP_E_INVALID_ARGUMENT-501.html \
./html/upnp/UPNP_E_FILE_NOT_FOUND-502.html \ ./html/upnp/UPNP_E_FILE_NOT_FOUND-502.html \

View File

@@ -1,4 +1,4 @@
Version: 1.6.4 Version: 1.6.2
Summary: Universal Plug and Play (UPnP) SDK Summary: Universal Plug and Play (UPnP) SDK
Name: libupnp Name: libupnp
Release: 1%{?dist} Release: 1%{?dist}

View File

@@ -41,7 +41,7 @@ AC_DEFUN([RT_BOOL_ARG_ENABLE],[
)]) )])
test "x$enable_[$1]" != [x]m4_if([$2],[yes],[no],[yes]) dnl test "x$enable_[$1]" != [x]m4_if([$2],[yes],[no],[yes]) dnl
&& enable_[]Name=[$2] && enable_[]Name=[$2]
AC_MSG_RESULT($enable_[]Name) AC_MSG_RESULT($enable_[]Name)dnl
AM_CONDITIONAL([ENABLE_]NAME, test x"$enable_[]Name" = xyes) AM_CONDITIONAL([ENABLE_]NAME, test x"$enable_[]Name" = xyes)
dnl dnl
m4_popdef([NAME])dnl m4_popdef([NAME])dnl

View File

@@ -31,7 +31,7 @@
#include "LinkedList.h" #include "LinkedList.h"
#include <sys/param.h> #include <sys/param.h>
#if (defined(BSD) && BSD >= 199306) || defined(__OSX__) || defined(__APPLE__) #if (defined(BSD) && BSD >= 199306) || defined(__OSX__)
#include <stdlib.h> #include <stdlib.h>
#else #else
#include <malloc.h> #include <malloc.h>

View File

@@ -229,7 +229,7 @@ static int SetPolicyType( PolicyType in )
#ifdef __CYGWIN__ #ifdef __CYGWIN__
/* TODO not currently working... */ /* TODO not currently working... */
return 0; return 0;
#elif defined(__OSX__) || defined(__APPLE__) #elif defined(__OSX__)
setpriority( PRIO_PROCESS, 0, 0 ); setpriority( PRIO_PROCESS, 0, 0 );
return 0; return 0;
#elif defined(WIN32) #elif defined(WIN32)
@@ -389,7 +389,7 @@ static void SetSeed()
gettimeofday(&t, NULL); gettimeofday(&t, NULL);
#if defined(WIN32) #if defined(WIN32)
srand( ( unsigned int )t.tv_usec + (unsigned int)ithread_get_current_thread_id().p ); srand( ( unsigned int )t.tv_usec + (unsigned int)ithread_get_current_thread_id().p );
#elif defined(__FreeBSD__) || defined(__OSX__) || defined(__APPLE__) #elif defined(__FreeBSD__)
srand( ( unsigned int )t.tv_usec + (unsigned int)ithread_get_current_thread_id() ); srand( ( unsigned int )t.tv_usec + (unsigned int)ithread_get_current_thread_id() );
#elif defined(__linux__) #elif defined(__linux__)
srand( ( unsigned int )t.tv_usec + ithread_get_current_thread_id() ); srand( ( unsigned int )t.tv_usec + ithread_get_current_thread_id() );

View File

@@ -413,7 +413,7 @@
#define UPNP_E_SUBSCRIBE_UNACCEPTED -301 #define UPNP_E_SUBSCRIBE_UNACCEPTED -301
/*! @} */ /*! @} */
/** @name UPNP_E_UNSUBSCRIBE_UNACCEPTED [-302] /** @name UPNP_E_UNSUBSCRIBE_UNACCAPTED [-302]
* {\tt UPNP_E_UNSUBSCRIBE_UNACCEPTED} signifies that an unsubscribe * {\tt UPNP_E_UNSUBSCRIBE_UNACCEPTED} signifies that an unsubscribe
* request was rejected from the remote side. * request was rejected from the remote side.
*/ */

View File

@@ -745,7 +745,7 @@ isFileInVirtualDir( IN char *filePath )
return TRUE; return TRUE;
} else { } else {
if( ( strncmp( pCurVirtualDir->dirName, filePath, webDirLen ) if( ( strncmp( pCurVirtualDir->dirName, filePath, webDirLen )
== 0 ) && ( filePath[webDirLen] == '/' || filePath[webDirLen] == '\0' || filePath[webDirLen] == '?' ) ) == 0 ) && ( filePath[webDirLen] == '/' ) )
return TRUE; return TRUE;
} }

View File

@@ -555,7 +555,7 @@ parse_hostport( const char *in,
int begin_port; int begin_port;
int hostport_size = 0; int hostport_size = 0;
int host_size = 0; int host_size = 0;
#if !defined(WIN32) && !(defined(__OSX__) || defined(__APPLE__)) #if !defined(WIN32) && !defined(__OSX__)
char temp_hostbyname_buff[BUFFER_SIZE]; char temp_hostbyname_buff[BUFFER_SIZE];
struct hostent h_buf; struct hostent h_buf;
#endif #endif
@@ -642,7 +642,7 @@ parse_hostport( const char *in,
if ( h == NULL ) { if ( h == NULL ) {
errCode = 1; errCode = 1;
} }
#elif defined(__OSX__) || defined(__APPLE__) #elif defined(__OSX__)
h = gethostbyname(temp_host_name); h = gethostbyname(temp_host_name);
if ( h == NULL ) { if ( h == NULL ) {
errCode = 1; errCode = 1;

View File

@@ -56,88 +56,88 @@ struct SendInstruction
}; };
/************************************************************************ /************************************************************************
* Function: web_server_init * Function: web_server_init
* *
* Parameters: * Parameters:
* none * none
* *
* Description: Initilialize the different documents. Initialize the * Description: Initilialize the different documents. Initialize the
* memory for root directory for web server. Call to initialize global * memory for root directory for web server. Call to initialize global
* XML document. Sets bWebServerState to WEB_SERVER_ENABLED * XML document. Sets bWebServerState to WEB_SERVER_ENABLED
* *
* Returns: * Returns:
* 0 - OK * 0 - OK
* UPNP_E_OUTOF_MEMORY: note: alias_content is not freed here * UPNP_E_OUTOF_MEMORY: note: alias_content is not freed here
************************************************************************/ ************************************************************************/
int web_server_init( void ); int web_server_init( void );
/************************************************************************ /************************************************************************
* Function: web_server_destroy * Function: web_server_destroy
* *
* Parameters: * Parameters:
* none * none
* *
* Description: Release memory allocated for the global web server root * Description: Release memory allocated for the global web server root
* directory and the global XML document * directory and the global XML document
* Resets the flag bWebServerState to WEB_SERVER_DISABLED * Resets the flag bWebServerState to WEB_SERVER_DISABLED
* *
* Returns: * Returns:
* void * void
************************************************************************/ ************************************************************************/
void web_server_destroy( void ); void web_server_destroy( void );
/************************************************************************ /************************************************************************
* Function: web_server_set_alias * Function: web_server_set_alias
* *
* Parameters: * Parameters:
* alias_name: webserver name of alias; created by caller and freed by * alias_name: webserver name of alias; created by caller and freed by
* caller (doesn't even have to be malloc()d .) * caller (doesn't even have to be malloc()d .)
* alias_content: the xml doc; this is allocated by the caller; and * alias_content: the xml doc; this is allocated by the caller; and
* freed by the web server * freed by the web server
* alias_content_length: length of alias body in bytes * alias_content_length: length of alias body in bytes
* last_modified: time when the contents of alias were last * last_modified: time when the contents of alias were last
* changed (local time) * changed (local time)
* *
* Description: Replaces current alias with the given alias. To remove * Description: Replaces current alias with the given alias. To remove
* the current alias, set alias_name to NULL. * the current alias, set alias_name to NULL.
* *
* Returns: * Returns:
* 0 - OK * 0 - OK
* UPNP_E_OUTOF_MEMORY: note: alias_content is not freed here * UPNP_E_OUTOF_MEMORY: note: alias_content is not freed here
************************************************************************/ ************************************************************************/
int web_server_set_alias( IN const char* alias_name, int web_server_set_alias( IN const char* alias_name,
IN const char* alias_content, IN size_t alias_content_length, IN const char* alias_content, IN size_t alias_content_length,
IN time_t last_modified ); IN time_t last_modified );
/************************************************************************ /************************************************************************
* Function: web_server_set_root_dir * Function: web_server_set_root_dir
* *
* Parameters: * Parameters:
* IN const char* root_dir ; String having the root directory for the * IN const char* root_dir ; String having the root directory for the
* document * document
* *
* Description: Assign the path specfied by the IN const char* root_dir * Description: Assign the path specfied by the IN const char* root_dir
* parameter to the global Document root directory. Also check for * parameter to the global Document root directory. Also check for
* path names ending in '/' * path names ending in '/'
* *
* Returns: * Returns:
* int * int
************************************************************************/ ************************************************************************/
int web_server_set_root_dir( IN const char* root_dir ); int web_server_set_root_dir( IN const char* root_dir );
/************************************************************************ /************************************************************************
* Function: web_server_callback * Function: web_server_callback *
* * *
* Parameters: * Parameters: *
* IN http_parser_t *parser, * IN http_parser_t *parser, *
* INOUT http_message_t* req, * INOUT http_message_t* req, *
* IN SOCKINFO *info * IN SOCKINFO *info *
* * *
* Description: main entry point into web server; * Description: main entry point into web server; *
* handles HTTP GET and HEAD requests * handles HTTP GET and HEAD requests *
* * *
* Returns: * Returns: *
* void * void *
************************************************************************/ ************************************************************************/
void web_server_callback( IN http_parser_t *parser, IN http_message_t* req, INOUT SOCKINFO *info ); void web_server_callback( IN http_parser_t *parser, IN http_message_t* req, INOUT SOCKINFO *info );
@@ -148,4 +148,3 @@ void web_server_callback( IN http_parser_t *parser, IN http_message_t* req, INOU
#endif // GENLIB_NET_HTTP_WEBSERVER_H #endif // GENLIB_NET_HTTP_WEBSERVER_H

View File

@@ -870,7 +870,6 @@ get_ssdp_sockets( MiniServerSockArray * out )
UpnpPrintf( UPNP_CRITICAL, UpnpPrintf( UPNP_CRITICAL,
SSDP, __FILE__, __LINE__, SSDP, __FILE__, __LINE__,
"Error in socket operation !!!\n" ); "Error in socket operation !!!\n" );
return UPNP_E_OUTOF_SOCKET; return UPNP_E_OUTOF_SOCKET;
} }
setsockopt( ssdpReqSock, IPPROTO_IP, IP_MULTICAST_TTL, &ttl, sizeof( ttl ) ); setsockopt( ssdpReqSock, IPPROTO_IP, IP_MULTICAST_TTL, &ttl, sizeof( ttl ) );
@@ -885,7 +884,6 @@ get_ssdp_sockets( MiniServerSockArray * out )
"Error in socket operation !!!\n" ); "Error in socket operation !!!\n" );
CLIENTONLY( shutdown( ssdpReqSock, SD_BOTH ); ) CLIENTONLY( shutdown( ssdpReqSock, SD_BOTH ); )
CLIENTONLY( UpnpCloseSocket( ssdpReqSock ); ) CLIENTONLY( UpnpCloseSocket( ssdpReqSock ); )
return UPNP_E_OUTOF_SOCKET; return UPNP_E_OUTOF_SOCKET;
} }
@@ -899,11 +897,10 @@ get_ssdp_sockets( MiniServerSockArray * out )
CLIENTONLY( UpnpCloseSocket( ssdpReqSock ); ) CLIENTONLY( UpnpCloseSocket( ssdpReqSock ); )
shutdown( ssdpSock, SD_BOTH ); shutdown( ssdpSock, SD_BOTH );
UpnpCloseSocket( ssdpSock ); UpnpCloseSocket( ssdpSock );
return UPNP_E_SOCKET_ERROR; return UPNP_E_SOCKET_ERROR;
} }
#if defined(__FreeBSD__) || defined(__OSX__) || defined(__APPLE__) #ifdef __FreeBSD__
if( setsockopt( ssdpSock, SOL_SOCKET, SO_REUSEPORT, if( setsockopt( ssdpSock, SOL_SOCKET, SO_REUSEPORT,
( char * )&onOff, sizeof( onOff ) ) != 0 ) { ( char * )&onOff, sizeof( onOff ) ) != 0 ) {
UpnpPrintf( UPNP_CRITICAL, UpnpPrintf( UPNP_CRITICAL,
@@ -913,7 +910,6 @@ get_ssdp_sockets( MiniServerSockArray * out )
CLIENTONLY( UpnpCloseSocket( ssdpReqSock ); ) CLIENTONLY( UpnpCloseSocket( ssdpReqSock ); )
shutdown( ssdpSock, SD_BOTH ); shutdown( ssdpSock, SD_BOTH );
UpnpCloseSocket( ssdpSock ); UpnpCloseSocket( ssdpSock );
return UPNP_E_SOCKET_ERROR; return UPNP_E_SOCKET_ERROR;
} }
#endif /* __FreeBSD__ */ #endif /* __FreeBSD__ */
@@ -932,7 +928,6 @@ get_ssdp_sockets( MiniServerSockArray * out )
UpnpCloseSocket( ssdpSock ); UpnpCloseSocket( ssdpSock );
CLIENTONLY( shutdown( ssdpReqSock, SD_BOTH ); ) CLIENTONLY( shutdown( ssdpReqSock, SD_BOTH ); )
CLIENTONLY( UpnpCloseSocket( ssdpReqSock ); ) CLIENTONLY( UpnpCloseSocket( ssdpReqSock ); )
return UPNP_E_SOCKET_BIND; return UPNP_E_SOCKET_BIND;
} }
@@ -948,7 +943,6 @@ get_ssdp_sockets( MiniServerSockArray * out )
CLIENTONLY( shutdown( ssdpReqSock, SD_BOTH ); ) CLIENTONLY( shutdown( ssdpReqSock, SD_BOTH ); )
UpnpCloseSocket( ssdpSock ); UpnpCloseSocket( ssdpSock );
CLIENTONLY( UpnpCloseSocket( ssdpReqSock ); ) CLIENTONLY( UpnpCloseSocket( ssdpReqSock ); )
return UPNP_E_SOCKET_ERROR; return UPNP_E_SOCKET_ERROR;
} }
@@ -974,13 +968,11 @@ get_ssdp_sockets( MiniServerSockArray * out )
CLIENTONLY( shutdown( ssdpReqSock, SD_BOTH ); ) CLIENTONLY( shutdown( ssdpReqSock, SD_BOTH ); )
UpnpCloseSocket( ssdpSock ); UpnpCloseSocket( ssdpSock );
CLIENTONLY( UpnpCloseSocket( ssdpReqSock ); ) CLIENTONLY( UpnpCloseSocket( ssdpReqSock ); )
return UPNP_E_NETWORK_ERROR; return UPNP_E_NETWORK_ERROR;
} }
CLIENTONLY( out->ssdpReqSock = ssdpReqSock; ) CLIENTONLY( out->ssdpReqSock = ssdpReqSock; )
out->ssdpSock = ssdpSock; out->ssdpSock = ssdpSock;
return UPNP_E_SUCCESS; return UPNP_E_SUCCESS;
} }