swaroop: store whole signer/decryption chains and private keys encrypted by machine...
[dcpomatic.git] / src / lib / job.cc
index a84b0dcb17905dcaa14d614e7f10e04c1d8aa533..763005b57ef8a7ee52d3f69e4114a003a7a248f5 100644 (file)
@@ -28,6 +28,7 @@
 #include "exceptions.h"
 #include "film.h"
 #include "log.h"
+#include "dcpomatic_log.h"
 #include "compose.hpp"
 #include <dcp/exceptions.h>
 #include <sub/exceptions.h>
@@ -46,9 +47,6 @@ using boost::shared_ptr;
 using boost::optional;
 using boost::function;
 
-#define LOG_ERROR_NC(...) if (_film) { _film->log()->log (__VA_ARGS__, LogEntry::TYPE_ERROR); }
-#define LOG_GENERAL(...) if (_film) { _film->log()->log (String::compose (__VA_ARGS__), LogEntry::TYPE_GENERAL); }
-
 /** @param film Associated film, or 0 */
 Job::Job (shared_ptr<const Film> film)
        : _film (film)
@@ -290,6 +288,7 @@ Job::set_state (State s)
 
        if (finished) {
                emit (boost::bind (boost::ref (Finished)));
+               FinishedImmediate ();
        }
 }
 
@@ -399,8 +398,6 @@ void
 Job::set_error (string s, string d)
 {
        if (_film) {
-               LOG_ERROR_NC (s);
-               LOG_ERROR_NC (d);
                _film->log()->log (String::compose ("Error in job: %1 (%2)", s, d), LogEntry::TYPE_ERROR);
        }