mirror of https://github.com/BOINC/boinc.git
*** empty log message ***
svn path=/trunk/boinc/; revision=3663
This commit is contained in:
parent
235bdb4277
commit
d65af565bf
|
@ -41,6 +41,7 @@ static void print_options(char* prog) {
|
|||
#endif
|
||||
" -exit_when_idle Get/process/report work, then exit\n"
|
||||
" -show_projects show attached projects\n"
|
||||
" -return_results_immediately contact server when have results\n"
|
||||
" -detach_project URL detach from a project\n"
|
||||
" -reset_project URL reset (clear) a project\n"
|
||||
" -attach_project attach to a project (will prompt for URL, account key)\n"
|
||||
|
|
|
@ -73,6 +73,26 @@ int get_local_network_info(
|
|||
|
||||
#else
|
||||
|
||||
// NEW POLICY: on UNIX, get just the hostname.
|
||||
// the rest (domain name, IP address) is a can of worms,
|
||||
// and doesn't really matter anyway
|
||||
|
||||
int get_local_network_info(
|
||||
char* domain_name, int domlen, char* ip_addr, int iplen
|
||||
) {
|
||||
char hostname[256];
|
||||
char buf[256];
|
||||
int retval;
|
||||
|
||||
strcpy(domain_name, "unknown");
|
||||
strcpy(ip_addr, "unknown");
|
||||
if (!gethostname(hostname, 256)) {
|
||||
safe_strncpy(domain_name, hostname, domlen);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
#if 0
|
||||
// gethostbyname() is a linkage nightmare on UNIX systems (go figure)
|
||||
// so use a kludge instead: run ping and parse the output.
|
||||
// The output should have a line like
|
||||
|
@ -106,7 +126,7 @@ static int try_ping(
|
|||
if (!p) continue;
|
||||
p++;
|
||||
if (!strchr(p, '.')) continue;
|
||||
safe_strncpy(domain_name, p, sizeof(domain_name));
|
||||
safe_strncpy(domain_name, p, domlen);
|
||||
return 0;
|
||||
}
|
||||
return ERR_NULL;
|
||||
|
@ -141,5 +161,6 @@ int get_local_network_info(
|
|||
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
|
|
@ -107,14 +107,12 @@ void SS_LOGIC::poll() {
|
|||
ack_deadline = time(0) + 5;
|
||||
} else {
|
||||
do_boinc_logo_ss = true;
|
||||
strcpy(ss_msg, "No work available");
|
||||
strcpy(ss_msg, "No graphics-capable applications running");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
do_boinc_logo_ss = true;
|
||||
strcpy(ss_msg, "App can't display graphics, BOINC Suspended");
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue