Fix deadlock.
[dcpomatic.git] / src / lib / scp_dcp_job.cc
index 0b713b0427b15c62cdda2e39455c0a5e3dab1bc3..5aade6382d13b3442dee91ca94f98cb7fad05838 100644 (file)
@@ -37,8 +37,9 @@
 
 #include "i18n.h"
 
+#define LOG_GENERAL_NC(...) _film->log()->log (__VA_ARGS__, Log::TYPE_GENERAL);
+
 using std::string;
-using std::stringstream;
 using std::min;
 using boost::shared_ptr;
 
@@ -119,7 +120,7 @@ SCPDCPJob::json_name () const
 void
 SCPDCPJob::run ()
 {
-       _film->log()->log (N_("SCP DCP job starting"));
+       LOG_GENERAL_NC (N_("SCP DCP job starting"));
        
        SSHSession ss;
        
@@ -215,12 +216,11 @@ string
 SCPDCPJob::status () const
 {
        boost::mutex::scoped_lock lm (_status_mutex);
-       stringstream s;
-       s << Job::status ();
+       string s = Job::status ();
        if (!_status.empty ()) {
-               s << N_("; ") << _status;
+               s += N_("; ") + _status;
        }
-       return s.str ();
+       return s;
 }
 
 void