Package: mediatomb / 0.12.1-4+deb7u1

debug-mode-fix.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
Fix issue where mediatomb would not start in debug mode as a user that
doesn't have permissions in the working directory.
==========================================================================
--- a/tombupnp/upnp/src/api/upnpdebug.c
+++ b/tombupnp/upnp/src/api/upnpdebug.c
@@ -62,10 +62,10 @@
 static FILE *InfoFileHnd = NULL;
 
 //Name of the error file
-static const char *errFileName = "IUpnpErrFile.txt";
+static const char *errFileName = NULL;
 
 //Name of the info file
-static const char *infoFileName = "IUpnpInfoFile.txt";
+static const char *infoFileName = NULL;
 
 
 
@@ -113,6 +113,8 @@
     ithread_mutex_init( &GlobalDebugMutex, NULL );
 
     if( DEBUG_TARGET == 1 ) {
+        errFileName = tempnam(NULL,NULL);
+        infoFileName = tempnam(NULL,NULL);
         if( ( ErrFileHnd = fopen( errFileName, "a" ) ) == NULL )
             return -1;
         if( ( InfoFileHnd = fopen( infoFileName, "a" ) ) == NULL )