From c14808514348d74e42f966e1091be849ad8d44ef Mon Sep 17 00:00:00 2001 From: David Anderson Date: Sat, 11 Aug 2007 03:34:38 +0000 Subject: [PATCH] - Manager: change "Retry communications" to "Do network communication" - client: use gethostname() to get host name on Linux svn path=/trunk/boinc/; revision=13295 --- checkin_notes | 11 +++++++++++ client/hostinfo_network.C | 7 ++++--- clientgui/AdvancedFrame.cpp | 4 ++-- lib/error_numbers.h | 2 +- 4 files changed, 18 insertions(+), 6 deletions(-) diff --git a/checkin_notes b/checkin_notes index 2ccf79056e..ff63fac33e 100755 --- a/checkin_notes +++ b/checkin_notes @@ -7744,3 +7744,14 @@ David 10 Aug 2007 clientgui/ WelcomePage.cpp + +David 10 Aug 2007 + - Manager: change "Retry communications" to "Do network communication" + - client: use gethostname() to get host name on Linux + + client/ + hostinfo_network.C + clientgui/ + AdvancedFrame.cpp + lib/ + error_numbers.h diff --git a/client/hostinfo_network.C b/client/hostinfo_network.C index 335e5d40e9..bd0bf48830 100644 --- a/client/hostinfo_network.C +++ b/client/hostinfo_network.C @@ -62,13 +62,14 @@ int HOST_INFO::get_local_network_info() { struct in_addr addr; struct hostent* he; - if (gethostname(buf, 256)) return ERR_GETHOSTBYNAME; - he = gethostbyname(buf); + strcpy(domain_name, ""); + strcpy(ip_addr, ""); + if (gethostname(domain_name, 256)) return ERR_GETHOSTBYNAME; + he = gethostbyname(domain_name); if (!he || !he->h_addr_list[0]) { //msg_printf(NULL, MSG_ERROR, "gethostbyname (%s) failed", buf); return ERR_GETHOSTBYNAME; } - strlcpy(domain_name, he->h_name, sizeof(domain_name)); memcpy(&addr, he->h_addr_list[0], sizeof(addr)); strlcpy(ip_addr, inet_ntoa(addr), sizeof(ip_addr)); return 0; diff --git a/clientgui/AdvancedFrame.cpp b/clientgui/AdvancedFrame.cpp index 677d61ec50..fe333c85b7 100644 --- a/clientgui/AdvancedFrame.cpp +++ b/clientgui/AdvancedFrame.cpp @@ -487,8 +487,8 @@ bool CAdvancedFrame::CreateMenu() { ); menuAdvanced->Append( ID_COMMANDSRETRYCOMMUNICATIONS, - _("Retry &communications"), - _("Retry all deferred network communication.") + _("Do network &communication"), + _("Do all pending network communication.") ); menuAdvanced->Append( ID_READ_CONFIG, diff --git a/lib/error_numbers.h b/lib/error_numbers.h index ee35d40648..29b55f72c3 100755 --- a/lib/error_numbers.h +++ b/lib/error_numbers.h @@ -185,6 +185,6 @@ #define ERR_TOO_MANY_EXITS -226 // PLEASE: add a text description of your error to -// the text description function boincerror() in util.C. +// the text description function boincerror() in str_util.C. #endif