From c0f84f46df4a42a61bed291eb2b5e58b0d7caa59 Mon Sep 17 00:00:00 2001 From: Will Sobel Date: Tue, 26 Nov 2013 18:23:50 -0800 Subject: [PATCH] Made PONG look for the first numeric char after ' ' --- agent/connector.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/agent/connector.cpp b/agent/connector.cpp index 9c677a762..cb28bef15 100644 --- a/agent/connector.cpp +++ b/agent/connector.cpp @@ -241,7 +241,7 @@ void Connector::sendCommand(const string &aCommand) void Connector::startHeartbeats(const string &aArg) { size_t pos; - if (aArg.length() > 7 && aArg[6] == ' ' && (pos = aArg.find_first_not_of(' ', 6)) != string::npos && aArg.length() > pos) { + if (aArg.length() > 7 && aArg[6] == ' ' && (pos = aArg.find_first_of("0123456789", 7)) != string::npos) { int freq = atoi(aArg.substr(pos).c_str()); // Make the maximum timeout 30 minutes.