summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'media-video/noad/files/patches-0.6.0/delete-while-scanning.diff')
-rw-r--r--media-video/noad/files/patches-0.6.0/delete-while-scanning.diff23
1 files changed, 23 insertions, 0 deletions
diff --git a/media-video/noad/files/patches-0.6.0/delete-while-scanning.diff b/media-video/noad/files/patches-0.6.0/delete-while-scanning.diff
new file mode 100644
index 000000000000..0de5a8f2c929
--- /dev/null
+++ b/media-video/noad/files/patches-0.6.0/delete-while-scanning.diff
@@ -0,0 +1,23 @@
+diff -ru noad-0.6.0-orig/tools.cpp noad-0.6.0/tools.cpp
+--- noad-0.6.0-orig/tools.cpp 2006-09-22 14:33:32.000000000 +0200
++++ noad-0.6.0/tools.cpp 2006-10-06 10:09:35.000000000 +0200
+@@ -17,6 +17,8 @@
+ #include <time.h>
+ #include <unistd.h>
+ #include <execinfo.h>
++#include <sys/types.h>
++#include <signal.h>
+
+ extern int SysLogLevel;
+
+@@ -961,6 +963,10 @@
+ esyslog(LOG_ERR, "ERROR: frame larger than buffer (%d > %d)", Length, Max);
+ Length = Max;
+ }
++ if (f == -1) {
++ esyslog(LOG_ERR, "ERROR: cannot open video-file (recording deleted while scanning or bad index-file)");
++ kill(getpid(),SIGTERM);
++ }
+ //int r = safe_read(f, b, Length);
+ int r = read( f,b,Length);
+ if (r < 0)