diff options
| author | Carl Hetherington <cth@carlh.net> | 2016-08-10 16:38:33 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2016-08-12 09:13:51 +0100 |
| commit | b1dc9c3a2f7e55c9afc5bf2d5b465371b048e14f (patch) | |
| tree | 9968238c6c0511f044e6fcdb4abcc08b5eb28f27 /src/lib/encoded_log_entry.cc | |
| parent | 4a0ae92e28d7d1f0dd648d1b620efc324fdef161 (diff) | |
Remove all use of stringstream in an attempt to fix
the suspected thread-unsafe crash bugs on OS X.
Diffstat (limited to 'src/lib/encoded_log_entry.cc')
| -rw-r--r-- | src/lib/encoded_log_entry.cc | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/src/lib/encoded_log_entry.cc b/src/lib/encoded_log_entry.cc index 84c7a6ca6..e8d436305 100644 --- a/src/lib/encoded_log_entry.cc +++ b/src/lib/encoded_log_entry.cc @@ -19,10 +19,8 @@ */ #include "encoded_log_entry.h" -#include <locked_sstream.h> using std::string; -using std::fixed; EncodedLogEntry::EncodedLogEntry (int frame, string ip, double receive, double encode, double send) : LogEntry (LogEntry::TYPE_GENERAL) @@ -38,13 +36,7 @@ EncodedLogEntry::EncodedLogEntry (int frame, string ip, double receive, double e string EncodedLogEntry::message () const { - locked_stringstream m; - m.precision (2); - m << fixed - << "Encoded frame " << _frame << " from " << _ip << ": " - << "receive " << _receive << "s " - << "encode " << _encode << "s " - << "send " << _send << "s."; - - return m.str (); + char buffer[256]; + snprintf (buffer, sizeof(buffer), "Encoded frame %d from %s: receive %.2fs encode %.2fs send %.2fs.", _frame, _ip.c_str(), _receive, _encode, _send); + return buffer; } |
