1
0
mirror of https://github.com/VDR4Arch/vdr.git synced 2023-10-10 13:36:52 +02:00

Fixed handling extra blanks in plugin command lines

This commit is contained in:
Klaus Schmidinger 2003-08-30 14:52:58 +02:00
parent 7a64aeec74
commit cf45c66062
2 changed files with 5 additions and 4 deletions

View File

@ -2344,3 +2344,4 @@ Video Disk Recorder Revision History
- Fixed displaying still pictures, now using the driver's VIDEO_STILLPICTURE call - Fixed displaying still pictures, now using the driver's VIDEO_STILLPICTURE call
directly (thanks to Oliver Endriss). This also improves navigating through DVD directly (thanks to Oliver Endriss). This also improves navigating through DVD
menus with the DVD plugin. menus with the DVD plugin.
- Fixed handling extra blanks in plugin command lines.

View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and * See the main source file 'vdr.c' for copyright information and
* how to reach the author. * how to reach the author.
* *
* $Id: plugin.c 1.9 2003/05/09 15:01:26 kls Exp $ * $Id: plugin.c 1.10 2003/08/30 14:52:58 kls Exp $
*/ */
#include "plugin.h" #include "plugin.h"
@ -170,7 +170,7 @@ bool cDll::Load(bool Log)
if (plugin && args) { if (plugin && args) {
int argc = 0; int argc = 0;
char *argv[MAXPLUGINARGS]; char *argv[MAXPLUGINARGS];
char *p = args; char *p = skipspace(stripspace(args));
char *q = NULL; char *q = NULL;
bool done = false; bool done = false;
while (!done) { while (!done) {
@ -205,7 +205,7 @@ bool cDll::Load(bool Log)
} }
} }
if (!done) if (!done)
p++; p = *p ? p + 1 : skipspace(p + 1);
} }
} }
argv[argc] = NULL; argv[argc] = NULL;
@ -278,7 +278,7 @@ void cPluginManager::AddPlugin(const char *Args)
} }
return; return;
} }
char *s = strdup(Args); char *s = strdup(skipspace(Args));
char *p = strchr(s, ' '); char *p = strchr(s, ' ');
if (p) if (p)
*p = 0; *p = 0;