- Manager: change "Retry communications" to "Do network communication"

- client: use gethostname() to get host name on Linux

svn path=/trunk/boinc/; revision=13295
This commit is contained in:
David Anderson 2007-08-11 03:34:38 +00:00
parent 4a2e57e552
commit c148085143
4 changed files with 18 additions and 6 deletions

View File

@ -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

View File

@ -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;

View File

@ -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,

View File

@ -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