diff --git a/checkin_notes b/checkin_notes index dbd66aa7f3..6eb81e9570 100755 --- a/checkin_notes +++ b/checkin_notes @@ -5012,3 +5012,9 @@ Bruce 24 May 2006 handle_request.C server_types.C +Rom 24 May 2006 + - Provide a way for an application to specify its symstore even when + the core client doesn't yet support symstores. + + lib/ + diagnostics.C, .h diff --git a/lib/diagnostics.C b/lib/diagnostics.C index 1c9815d2ea..9245bf574b 100644 --- a/lib/diagnostics.C +++ b/lib/diagnostics.C @@ -268,7 +268,7 @@ int diagnostics_init( 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'; + boinc_proxy[sizeof(boinc_proxy)-1] = '\0'; } } } @@ -348,13 +348,26 @@ char* diagnostics_get_boinc_dir() { } -// return the location of the Symbol Store. +// return the location of the symbol store. // char* diagnostics_get_symstore() { return symstore; } +// store the location of the symbol store. +// +int diagnostics_set_symstore(char* project_symstore) { + if (!strlen(symstore)) { + int buffer_used = snprintf(symstore, sizeof(symstore), "%s", project_symstore); + if ((sizeof(symstore) == buffer_used) || (-1 == buffer_used)) { + symstore[sizeof(symstore)-1] = '\0'; + } + } + return 0; +} + + // do we need to worry about a proxy server? // int diagnostics_is_proxy_enabled() { diff --git a/lib/diagnostics.h b/lib/diagnostics.h index d72abf594d..43724e49e2 100644 --- a/lib/diagnostics.h +++ b/lib/diagnostics.h @@ -81,6 +81,7 @@ extern int diagnostics_is_flag_set( int flags ); // Properties extern char* diagnostics_get_boinc_dir(); extern char* diagnostics_get_symstore(); +extern int diagnostics_set_symstore(char* symstore); extern int diagnostics_is_proxy_enabled(); extern char* diagnostics_get_proxy();