From 91a5a79c598b64e7b6f4258c13ca2359ad45db21 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Fri, 11 May 2007 00:42:13 +0000 Subject: [PATCH] - boinc_cmd: add --network_available and --get_cc_status options lib/ boinc_cmd.C svn path=/trunk/boinc/; revision=12642 --- checkin_notes | 5 +++++ doc/addon_data.php | 10 ++++++++++ lib/boinc_cmd.C | 14 ++++++++++++-- 3 files changed, 27 insertions(+), 2 deletions(-) diff --git a/checkin_notes b/checkin_notes index 3d86cde330..06811c67f0 100755 --- a/checkin_notes +++ b/checkin_notes @@ -4782,3 +4782,8 @@ Janus 10 May 2007 /html/bt/inc/ binteger.php +David 10 May 2007 + - boinc_cmd: add --network_available and --get_cc_status options + + lib/ + boinc_cmd.C diff --git a/doc/addon_data.php b/doc/addon_data.php index 2d19d4130d..ac28240838 100644 --- a/doc/addon_data.php +++ b/doc/addon_data.php @@ -185,6 +185,16 @@ array('inst_nB_v13.exe', ); $linux = array( +array( + 'http://www.vanheusden.com/multitail/', + 'MultiTail', + '5.0.3', + 'Multitail shows several simultaneous tails in different curses windows.', + 'http://www.vanheusden.com/multitail/', + '', + 'Multitail shows several simultaneous tails in different curses windows. It\'s handy in combination with BOINCtail, or to see the client output files when run with -redirectio. ', + 1178838772 +), array( 'http://www.vanheusden.com/boinctail/', 'BOINCTail', diff --git a/lib/boinc_cmd.C b/lib/boinc_cmd.C index c9ecf93008..b0059c8ee7 100644 --- a/lib/boinc_cmd.C +++ b/lib/boinc_cmd.C @@ -93,6 +93,8 @@ Commands:\n\ --lookup_account url email passwd\n\ --create_account url email passwd name\n\ --read_cc_config\n\ + --network_available\n\ + --get_cc_status\n\ --quit\n" ); exit(1); @@ -519,17 +521,25 @@ int main(int argc, char** argv) { retval = rpc.quit(); } else if (!strcmp(cmd, "read_cc_config")) { retval = rpc.read_cc_config(); + } else if (!strcmp(cmd, "network_available")) { + retval = rpc.network_available(); + } else if (!strcmp(cmd, "get_cc_status")) { + CC_STATUS cs; + retval = rpc.get_cc_status(cs); + if (!retval) { + retval = cs.network_status; + } } else { fprintf(stderr, "unrecognized command %s\n", cmd); } - if (retval) { + if (retval < 0) { show_error(retval); } #if defined(_WIN32) && defined(USE_WINSOCK) WSACleanup(); #endif - return 0; + exit(retval); } const char *BOINC_RCSID_77f00010ab = "$Id$";