From 5a8312b5066d9b538e0466417aebf6f10135d846 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Wed, 3 Dec 2014 13:41:59 +0000 Subject: Fix missing timeouts on network operations in bbackupctl. --- bin/bbackupctl/bbackupctl.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'bin/bbackupctl') diff --git a/bin/bbackupctl/bbackupctl.cpp b/bin/bbackupctl/bbackupctl.cpp index 256bace1..b00e90ba 100644 --- a/bin/bbackupctl/bbackupctl.cpp +++ b/bin/bbackupctl/bbackupctl.cpp @@ -173,7 +173,7 @@ int main(int argc, const char *argv[]) // Wait for the configuration summary std::string configSummary; - if(!getLine.GetLine(configSummary, PROTOCOL_DEFAULT_TIMEOUT)) + if(!getLine.GetLine(configSummary, false, PROTOCOL_DEFAULT_TIMEOUT)) { BOX_ERROR("Failed to receive configuration summary " "from daemon"); @@ -206,7 +206,7 @@ int main(int argc, const char *argv[]) " MaxUploadWait = " << maxUploadWait << " seconds"); std::string stateLine; - if(!getLine.GetLine(stateLine, PROTOCOL_DEFAULT_TIMEOUT) || getLine.IsEOF()) + if(!getLine.GetLine(stateLine, false, PROTOCOL_DEFAULT_TIMEOUT) || getLine.IsEOF()) { BOX_ERROR("Failed to receive state line from daemon"); return 1; @@ -314,7 +314,8 @@ int main(int argc, const char *argv[]) bool syncIsRunning = false; bool finished = false; - while(command != NoCommand && !finished && !getLine.IsEOF() && getLine.GetLine(line)) + while(command != NoCommand && !finished && !getLine.IsEOF() && + getLine.GetLine(line, false, PROTOCOL_DEFAULT_TIMEOUT)) { switch (command) { -- cgit v1.2.3