From c3ec0e91dedb29c2c7fd800ab013e60dd7180e95 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Mon, 18 Feb 2013 11:54:38 -0800 Subject: [PATCH] - client: show nvidia driver version as 314.07 instead of 314.7 --- lib/coproc.cpp | 2 +- samples/condor/boinc_gahp.cpp | 11 ++++------- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/lib/coproc.cpp b/lib/coproc.cpp index 7298294b4d..21678bc781 100644 --- a/lib/coproc.cpp +++ b/lib/coproc.cpp @@ -403,7 +403,7 @@ void COPROC_NVIDIA::description(char* buf) { #else int maj = display_driver_version/100; int min = display_driver_version%100; - sprintf(vers, "%d.%d", maj, min); + sprintf(vers, "%d.%02d", maj, min); #endif } else { strcpy(vers, "unknown"); diff --git a/samples/condor/boinc_gahp.cpp b/samples/condor/boinc_gahp.cpp index a63dfaa1e2..48f788debf 100644 --- a/samples/condor/boinc_gahp.cpp +++ b/samples/condor/boinc_gahp.cpp @@ -47,12 +47,12 @@ char authenticator[256]; bool async_mode = false; // represents a command. -// if out is NULL the command is in progress; -// otherwise it's the output // struct COMMAND { char* in; + // the input, in a malloc'd buffer char* out; + // if NULL the command is in progress; otherwise it's the output }; typedef map COMMANDS; @@ -377,15 +377,12 @@ void read_config() { } int main() { - char* p; - int retval; read_config(); while (1) { - p = get_cmd(); + char* p = get_cmd(); if (p == NULL) break; COMMAND c; c.in = p; - retval = handle_command(c); - if (retval) break; + handle_command(c); } }