[Box Backup-dev] COMMIT r239 - box/chris/boxi/bin/bbackupctl
boxbackup-dev@fluffy.co.uk
boxbackup-dev@fluffy.co.uk
Thu, 15 Dec 2005 00:50:06 +0000 (GMT)
Author: chris
Date: 2005-12-15 00:50:03 +0000 (Thu, 15 Dec 2005)
New Revision: 239
Modified:
box/chris/boxi/bin/bbackupctl/bbackupctl.cpp
Log:
* bbackupctl.cpp
- Added a "ping" command-line command to test that daemon is running
Modified: box/chris/boxi/bin/bbackupctl/bbackupctl.cpp
===================================================================
--- box/chris/boxi/bin/bbackupctl/bbackupctl.cpp 2005-12-15 00:47:17 UTC (rev 238)
+++ box/chris/boxi/bin/bbackupctl/bbackupctl.cpp 2005-12-15 00:50:03 UTC (rev 239)
@@ -207,6 +207,13 @@
// Yes... set the flag so we know what we're waiting for a sync to start
areWaitingForSync = true;
}
+ // Is the command the "ping" command? We're now connected to the daemon,
+ // so we have pinged it successfully and we can just exit.
+ else if(::strcmp(argv[0], "ping") == 0)
+ {
+ std::string cmd("quit\n");
+ connection.Write(cmd.c_str(), cmd.size());
+ }
else
{
// No? Just send the command given plus a quit command.