Add a log message and actually use device_for_write().
authorCarl Hetherington <cth@carlh.net>
Tue, 28 Apr 2020 11:46:46 +0000 (13:46 +0200)
committerCarl Hetherington <cth@carlh.net>
Tue, 28 Apr 2020 11:46:46 +0000 (13:46 +0200)
src/lib/copy_to_drive_job.cc

index 8a8073ec21e505e37906718c5d02c6b772b08224..173d286f5f54a499ca65468a46916e13b2d3285a 100644 (file)
@@ -22,6 +22,7 @@
 #include "copy_to_drive_job.h"
 #include "compose.hpp"
 #include "exceptions.h"
 #include "copy_to_drive_job.h"
 #include "compose.hpp"
 #include "exceptions.h"
+#include "dcpomatic_log.h"
 #include <dcp/raw_convert.h>
 #include <nanomsg/nn.h>
 #include <unistd.h>
 #include <dcp/raw_convert.h>
 #include <nanomsg/nn.h>
 #include <unistd.h>
@@ -64,7 +65,8 @@ CopyToDriveJob::json_name () const
 void
 CopyToDriveJob::run ()
 {
 void
 CopyToDriveJob::run ()
 {
-       if (!_nanomsg.send(String::compose(DISK_WRITER_WRITE "\n%1\n%2\n", _dcp.string(), _drive.device()), 2000)) {
+       LOG_DISK("Sending write request to disk writer for %1 %2", _dcp.string(), _drive.device_for_write());
+       if (!_nanomsg.send(String::compose(DISK_WRITER_WRITE "\n%1\n%2\n", _dcp.string(), _drive.device_for_write()), 2000)) {
                throw CommunicationFailedError ();
        }
 
                throw CommunicationFailedError ();
        }