Hello Rémi,

given that djmount didn't see any changes (judging from
https://sourceforge.net/p/djmount/code/HEAD/tree/) I wonder if the
project is still alive. The interest I have here is that I like to drop
libupnp 1.6 from Debian and so the djmount package must either be
dropped or converted to libupnp 1.8. As a conversion is non-trivial I
wonder if it is worth the effort.

See https://bugs.debian.org/884243 for some details. Another hint that
removing might be the right alternative is that the Debian maintainer of
djmount (implicitly on Cc via the bug address) didn't react on this bug
yet.

I started working on djmount, two patches are already finished (but only
build tested) and I started to change the list handling as libupnp 1.8
doesn't provide the implementation of linked lists any more. The two
finished patches can be found in the attachment.

It would be great do get some feed back about your actual interest on
djmount.

Best regards
Uwe
From: Uwe Kleine-König <u...@kleine-koenig.org>
Subject: [PATCH] Adapt for Debian-specific API changes

Debian's libupnp 1.6 differs in some structs from upstream (*sigh*): While 
struct Upnp_Event_Subscribe::PublisherUrl, struct
Upnp_State_Var_Complete::CtrlUrl and struct Upnp_Event_Subscribe::PublisherUrl
are char arrays (with a fixed size) they are UpnpStrings in Debian.

Instead of adding another Debian specific patch or some ifdeffery use the
macros that are provided by libupnp 1.6 for compatibility with libupnp 1.8 as
these are fixed accordingly (since 1:1.6.24-4).

The version check for libupnp is adapted accordingly to >= 1.6.23 which is the
first upstream version shipping the functions. Note that for a complete fix,
the in-tree-copy of libupnp needs a version bump, too.

--- a/configure.ac
+++ b/configure.ac
@@ -250,19 +250,19 @@
 AC_MSG_CHECKING([whether to use external libupnp])
 AC_ARG_WITH([external-libupnp], 
 	AS_HELP_STRING([--with-external-libupnp],
-	[use external libupnp library (at least 1.3.1) @<:@default = use internal bundled library@:>@]))
+	[use external libupnp library (at least 1.6.23) @<:@default = use internal bundled library@:>@]))
 
 if test x"$with_external_libupnp" = xyes; then
 	AC_MSG_RESULT([yes])
 	# Find the library. This macro handles the LIBUPNP_CFLAGS and _LIBS,
 	# the --with-libupnp-prefix arg, and pkg-config (if any).
 	RT_PACKAGE_FIND([libupnp], [], [-lupnp -lthreadutil -lixml], 
-			[libupnp >= 1.3.1], 
+			[libupnp >= 1.6.23],
 	[
 #	include <upnp/ixml.h>
 #	include <upnp/upnp.h>
 #	include <upnp/upnptools.h>
-#if (!defined UPNP_VERSION) || (UPNP_VERSION < 10301)
+#if (!defined UPNP_VERSION) || (UPNP_VERSION < 10623)
 #	error libupnp version is too old
 #endif
 	],
--- a/djmount/device_list.c
+++ b/djmount/device_list.c
@@ -624,11 +624,11 @@
 		} else {
 			Log_Printf (LOG_DEBUG, 
 				    "Received Event Renewal for eventURL %s", 
-				    NN(e->PublisherUrl));
+				    NN(UpnpEventSubscribe_get_PublisherUrl_cstr(e)));
 
 			ithread_mutex_lock (&DeviceListMutex);
 
-			Service* const serv = GetService (e->PublisherUrl,
+			Service* const serv = GetService (UpnpEventSubscribe_get_PublisherUrl_cstr(e),
 							  FROM_EVENT_URL);
 			if (serv) {
 				if (event_type == 
@@ -649,11 +649,11 @@
 			(struct Upnp_Event_Subscribe*) event;
 
 		Log_Printf (LOG_DEBUG, "Renewing subscription for eventURL %s",
-			    NN(e->PublisherUrl));
+			    NN(UpnpEventSubscribe_get_PublisherUrl_cstr(e)));
      
 		ithread_mutex_lock (&DeviceListMutex);
       
-		Service* const serv = GetService (e->PublisherUrl, 
+		Service* const serv = GetService (UpnpEventSubscribe_get_PublisherUrl_cstr(e),
 						  FROM_EVENT_URL);
 		if (serv) 
 			Service_SubscribeEventURL (serv);
--- a/djmount/upnp_util.c
+++ b/djmount/upnp_util.c
@@ -158,7 +158,7 @@
 				(struct Upnp_Action_Complete*) event;
 			
 			tpr (&p, "ErrCode     =  %d\n", e->ErrCode);
-			tpr (&p, "CtrlUrl     =  %s\n", NN(e->CtrlUrl));
+			tpr (&p, "CtrlUrl     =  %s\n", NN(UpnpActionComplete_get_CtrlUrl_cstr(e)));
 			tpr (&p, "ActRequest  =  %s\n",
 			     XMLUtil_GetDocumentString (tmp_ctx, 
 							e->ActionRequest));
@@ -188,7 +188,7 @@
 				(struct Upnp_State_Var_Complete*) event;
 			
 			tpr (&p, "ErrCode     =  %d\n", e->ErrCode);
-			tpr (&p, "CtrlUrl     =  %s\n", NN(e->CtrlUrl));
+			tpr (&p, "CtrlUrl     =  %s\n", NN(UpnpActionComplete_get_CtrlUrl_cstr(e)));
 			tpr (&p, "StateVarName=  %s\n", NN(e->StateVarName));
 			tpr (&p, "CurrentVal  =  %s\n", NN(e->CurrentVal));
 		}
@@ -240,7 +240,7 @@
 			
 			tpr (&p, "ErrCode     =  %d\n", e->ErrCode);
 			tpr (&p, "SID         =  %s\n", NN(e->Sid));
-			tpr (&p, "PublisherURL=  %s\n", NN(e->PublisherUrl));
+			tpr (&p, "PublisherURL=  %s\n", NN(UpnpEventSubscribe_get_PublisherUrl_cstr(e)));
 			tpr (&p, "TimeOut     =  %d\n", e->TimeOut);
 		}
 		break;
@@ -253,7 +253,7 @@
 			
 			tpr (&p, "ErrCode     =  %d\n", e->ErrCode);
 			tpr (&p, "SID         =  %s\n", NN(e->Sid));
-			tpr (&p, "PublisherURL=  %s\n", NN(e->PublisherUrl));
+			tpr (&p, "PublisherURL=  %s\n", NN(UpnpEventSubscribe_get_PublisherUrl_cstr(e)));
 			tpr (&p, "TimeOut     =  %d\n", e->TimeOut);
 		}
 		break;
From: Uwe Kleine-König <u...@kleine-koenig.org>
Subject: Drop "upnp/" from include paths

Programs linking with libupnp are expected to use

	-I${libupnp_prefix}/upnp

as provided by

	pkg-config --cflags libupnp

. So to make use of a libupnp installation in a non-default location, the
include files must be referenced without the "upnp/"-prefix.

--- a/djmount/xml_util.c
+++ b/djmount/xml_util.c
@@ -30,7 +30,7 @@
 #include "talloc_util.h"
 #include "string_util.h"
 
-#include <upnp/ixml.h>
+#include <ixml.h>
 #include <stdlib.h>	
 
 
--- a/configure.ac
+++ b/configure.ac
@@ -259,9 +259,9 @@
 	RT_PACKAGE_FIND([libupnp], [], [-lupnp -lthreadutil -lixml], 
 			[libupnp >= 1.3.1], 
 	[
-#	include <upnp/ixml.h>
-#	include <upnp/upnp.h>
-#	include <upnp/upnptools.h>
+#	include <ixml.h>
+#	include <upnp.h>
+#	include <upnptools.h>
 #if (!defined UPNP_VERSION) || (UPNP_VERSION < 10301)
 #	error libupnp version is too old
 #endif
--- a/djmount/charset.c
+++ b/djmount/charset.c
@@ -44,7 +44,7 @@
 
 #ifdef HAVE_ICONV
 #	include <iconv.h>
-#	include <upnp/ithread.h>
+#	include <ithread.h>
 #else
 #	include "charset_internal.h"
 #endif
--- a/djmount/content_dir.c
+++ b/djmount/content_dir.c
@@ -30,7 +30,7 @@
 #include "xml_util.h"
 #include <string.h>
 #include <inttypes.h>
-#include <upnp/upnp.h>
+#include <upnp.h>
 #include "service_p.h"
 #include "cache.h"
 #include "log.h"
--- a/djmount/djfs_p.h
+++ b/djmount/djfs_p.h
@@ -29,7 +29,7 @@
 #include "vfs_p.h"
 
 #include "ptr_array.h"
-#include <upnp/ithread.h>
+#include <ithread.h>
 
 
 /******************************************************************************
--- a/djmount/xml_util.h
+++ b/djmount/xml_util.h
@@ -28,7 +28,7 @@
 
 #include <stdbool.h>
 #include <inttypes.h>
-#include <upnp/ixml.h>
+#include <ixml.h>
 
 
 #ifdef __cplusplus
--- a/djmount/content_dir.h
+++ b/djmount/content_dir.h
@@ -31,8 +31,8 @@
 
 #include <stdint.h>
 #include <stdbool.h>
-#include <upnp/ixml.h>
-#include <upnp/ithread.h>
+#include <ixml.h>
+#include <ithread.h>
 
 #include "service.h"
 #include "ptr_array.h"
--- a/djmount/device.h
+++ b/djmount/device.h
@@ -25,8 +25,8 @@
 #define DEVICE_INCLUDED 1
 
 
-#include <upnp/upnp.h>
-#include <upnp/ixml.h>
+#include <upnp.h>
+#include <ixml.h>
 
 #include "service.h"
 
--- a/djmount/content_dir_p.h
+++ b/djmount/content_dir_p.h
@@ -26,7 +26,7 @@
 
 #include "content_dir.h"
 #include "service_p.h"
-#include <upnp/ithread.h>
+#include <ithread.h>
 
 
 /******************************************************************************
--- a/djmount/device.c
+++ b/djmount/device.c
@@ -37,8 +37,8 @@
 
 #include <time.h>
 #include <stdbool.h>
-#include <upnp/upnp.h>
-#include <upnp/LinkedList.h>
+#include <upnp.h>
+#include <LinkedList.h>
 
 
 
--- a/djmount/file_buffer.c
+++ b/djmount/file_buffer.c
@@ -34,8 +34,8 @@
 #include <errno.h>
 #include <inttypes.h>	// Import intmax_t and PRIdMAX
 
-#include <upnp/upnp.h>
-#include <upnp/upnptools.h>
+#include <upnp.h>
+#include <upnptools.h>
 
 
 // Same definition as in "libupnp/upnp/src/inc/httpreadwrite.h"
--- a/djmount/object.c
+++ b/djmount/object.c
@@ -30,7 +30,7 @@
 #include <string.h>
 #include <stdio.h>
 #include <stdbool.h>
-#include <upnp/ithread.h>
+#include <ithread.h>
 
 #include "log.h"
 #include "talloc_util.h"
--- a/djmount/device_list.c
+++ b/djmount/device_list.c
@@ -36,10 +36,10 @@
 #include "talloc_util.h"
 
 #include <stdbool.h>
-#include <upnp/upnp.h>
-#include <upnp/ithread.h>
-#include <upnp/upnptools.h>
-#include <upnp/LinkedList.h>
+#include <upnp.h>
+#include <ithread.h>
+#include <upnptools.h>
+#include <LinkedList.h>
 
 
 
--- a/djmount/test_upnp.c
+++ b/djmount/test_upnp.c
@@ -40,8 +40,8 @@
 #include <unistd.h>
 #include <ctype.h>
 
-#include <upnp/upnp.h>
-#include <upnp/upnptools.h>
+#include <upnp.h>
+#include <upnptools.h>
 
 #ifdef HAVE_LIBREADLINE
 #	if defined(HAVE_READLINE_READLINE_H)
--- a/djmount/upnp_util.h
+++ b/djmount/upnp_util.h
@@ -27,8 +27,8 @@
 #define UPNP_UTIL_H_INCLUDED
 
 
-#include <upnp/upnptools.h>
-#include <upnp/upnp.h>
+#include <upnptools.h>
+#include <upnp.h>
 
 
 #ifdef __cplusplus
--- a/djmount/device_list.h
+++ b/djmount/device_list.h
@@ -26,7 +26,7 @@
 #define DEVICE_LIST_INCLUDED 1
 
 
-#include <upnp/ixml.h>
+#include <ixml.h>
 
 #include "string_util.h"	// import StringPair
 #include "service.h"
--- a/djmount/didl_object.h
+++ b/djmount/didl_object.h
@@ -30,7 +30,7 @@
 #endif
 
 #include <stdbool.h>
-#include <upnp/ixml.h>
+#include <ixml.h>
 
 
 
--- a/djmount/log.c
+++ b/djmount/log.c
@@ -25,7 +25,7 @@
 #include "log.h"
 #include <stdarg.h>
 #include <stdio.h>
-#include <upnp/ithread.h>
+#include <ithread.h>
 #include <stdbool.h>
 
 
--- a/djmount/service.c
+++ b/djmount/service.c
@@ -34,8 +34,8 @@
 #include "upnp_util.h"
 #include "talloc_util.h"
 
-#include <upnp/upnp.h>
-#include <upnp/upnptools.h>
+#include <upnp.h>
+#include <upnptools.h>
 
 #include "service_p.h"
 
--- a/djmount/service.h
+++ b/djmount/service.h
@@ -26,8 +26,8 @@
 
 #include <stdarg.h>
 
-#include <upnp/upnp.h>
-#include <upnp/ixml.h>
+#include <upnp.h>
+#include <ixml.h>
 
 #include "string_util.h"	// for StringPair
 #include "object.h"
--- a/djmount/service_p.h
+++ b/djmount/service_p.h
@@ -28,7 +28,7 @@
 #include "service.h"
 #include "object_p.h"
 
-#include <upnp/LinkedList.h>
+#include <LinkedList.h>
 
 
 /******************************************************************************

Attachment: signature.asc
Description: PGP signature

Reply via email to