summaryrefslogtreecommitdiff
path: root/src/tools/dcpomatic_kdm_cli.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2016-08-10 16:38:33 +0100
committerCarl Hetherington <cth@carlh.net>2016-08-12 09:13:51 +0100
commitb1dc9c3a2f7e55c9afc5bf2d5b465371b048e14f (patch)
tree9968238c6c0511f044e6fcdb4abcc08b5eb28f27 /src/tools/dcpomatic_kdm_cli.cc
parent4a0ae92e28d7d1f0dd648d1b620efc324fdef161 (diff)
Remove all use of stringstream in an attempt to fix
the suspected thread-unsafe crash bugs on OS X.
Diffstat (limited to 'src/tools/dcpomatic_kdm_cli.cc')
-rw-r--r--src/tools/dcpomatic_kdm_cli.cc7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/tools/dcpomatic_kdm_cli.cc b/src/tools/dcpomatic_kdm_cli.cc
index de89a9c7c..5126e1954 100644
--- a/src/tools/dcpomatic_kdm_cli.cc
+++ b/src/tools/dcpomatic_kdm_cli.cc
@@ -29,7 +29,6 @@
#include "lib/config.h"
#include "lib/exceptions.h"
#include "lib/emailer.h"
-#include <locked_sstream.h>
#include <dcp/certificate.h>
#include <getopt.h>
#include <iostream>
@@ -82,10 +81,10 @@ time_from_string (string t)
static boost::posix_time::time_duration
duration_from_string (string d)
{
- locked_stringstream s (d);
int N;
- string unit;
- s >> N >> unit;
+ char unit_buf[64] = "\0";
+ sscanf (d.c_str(), "%d %64s", &N, unit_buf);
+ string const unit (unit_buf);
if (N == 0) {
cerr << "Could not understand duration \"" << d << "\"\n";