summaryrefslogtreecommitdiff
blob: bccdc9d5700d8cd37defcb0f03db6b4b27c74920 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#! /bin/sh /usr/share/dpatch/dpatch-run
## 10-rrprocstart.dpatch by  <marten.richter@freenet.de>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: Backport of a bug in rrproc

fix a message overrun when MediaMVP boots
The topic is documented in http://forum.loggytronic.com/index.php?topic=528.0

@DPATCH@
diff -u vdr-plugin-vompserver-new/vompclientrrproc.c vdr-plugin-vompserver-0.3.1/vompclientrrproc.c
--- vdr-plugin-vompserver-new/vompclientrrproc.c	2010-07-05 19:20:11.000000000 +0200
+++ vdr-plugin-vompserver-0.3.1/vompclientrrproc.c	2010-07-05 19:24:05.000000000 +0200
@@ -87,9 +87,25 @@
 
   if (req_queue.size() != 0)
   {
-    log->log("RRProc", Log::ERR, "threadMethod err 1");     
-    threadUnlock();
-    return;
+    log->log("RRProc", Log::ERR, "threadMethod startup with already queued packets");     
+    while (req_queue.size()) 
+    {
+      //log->log("RRProc", Log::DEBUG, "thread while");
+      req = req_queue.front();
+      req_queue.pop();
+      
+      threadUnlock(); // allow recvRequest to be queuing packets while we are working on this one
+      
+      if (!processPacket())
+      {
+        log->log("RRProc", Log::ERR, "processPacket exited with fail");     
+        return;
+      }
+      
+      threadLock();
+    } 
+    log->log("RRProc", Log::ERR, "threadMethod startup with already queued packets done.");     
+
   }
     
   while(1)