summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CONTRIBUTORS2
-rw-r--r--HISTORY3
-rw-r--r--vdr.c24
3 files changed, 19 insertions, 10 deletions
diff --git a/CONTRIBUTORS b/CONTRIBUTORS
index 8490ca33..d56459d8 100644
--- a/CONTRIBUTORS
+++ b/CONTRIBUTORS
@@ -616,6 +616,8 @@ Helmut Auer <vdr@helmutauer.de>
--genindex
for suggesting to disable EPG processing for a while after a CLRE command
for suggesting to read the epg.data file in a separate thread
+ for some improvements to allowing the parameters PATH and NAME to the --dirnames
+ command line option to be left empty to use the default values if only ENC shall be set
Jeremy Hall <jhall@UU.NET>
for fixing an incomplete initialization of the filter parameters in eit.c
diff --git a/HISTORY b/HISTORY
index c1cd4d67..2f955ec4 100644
--- a/HISTORY
+++ b/HISTORY
@@ -7741,7 +7741,8 @@ Video Disk Recorder Revision History
"lib$$i-*.so" (previously only "libvdr-*.so") and also descends into subdirectories
of the plugin source.
- The parameters PATH and NAME to the --dirnames command line option may now be left
- empty to use the default values if only ENC shall be set.
+ empty to use the default values if only ENC shall be set (thanks to Helmut Auer for
+ some improvements to this change).
- Fixed a possible "Channel not available" if a recording starts on a system with
bonded devices (thanks to Siegfried Bosch).
- Fixed stopping an ongoing recording on a system with bonded devices, if a timer with
diff --git a/vdr.c b/vdr.c
index 432712ba..742d1699 100644
--- a/vdr.c
+++ b/vdr.c
@@ -22,7 +22,7 @@
*
* The project's page is at http://www.tvdr.de
*
- * $Id: vdr.c 2.54 2013/03/12 09:23:33 kls Exp $
+ * $Id: vdr.c 2.55 2013/03/12 13:27:40 kls Exp $
*/
#include <getopt.h>
@@ -287,13 +287,16 @@ int main(int argc, char *argv[])
return 2;
}
DirectoryPathMax = n;
+ if (!*s)
+ break;
+ if (*s != ',') {
+ fprintf(stderr, "vdr: invalid delimiter: %s\n", optarg);
+ return 2;
+ }
}
+ s++;
if (!*s)
break;
- if (*s++ != ',') {
- fprintf(stderr, "vdr: invalid delimiter: %s\n", optarg);
- return 2;
- }
if (*s != ',') {
int n = strtol(s, &s, 10);
if (n <= 0 || n > NAME_MAX) { // NAME_MAX excludes the terminating 0
@@ -301,13 +304,16 @@ int main(int argc, char *argv[])
return 2;
}
DirectoryNameMax = n;
+ if (!*s)
+ break;
+ if (*s != ',') {
+ fprintf(stderr, "vdr: invalid delimiter: %s\n", optarg);
+ return 2;
+ }
}
+ s++;
if (!*s)
break;
- if (*s++ != ',') {
- fprintf(stderr, "vdr: invalid delimiter: %s\n", optarg);
- return 2;
- }
int n = strtol(s, &s, 10);
if (n != 0 && n != 1) {
fprintf(stderr, "vdr: invalid directory encoding: %s\n", optarg);