From fbc28781d83dcc3a042feacc6acf1b948306be22 Mon Sep 17 00:00:00 2001 From: arturoc Date: Sat, 10 Mar 2012 12:31:34 +0100 Subject: [PATCH] InteractionRecorder: fix thread --- FaceSubstitution/src/InteractionRecorder.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/FaceSubstitution/src/InteractionRecorder.cpp b/FaceSubstitution/src/InteractionRecorder.cpp index aeed96e..820b5e2 100644 --- a/FaceSubstitution/src/InteractionRecorder.cpp +++ b/FaceSubstitution/src/InteractionRecorder.cpp @@ -58,12 +58,10 @@ void InteractionRecorder::threadedFunction(){ while(!uploadQueue.empty()){ string nextUpload = uploadQueue.front(); uploadQueue.pop(); - { - ofPtr recorder = recordersQueue.front(); - recordersQueue.pop(); - unlock(); - recorder->close(); - } + ofPtr recorder = recordersQueue.front(); + recordersQueue.pop(); + unlock(); + recorder->close(); string ftpCommand = "curl -u " + user+ ":" + password + " -T " + ofToDataPath(ofFilePath::join(folder,nextUpload + ".mjpg")) + " ftp://" + ofFilePath::join(ftpServer , serverPath) + nextUpload + ".mjpg"; cout << endl << ftpCommand << endl; system(ftpCommand.c_str());