From fccdc7444f0f6e7512700ea0a88010f8a1cb5866 Mon Sep 17 00:00:00 2001 From: Rom Walton Date: Mon, 17 Apr 2006 08:27:03 +0000 Subject: [PATCH] *** empty log message *** svn path=/trunk/boinc/; revision=9919 --- lib/diagnostics.C | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/diagnostics.C b/lib/diagnostics.C index 9b7723c73e..d5b27e6e17 100644 --- a/lib/diagnostics.C +++ b/lib/diagnostics.C @@ -266,9 +266,9 @@ int diagnostics_init( } fclose(p); - if (strlen(proxy_address)) { - if (sizeof(boinc_proxy) > - snprintf(boinc_proxy, sizeof(boinc_proxy), "%s:%d", proxy_address, proxy_port)) { + if (boinc_proxy_enabled) { + int buffer_used = snprintf(boinc_proxy, sizeof(boinc_proxy), "%s:%d", proxy_address, proxy_port); + if ((sizeof(boinc_proxy) == buffer_used) || (-1 == buffer_used)) { boinc_proxy[255] = '\0'; } }