From 9a2b45caa81d8fb056802dfe3c25f214e808ffdf Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Tue, 19 Aug 2014 21:01:28 +0100 Subject: Use SafeStringStream instead of std::stringstream to try to fix random crashes on OS X. --- src/lib/server_finder.cc | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/lib/server_finder.cc') diff --git a/src/lib/server_finder.cc b/src/lib/server_finder.cc index 65e0940a0..744a65f59 100644 --- a/src/lib/server_finder.cc +++ b/src/lib/server_finder.cc @@ -27,7 +27,6 @@ #include "ui_signaller.h" using std::string; -using std::stringstream; using std::list; using std::vector; using std::cout; @@ -116,9 +115,9 @@ try scoped_array buffer (new char[length]); sock->read (reinterpret_cast (buffer.get()), length); - stringstream s (buffer.get()); + string s (buffer.get()); shared_ptr xml (new cxml::Document ("ServerAvailable")); - xml->read_stream (s); + xml->read_string (s); string const ip = sock->socket().remote_endpoint().address().to_string (); if (!server_found (ip)) { -- cgit v1.2.3