Hi, The diff below updates net/libupnp to version 1.6.17.
Patches for ushare stolen from Arch Linux; aMule, instead, does not need any patch. Comments? OKs? Index: libupnp/Makefile =================================================================== RCS file: /cvs/ports/net/libupnp/Makefile,v retrieving revision 1.2 diff -u -p -r1.2 Makefile --- libupnp/Makefile 30 Mar 2012 06:48:01 -0000 1.2 +++ libupnp/Makefile 3 Nov 2012 17:11:25 -0000 @@ -2,15 +2,14 @@ COMMENT= Universal Plug and Play SDK -DISTNAME= libupnp-1.6.6 +DISTNAME= libupnp-1.6.17 EXTRACT_SUFX= .tar.bz2 -REVISION= 0 CATEGORIES= net devel -SHARED_LIBS += ixml 0.0 # .2.4 -SHARED_LIBS += threadutil 0.0 # .4.3 -SHARED_LIBS += upnp 0.0 # .3.5 +SHARED_LIBS += ixml 0.1 # .2.7 +SHARED_LIBS += threadutil 1.0 # .6.2 +SHARED_LIBS += upnp 1.0 # .9.1 HOMEPAGE= http://pupnp.sourceforge.net/ @@ -21,6 +20,8 @@ PERMIT_DISTFILES_CDROM= Yes PERMIT_DISTFILES_FTP= Yes MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=pupnp/} + +WANTLIB = pthread USE_LIBTOOL= Yes Index: libupnp/distinfo =================================================================== RCS file: /cvs/ports/net/libupnp/distinfo,v retrieving revision 1.1.1.1 diff -u -p -r1.1.1.1 distinfo --- libupnp/distinfo 22 Mar 2010 22:25:50 -0000 1.1.1.1 +++ libupnp/distinfo 3 Nov 2012 17:11:25 -0000 @@ -1,5 +1,2 @@ -MD5 (libupnp-1.6.6.tar.bz2) = iRjc90KM0RnQyCdXZf8oMw== -RMD160 (libupnp-1.6.6.tar.bz2) = Jf8DkHk8+kjMoyozW01jMoOx/mQ= -SHA1 (libupnp-1.6.6.tar.bz2) = JMLDSctS7T1iEh+9riBcjZ3A9fo= -SHA256 (libupnp-1.6.6.tar.bz2) = WNfKvsKyHIDiik5QkLupSoSajwJFDibBuYUxijawu7M= -SIZE (libupnp-1.6.6.tar.bz2) = 1146854 +SHA256 (libupnp-1.6.17.tar.bz2) = ouDZqfGntni82+92EK3siVpsjLj5Zw1eH8ljz1HN0hk= +SIZE (libupnp-1.6.17.tar.bz2) = 1187499 Index: libupnp/patches/patch-threadutil_inc_ithread_h =================================================================== RCS file: libupnp/patches/patch-threadutil_inc_ithread_h diff -N libupnp/patches/patch-threadutil_inc_ithread_h --- libupnp/patches/patch-threadutil_inc_ithread_h 22 Mar 2010 22:25:50 -0000 1.1.1.1 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,12 +0,0 @@ -$OpenBSD: patch-threadutil_inc_ithread_h,v 1.1.1.1 2010/03/22 22:25:50 ajacoutot Exp $ ---- threadutil/inc/ithread.h.orig Tue Feb 9 12:17:14 2010 -+++ threadutil/inc/ithread.h Tue Feb 9 12:17:42 2010 -@@ -41,7 +41,7 @@ extern "C" { - #include <unistd.h> - #endif - --#ifdef __FreeBSD__ -+#if defined(__FreeBSD__) || defined(__OpenBSD__) - #define PTHREAD_MUTEX_RECURSIVE_NP PTHREAD_MUTEX_RECURSIVE - #endif - Index: libupnp/patches/patch-threadutil_src_ThreadPool_c =================================================================== RCS file: libupnp/patches/patch-threadutil_src_ThreadPool_c diff -N libupnp/patches/patch-threadutil_src_ThreadPool_c --- libupnp/patches/patch-threadutil_src_ThreadPool_c 22 Mar 2010 22:25:50 -0000 1.1.1.1 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,21 +0,0 @@ -$OpenBSD: patch-threadutil_src_ThreadPool_c,v 1.1.1.1 2010/03/22 22:25:50 ajacoutot Exp $ ---- threadutil/src/ThreadPool.c.orig Tue Feb 9 12:15:59 2010 -+++ threadutil/src/ThreadPool.c Tue Feb 9 12:17:04 2010 -@@ -389,7 +389,7 @@ static void SetSeed() - gettimeofday(&t, NULL); - #if defined(WIN32) - srand( ( unsigned int )t.tv_usec + (unsigned int)ithread_get_current_thread_id().p ); --#elif defined(__FreeBSD__) || defined(__OSX__) || defined(__APPLE__) -+#elif defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__OSX__) || defined(__APPLE__) - srand( ( unsigned int )t.tv_usec + (unsigned int)ithread_get_current_thread_id() ); - #elif defined(__linux__) || defined(__sun) - srand( ( unsigned int )t.tv_usec + ithread_get_current_thread_id() ); -@@ -1514,7 +1514,7 @@ void ThreadPoolPrintStats(ThreadPoolStats *stats) - return; - } - --#ifdef __FreeBSD__ -+#if defined(__FreeBSD__) || defined(__OpenBSD__) - printf("ThreadPoolStats at Time: %d\n", StatsTime(NULL)); - #else /* __FreeBSD__ */ - printf("ThreadPoolStats at Time: %ld\n", StatsTime(NULL)); Index: libupnp/patches/patch-upnp_src_api_upnpapi_c =================================================================== RCS file: libupnp/patches/patch-upnp_src_api_upnpapi_c diff -N libupnp/patches/patch-upnp_src_api_upnpapi_c --- libupnp/patches/patch-upnp_src_api_upnpapi_c 22 Mar 2010 22:25:50 -0000 1.1.1.1 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,16 +0,0 @@ -$OpenBSD: patch-upnp_src_api_upnpapi_c,v 1.1.1.1 2010/03/22 22:25:50 ajacoutot Exp $ ---- upnp/src/api/upnpapi.c.orig Tue Feb 9 12:20:34 2010 -+++ upnp/src/api/upnpapi.c Tue Feb 9 12:20:57 2010 -@@ -44,11 +44,11 @@ - - #ifndef WIN32 - #include <arpa/inet.h> -+ #include <sys/socket.h> - #include <net/if.h> - #include <netinet/in.h> - #include <sys/ioctl.h> - #include <sys/param.h> -- #include <sys/socket.h> - #include <sys/types.h> - #include <sys/utsname.h> - Index: libupnp/patches/patch-upnp_src_inc_config_h =================================================================== RCS file: /cvs/ports/net/libupnp/patches/patch-upnp_src_inc_config_h,v retrieving revision 1.1 diff -u -p -r1.1 patch-upnp_src_inc_config_h --- libupnp/patches/patch-upnp_src_inc_config_h 30 Mar 2012 06:48:01 -0000 1.1 +++ libupnp/patches/patch-upnp_src_inc_config_h 3 Nov 2012 17:11:25 -0000 @@ -2,14 +2,14 @@ $OpenBSD: patch-upnp_src_inc_config_h,v http://lifewithushare.blogspot.fr/2008/01/simultaneous-streaming-to-multiple.html ---- upnp/src/inc/config.h.orig Fri Mar 30 08:44:07 2012 -+++ upnp/src/inc/config.h Fri Mar 30 08:44:18 2012 -@@ -78,7 +78,7 @@ +--- upnp/src/inc/config.h.orig Fri Nov 2 15:18:39 2012 ++++ upnp/src/inc/config.h Fri Nov 2 15:18:54 2012 +@@ -90,7 +90,7 @@ + * + * @{ */ - - //@{ -#define MIN_THREADS 2 +#define MIN_THREADS 6 - //@} + /* @} */ + - /** @name MAX_THREADS Index: libupnp/patches/patch-upnp_src_ssdp_ssdp_server_c =================================================================== RCS file: libupnp/patches/patch-upnp_src_ssdp_ssdp_server_c diff -N libupnp/patches/patch-upnp_src_ssdp_ssdp_server_c --- libupnp/patches/patch-upnp_src_ssdp_ssdp_server_c 22 Mar 2010 22:25:50 -0000 1.1.1.1 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,12 +0,0 @@ -$OpenBSD: patch-upnp_src_ssdp_ssdp_server_c,v 1.1.1.1 2010/03/22 22:25:50 ajacoutot Exp $ ---- upnp/src/ssdp/ssdp_server.c.orig Tue Feb 9 12:17:50 2010 -+++ upnp/src/ssdp/ssdp_server.c Tue Feb 9 12:18:15 2010 -@@ -915,7 +915,7 @@ get_ssdp_sockets( MiniServerSockArray * out ) - return UPNP_E_SOCKET_ERROR; - } - --#if defined(__FreeBSD__) || defined(__OSX__) || defined(__APPLE__) -+#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__OSX__) || defined(__APPLE__) - ret = setsockopt( ssdpSock, SOL_SOCKET, SO_REUSEPORT, - (char *)&onOff, sizeof (onOff) ); - if ( ret == -1 ) { Index: libupnp/pkg/PLIST =================================================================== RCS file: /cvs/ports/net/libupnp/pkg/PLIST,v retrieving revision 1.1.1.1 diff -u -p -r1.1.1.1 PLIST --- libupnp/pkg/PLIST 22 Mar 2010 22:25:50 -0000 1.1.1.1 +++ libupnp/pkg/PLIST 3 Nov 2012 17:11:25 -0000 @@ -5,8 +5,15 @@ include/upnp/FreeList.h include/upnp/LinkedList.h include/upnp/ThreadPool.h include/upnp/TimerThread.h +include/upnp/UpnpGlobal.h +include/upnp/UpnpInet.h +include/upnp/UpnpIntTypes.h +include/upnp/UpnpStdInt.h +include/upnp/UpnpString.h +include/upnp/UpnpUniStd.h include/upnp/ithread.h include/upnp/ixml.h +include/upnp/ixmldebug.h include/upnp/upnp.h include/upnp/upnpconfig.h include/upnp/upnpdebug.h Index: ushare/Makefile =================================================================== RCS file: /cvs/ports/net/ushare/Makefile,v retrieving revision 1.11 diff -u -p -r1.11 Makefile --- ushare/Makefile 30 Mar 2012 06:47:40 -0000 1.11 +++ ushare/Makefile 3 Nov 2012 17:11:28 -0000 @@ -3,7 +3,7 @@ COMMENT= UPnP A/V media server DISTNAME= ushare-1.1a -REVISION= 6 +REVISION= 7 EXTRACT_SUFX= .tar.bz2 CATEGORIES= net multimedia @@ -16,13 +16,13 @@ PERMIT_PACKAGE_FTP= Yes PERMIT_DISTFILES_CDROM= Yes PERMIT_DISTFILES_FTP= Yes -WANTLIB += c pthread ixml threadutil upnp +WANTLIB += c pthread ixml threadutil>=1 upnp>=1 MASTER_SITES= ${HOMEPAGE}releases/ MODULES= devel/gettext -LIB_DEPENDS= net/libupnp +LIB_DEPENDS= net/libupnp>=1.6.17 USE_GMAKE= Yes NO_REGRESS= Yes Index: ushare/patches/patch-configure =================================================================== RCS file: /cvs/ports/net/ushare/patches/patch-configure,v retrieving revision 1.1.1.1 diff -u -p -r1.1.1.1 patch-configure --- ushare/patches/patch-configure 22 Mar 2010 22:26:59 -0000 1.1.1.1 +++ ushare/patches/patch-configure 3 Nov 2012 17:11:28 -0000 @@ -1,14 +1,12 @@ $OpenBSD: patch-configure,v 1.1.1.1 2010/03/22 22:26:59 ajacoutot Exp $ ---- configure.orig Tue Feb 9 12:53:41 2010 -+++ configure Tue Feb 9 12:53:51 2010 -@@ -639,8 +639,8 @@ echolog "Checking for libixml ..." - check_lib upnp/ixml.h ixmlRelaxParser -lixml || die "Error, can't find libixml !" +--- configure.orig Sun Dec 9 14:03:36 2007 ++++ configure Fri Nov 2 16:07:09 2012 +@@ -642,7 +642,7 @@ echolog "Checking for libthreadutil ..." + check_lib upnp/ThreadPool.h ThreadPoolAdd "-lthreadutil -lpthread" || die "Error, can't find libthreadutil !" + add_extralibs -lpthread - echolog "Checking for libthreadutil ..." --check_lib upnp/ThreadPool.h ThreadPoolAdd "-lthreadutil -lpthread" || die "Error, can't find libthreadutil !" --add_extralibs -lpthread -+check_lib upnp/ThreadPool.h ThreadPoolAdd "-lthreadutil -pthread" || die "Error, can't find libthreadutil !" -+add_extralibs -pthread - - libupnp_min_version="1.4.2" +-libupnp_min_version="1.4.2" ++libupnp_min_version="1.6.17" echolog "Checking for libupnp >= $libupnp_min_version ..." + check_lib upnp/upnp.h UpnpSetMaxContentLength -lupnp || die "Error, can't find libupnp !" + check_lib_version libupnp $libupnp_min_version || die "Error, libupnp < $libupnp_min_version !" Index: ushare/patches/patch-src_cds_c =================================================================== RCS file: ushare/patches/patch-src_cds_c diff -N ushare/patches/patch-src_cds_c --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ ushare/patches/patch-src_cds_c 3 Nov 2012 17:11:28 -0000 @@ -0,0 +1,12 @@ +$OpenBSD$ +--- src/cds.c.orig Sun Dec 9 14:03:36 2007 ++++ src/cds.c Fri Nov 2 16:10:37 2012 +@@ -20,6 +20,8 @@ + */ + + #include <stdlib.h> ++#include <string.h> ++#include <stdio.h> + #include <upnp/upnp.h> + #include <upnp/upnptools.h> + Index: ushare/patches/patch-src_cms_c =================================================================== RCS file: ushare/patches/patch-src_cms_c diff -N ushare/patches/patch-src_cms_c --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ ushare/patches/patch-src_cms_c 3 Nov 2012 17:11:28 -0000 @@ -0,0 +1,11 @@ +$OpenBSD$ +--- src/cms.c.orig Sun Dec 9 14:03:36 2007 ++++ src/cms.c Fri Nov 2 16:10:37 2012 +@@ -20,6 +20,7 @@ + */ + + #include <stdlib.h> ++#include <string.h> + #include <upnp/upnp.h> + #include <upnp/upnptools.h> + Index: ushare/patches/patch-src_http_c =================================================================== RCS file: ushare/patches/patch-src_http_c diff -N ushare/patches/patch-src_http_c --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ ushare/patches/patch-src_http_c 3 Nov 2012 17:11:28 -0000 @@ -0,0 +1,85 @@ +$OpenBSD$ +--- src/http.c.orig Sun Dec 9 14:03:36 2007 ++++ src/http.c Fri Nov 2 16:13:38 2012 +@@ -25,6 +25,7 @@ + #include <errno.h> + #include <stdio.h> + #include <stdlib.h> ++#include <string.h> + #include <unistd.h> + #include <errno.h> + +@@ -77,8 +78,7 @@ set_info_file (struct File_Info *info, const size_t le + info->content_type = ixmlCloneDOMString (content_type); + } + +-static int +-http_get_info (const char *filename, struct File_Info *info) ++int http_get_info (const char *filename, struct File_Info *info) + { + extern struct ushare_t *ut; + struct upnp_entry_t *entry = NULL; +@@ -197,8 +197,7 @@ get_file_memory (const char *fullpath, const char *des + return ((UpnpWebFileHandle) file); + } + +-static UpnpWebFileHandle +-http_open (const char *filename, enum UpnpOpenFileMode mode) ++UpnpWebFileHandle http_open (const char *filename, enum UpnpOpenFileMode mode) + { + extern struct ushare_t *ut; + struct upnp_entry_t *entry = NULL; +@@ -251,8 +250,7 @@ http_open (const char *filename, enum UpnpOpenFileMode + return ((UpnpWebFileHandle) file); + } + +-static int +-http_read (UpnpWebFileHandle fh, char *buf, size_t buflen) ++int http_read (UpnpWebFileHandle fh, char *buf, size_t buflen) + { + struct web_file_t *file = (struct web_file_t *) fh; + ssize_t len = -1; +@@ -286,8 +284,7 @@ http_read (UpnpWebFileHandle fh, char *buf, size_t buf + return len; + } + +-static int +-http_write (UpnpWebFileHandle fh __attribute__((unused)), ++int http_write (UpnpWebFileHandle fh __attribute__((unused)), + char *buf __attribute__((unused)), + size_t buflen __attribute__((unused))) + { +@@ -296,8 +293,7 @@ http_write (UpnpWebFileHandle fh __attribute__((unused + return 0; + } + +-static int +-http_seek (UpnpWebFileHandle fh, off_t offset, int origin) ++int http_seek (UpnpWebFileHandle fh, off_t offset, int origin) + { + struct web_file_t *file = (struct web_file_t *) fh; + off_t newpos = -1; +@@ -371,8 +367,7 @@ http_seek (UpnpWebFileHandle fh, off_t offset, int ori + return 0; + } + +-static int +-http_close (UpnpWebFileHandle fh) ++int http_close (UpnpWebFileHandle fh) + { + struct web_file_t *file = (struct web_file_t *) fh; + +@@ -402,13 +397,3 @@ http_close (UpnpWebFileHandle fh) + + return 0; + } +- +-struct UpnpVirtualDirCallbacks virtual_dir_callbacks = +- { +- http_get_info, +- http_open, +- http_read, +- http_write, +- http_seek, +- http_close +- }; Index: ushare/patches/patch-src_http_h =================================================================== RCS file: ushare/patches/patch-src_http_h diff -N ushare/patches/patch-src_http_h --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ ushare/patches/patch-src_http_h 3 Nov 2012 17:11:28 -0000 @@ -0,0 +1,18 @@ +$OpenBSD$ +--- src/http.h.orig Sun Dec 9 14:03:36 2007 ++++ src/http.h Fri Nov 2 16:13:38 2012 +@@ -25,6 +25,13 @@ + #include <upnp/upnp.h> + #include <upnp/upnptools.h> + +-struct UpnpVirtualDirCallbacks virtual_dir_callbacks; ++int http_close (UpnpWebFileHandle fh); ++int http_write (UpnpWebFileHandle fh __attribute__((unused)), ++ char *buf __attribute__((unused)), ++ size_t buflen __attribute__((unused))); ++int http_seek (UpnpWebFileHandle fh, off_t offset, int origin); ++UpnpWebFileHandle http_open (const char *filename, enum UpnpOpenFileMode mode); ++int http_read (UpnpWebFileHandle fh, char *buf, size_t buflen); ++int http_get_info (const char *filename, struct File_Info *info); + + #endif /* _HTTP_H_ */ Index: ushare/patches/patch-src_mime_c =================================================================== RCS file: /cvs/ports/net/ushare/patches/patch-src_mime_c,v retrieving revision 1.1.1.1 diff -u -p -r1.1.1.1 patch-src_mime_c --- ushare/patches/patch-src_mime_c 22 Mar 2010 22:26:59 -0000 1.1.1.1 +++ ushare/patches/patch-src_mime_c 3 Nov 2012 17:11:28 -0000 @@ -1,7 +1,15 @@ $OpenBSD: patch-src_mime_c,v 1.1.1.1 2010/03/22 22:26:59 ajacoutot Exp $ ---- src/mime.c.orig Tue Feb 9 16:55:15 2010 -+++ src/mime.c Tue Feb 9 16:55:33 2010 -@@ -56,7 +56,7 @@ const struct mime_type_t MIME_Type_List[] = { +--- src/mime.c.orig Sun Dec 9 14:03:36 2007 ++++ src/mime.c Fri Nov 2 16:10:37 2012 +@@ -21,6 +21,7 @@ + + #include <stdlib.h> + #include <string.h> ++#include <stdio.h> + + #include "mime.h" + #include "ushare.h" +@@ -56,7 +57,7 @@ const struct mime_type_t MIME_Type_List[] = { { "mp4ps", UPNP_VIDEO, "http-get:*:video/x-nerodigital-ps:"}, { "ts", UPNP_VIDEO, "http-get:*:video/mpeg2:"}, { "ogm", UPNP_VIDEO, "http-get:*:video/mpeg:"}, Index: ushare/patches/patch-src_presentation_c =================================================================== RCS file: ushare/patches/patch-src_presentation_c diff -N ushare/patches/patch-src_presentation_c --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ ushare/patches/patch-src_presentation_c 3 Nov 2012 17:11:28 -0000 @@ -0,0 +1,12 @@ +$OpenBSD$ +--- src/presentation.c.orig Sun Dec 9 14:03:36 2007 ++++ src/presentation.c Fri Nov 2 16:10:37 2012 +@@ -19,6 +19,8 @@ + */ + + #include <stdlib.h> ++#include <string.h> ++#include <stdio.h> + + #if HAVE_LANGINFO_CODESET + # include <langinfo.h> Index: ushare/patches/patch-src_services_c =================================================================== RCS file: ushare/patches/patch-src_services_c diff -N ushare/patches/patch-src_services_c --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ ushare/patches/patch-src_services_c 3 Nov 2012 17:11:28 -0000 @@ -0,0 +1,11 @@ +$OpenBSD$ +--- src/services.c.orig Sun Dec 9 14:03:36 2007 ++++ src/services.c Fri Nov 2 16:10:37 2012 +@@ -20,6 +20,7 @@ + */ + + #include <stdlib.h> ++#include <string.h> + #include <upnp/upnp.h> + #include <upnp/upnptools.h> + Index: ushare/patches/patch-src_ushare_c =================================================================== RCS file: /cvs/ports/net/ushare/patches/patch-src_ushare_c,v retrieving revision 1.2 diff -u -p -r1.2 patch-src_ushare_c --- ushare/patches/patch-src_ushare_c 3 Dec 2011 13:59:37 -0000 1.2 +++ ushare/patches/patch-src_ushare_c 3 Nov 2012 17:11:28 -0000 @@ -1,6 +1,6 @@ $OpenBSD: patch-src_ushare_c,v 1.2 2011/12/03 13:59:37 ajacoutot Exp $ --- src/ushare.c.orig Sun Dec 9 14:03:36 2007 -+++ src/ushare.c Tue Feb 9 15:32:22 2010 ++++ src/ushare.c Fri Nov 2 16:13:38 2012 @@ -28,6 +28,10 @@ #include <errno.h> #include <getopt.h> @@ -23,3 +23,61 @@ $OpenBSD: patch-src_ushare_c,v 1.2 2011/ #include <upnp/upnp.h> #include <upnp/upnptools.h> +@@ -188,7 +188,7 @@ handle_action_request (struct Upnp_Action_Request *req + if (strcmp (request->DevUDN + 5, ut->udn)) + return; + +- ip = request->CtrlPtIPAddr.s_addr; ++ ip = (*(struct sockaddr_in*)&request->CtrlPtIPAddr).sin_addr.s_addr; + ip = ntohl (ip); + sprintf (val, "%d.%d.%d.%d", + (ip >> 24) & 0xFF, (ip >> 16) & 0xFF, (ip >> 8) & 0xFF, ip & 0xFF); +@@ -348,7 +348,47 @@ init_upnp (struct ushare_t *ut) + + UpnpEnableWebserver (TRUE); + +- res = UpnpSetVirtualDirCallbacks (&virtual_dir_callbacks); ++ res = UpnpVirtualDir_set_WriteCallback(http_write); ++ if (res != UPNP_E_SUCCESS) ++ { ++ log_error (_("Cannot set virtual directory callbacks\n")); ++ free (description); ++ return -1; ++ } ++ ++ res = UpnpVirtualDir_set_GetInfoCallback(http_get_info); ++ if (res != UPNP_E_SUCCESS) ++ { ++ log_error (_("Cannot set virtual directory callbacks\n")); ++ free (description); ++ return -1; ++ } ++ ++ res = UpnpVirtualDir_set_ReadCallback(http_read); ++ if (res != UPNP_E_SUCCESS) ++ { ++ log_error (_("Cannot set virtual directory callbacks\n")); ++ free (description); ++ return -1; ++ } ++ ++ res = UpnpVirtualDir_set_OpenCallback(http_open); ++ if (res != UPNP_E_SUCCESS) ++ { ++ log_error (_("Cannot set virtual directory callbacks\n")); ++ free (description); ++ return -1; ++ } ++ ++ res = UpnpVirtualDir_set_SeekCallback(http_seek); ++ if (res != UPNP_E_SUCCESS) ++ { ++ log_error (_("Cannot set virtual directory callbacks\n")); ++ free (description); ++ return -1; ++ } ++ ++ res = UpnpVirtualDir_set_CloseCallback(http_close); + if (res != UPNP_E_SUCCESS) + { + log_error (_("Cannot set virtual directory callbacks\n"));
libupnp-1.6.17-ushare.diff.gz
Description: Binary data