All pastes #2073479 Raw Edit

Anonymous

public text v1 · immutable
#2073479 ·published 2011-06-02 01:23 UTC
rendered paste body
diff --git a/mythtv/programs/mythbackend/filetransfer.cpp b/mythtv/programs/mythbackend/filetransfer.cpp
index 0e2de25..7606638 100644
--- a/mythtv/programs/mythbackend/filetransfer.cpp
+++ b/mythtv/programs/mythbackend/filetransfer.cpp
@@ -6,8 +6,12 @@
 #include "RingBuffer.h"
 #include "util.h"
 #include "mythsocket.h"
+#include "mythverbose.h"
 #include "programinfo.h"
 
+#include <sys/types.h>
+#include <sys/syscall.h>
+
 FileTransfer::FileTransfer(QString &filename, MythSocket *remote,
                            bool usereadahead, int timeout_ms) :
     readthreadlive(true), readsLocked(false),
@@ -121,6 +125,9 @@ int FileTransfer::RequestBlock(int size)
     if (!readthreadlive || !rbuffer)
         return -1;
 
+    pid_t tid;
+    tid = syscall(SYS_gettid);
+    VERBOSE(VB_IMPORTANT, QString("Request thread tid = %1").arg(tid));
     int tot = 0;
     int ret = 0;
 
@@ -139,11 +146,13 @@ int FileTransfer::RequestBlock(int size)
         if (rbuffer->GetStopReads() || ret <= 0)
             break;
 
+        VERBOSE(VB_IMPORTANT, QString("sock->writeData() -- begin"));
         if (!sock->writeData(buf, (uint)ret))
         {
             tot = -1;
             break;
         }
+        VERBOSE(VB_IMPORTANT, QString("sock->writeData() -- end"));
 
         tot += ret;
         if (ret < request)