diff -ruN vdr-1/svdrp.c vdr-2/svdrp.c --- vdr-1/svdrp.c 2012-09-10 22:24:04.000000000 +0200 +++ vdr-2/svdrp.c 2012-09-10 22:26:12.000000000 +0200 @@ -407,6 +407,7 @@ length = BUFSIZ; cmdLine = MALLOC(char, length); lastActivity = 0; + executing = false; isyslog("SVDRP listening on port %d", Port); } @@ -1743,7 +1744,8 @@ } if (NewConnection) lastActivity = time(NULL); - while (file.Ready(false)) { + if (!executing) + while (file.Ready(false)) { unsigned char c; int r = safe_read(file, &c, 1); if (r > 0) { @@ -1754,7 +1756,9 @@ // make sure the string is terminated: cmdLine[numChars] = 0; // showtime! + executing = true; Execute(cmdLine); + executing = false; numChars = 0; if (length > BUFSIZ) { free(cmdLine); // let's not tie up too much memory diff -ruN vdr-1/svdrp.h vdr-2/svdrp.h --- vdr-1/svdrp.h 2012-09-10 22:24:04.000000000 +0200 +++ vdr-2/svdrp.h 2012-09-10 22:26:12.000000000 +0200 @@ -50,6 +50,7 @@ char *cmdLine; time_t lastActivity; static char *grabImageDir; + bool executing; void Close(bool SendReply = false, bool Timeout = false); bool Send(const char *s, int length = -1); void Reply(int Code, const char *fmt, ...) __attribute__ ((format (printf, 3, 4)));