summaryrefslogtreecommitdiff
path: root/src/lib/server_finder.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2014-08-19 21:01:28 +0100
committerCarl Hetherington <cth@carlh.net>2014-08-19 21:01:28 +0100
commit9a2b45caa81d8fb056802dfe3c25f214e808ffdf (patch)
tree1cead4781d2a8546c3ba8b8f936d18bf8e8a6403 /src/lib/server_finder.cc
parentaa3565457977dabb658f41c71e14151473b91f07 (diff)
Use SafeStringStream instead of std::stringstream to try to fix random crashes on OS X.
Diffstat (limited to 'src/lib/server_finder.cc')
-rw-r--r--src/lib/server_finder.cc5
1 files changed, 2 insertions, 3 deletions
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<char> buffer (new char[length]);
sock->read (reinterpret_cast<uint8_t*> (buffer.get()), length);
- stringstream s (buffer.get());
+ string s (buffer.get());
shared_ptr<cxml::Document> 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)) {