r2593 - in vdr/vdr-plugin-radio/trunk/debian: . patches

Thomas Günther tom-guest at costa.debian.org
Wed Apr 26 22:10:48 UTC 2006


Author: tom-guest
Date: 2006-04-26 22:10:47 +0000 (Wed, 26 Apr 2006)
New Revision: 2593

Added:
   vdr/vdr-plugin-radio/trunk/debian/patches/02_radio-0.1.1-fix-DataDir.dpatch
Modified:
   vdr/vdr-plugin-radio/trunk/debian/changelog
   vdr/vdr-plugin-radio/trunk/debian/patches/00list
Log:
Added 02_radio-0.1.1-fix-DataDir.dpatch

Modified: vdr/vdr-plugin-radio/trunk/debian/changelog
===================================================================
--- vdr/vdr-plugin-radio/trunk/debian/changelog	2006-04-26 22:04:36 UTC (rev 2592)
+++ vdr/vdr-plugin-radio/trunk/debian/changelog	2006-04-26 22:10:47 UTC (rev 2593)
@@ -4,6 +4,7 @@
 
   * Thomas Günther <tom at toms-cafe.de>
     - Fixed debian/prerm
+    - Added 02_radio-0.1.1-fix-DataDir.dpatch
 
  -- Debian VDR Team <pkg-vdr-dvb-devel at lists.alioth.debian.org>  Wed, 26 Apr 2006 23:14:04 +0200
 

Modified: vdr/vdr-plugin-radio/trunk/debian/patches/00list
===================================================================
--- vdr/vdr-plugin-radio/trunk/debian/patches/00list	2006-04-26 22:04:36 UTC (rev 2592)
+++ vdr/vdr-plugin-radio/trunk/debian/patches/00list	2006-04-26 22:10:47 UTC (rev 2593)
@@ -1,3 +1,4 @@
 01_Makefile-fPIC-fix
+02_radio-0.1.1-fix-DataDir
 
 90_APIVERSION.dpatch

Added: vdr/vdr-plugin-radio/trunk/debian/patches/02_radio-0.1.1-fix-DataDir.dpatch
===================================================================
--- vdr/vdr-plugin-radio/trunk/debian/patches/02_radio-0.1.1-fix-DataDir.dpatch	2006-04-26 22:04:36 UTC (rev 2592)
+++ vdr/vdr-plugin-radio/trunk/debian/patches/02_radio-0.1.1-fix-DataDir.dpatch	2006-04-26 22:10:47 UTC (rev 2593)
@@ -0,0 +1,31 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 02_radio-0.1.1-fix-DataDir.dpatch by Thomas Günther <tom at toms-cafe.de>
+## http://toms-cafe.de/vdr/download/radio-0.1.1-fix-DataDir.diff
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Fixes crash if DataDir not exist.
+
+ at DPATCH@
+--- radio-0.1.1/radioaudio.c
++++ radio-0.1.1/radioaudio.c
+@@ -1157,6 +1157,20 @@
+     char *fname, *fpath;
+     FILE *fd;
+     int ind, lfd = 0;
++    struct stat sbuf;
++    if (stat(DataDir, &sbuf) != 0) {
++	dsyslog("vdr-radio: creating directory %s", DataDir);
++	if (mkdir(DataDir, ACCESSPERMS)) {
++	    esyslog("ERROR: Failed to create directory %s", DataDir);
++	    return;
++	    }
++	}
++    else {
++	if (!S_ISDIR(sbuf.st_mode)) {
++	    esyslog("ERROR: Failed to create directory %s: file exists but is not a directory", DataDir);
++	    return;
++	    }
++	}
+ 
+     time_t t = time(NULL);
+     ts = localtime(&t);




More information about the pkg-vdr-dvb-changes mailing list