Package: gerbera / 1.1.0+dfsg-3

0014_pupnp-1.8.3.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
Description: Fix FTBFS with pupnp 1.8.3
 In pupnp 1.8.3, the UpnpAddVirtualDir function and various callbacks
 gained some extra cookie parameters. These parameters can mostly be
 ignored to get the same behavior as before, so add some extra dummy
 parameters to do this.
Author: James Cowgill <jcowgill@debian.org>
Bug-Debian: https://bugs.debian.org/885025
Forwarded: not-needed
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- a/src/server.cc
+++ b/src/server.cc
@@ -167,7 +167,7 @@ void Server::upnp_init()
     }
 
     log_debug("Setting virtual dir to: %s\n", virtual_directory.c_str());
-    ret = UpnpAddVirtualDir(virtual_directory.c_str());
+    ret = UpnpAddVirtualDir(virtual_directory.c_str(), nullptr, nullptr);
     if (ret != UPNP_E_SUCCESS) {
         throw _UpnpException(ret, _("upnp_init: UpnpAddVirtualDir failed"));
     }
--- a/src/web_callbacks.cc
+++ b/src/web_callbacks.cc
@@ -104,7 +104,7 @@ static Ref<RequestHandler> create_reques
 /// \return 0 Success.
 /// \return -1 Error.
 
-static int web_get_info(IN const char* filename, OUT UpnpFileInfo* info)
+static int web_get_info(IN const char* filename, OUT UpnpFileInfo* info, IN const void* cookie)
 {
     try {
         Ref<RequestHandler> reqHandler = create_request_handler(filename);
@@ -138,7 +138,7 @@ static int web_get_info(IN const char* f
 /// \return NULL Error.
 
 static UpnpWebFileHandle web_open(IN const char* filename,
-    IN enum UpnpOpenFileMode mode)
+    IN enum UpnpOpenFileMode mode, IN const void* cookie)
 {
     log_debug("web_open(): %s\n", filename);
     String link = url_unescape((char*)filename);
@@ -171,7 +171,7 @@ static UpnpWebFileHandle web_open(IN con
 ///
 /// \return 0   EOF encountered.
 /// \return -1  Error.
-static int web_read(IN UpnpWebFileHandle f, OUT char* buf, IN size_t length)
+static int web_read(IN UpnpWebFileHandle f, OUT char* buf, IN size_t length, IN const void* cookie)
 {
     if (Server::getInstance()->getShutdownStatus())
         return -1;
@@ -194,7 +194,7 @@ static int web_read(IN UpnpWebFileHandle
 /// \return Actual number of bytes written.
 ///
 /// \warning Currently this function is not supported.
-static int web_write(IN UpnpWebFileHandle f, IN char* buf, IN size_t length)
+static int web_write(IN UpnpWebFileHandle f, IN char* buf, IN size_t length, IN const void* cookie)
 {
     return 0;
 }
@@ -212,7 +212,7 @@ static int web_write(IN UpnpWebFileHandl
 /// The seek operatoin itself is performed by the responsible IOHandler.
 ///
 /// \return 0 On success, non-zero value on error.
-static int web_seek(IN UpnpWebFileHandle f, IN off_t offset, IN int whence)
+static int web_seek(IN UpnpWebFileHandle f, IN off_t offset, IN int whence, IN const void* cookie)
 {
     try {
         auto* handler = (IOHandler*)f;
@@ -232,7 +232,7 @@ static int web_seek(IN UpnpWebFileHandle
 /// Same as fclose()
 ///
 /// \return 0 On success, non-zero on error.
-static int web_close(IN UpnpWebFileHandle f)
+static int web_close(IN UpnpWebFileHandle f, IN const void* cookie)
 {
 
     Ref<IOHandler> handler((IOHandler*)f);