mirror of https://github.com/BOINC/boinc.git
Merge branch 'master' of ssh://boinc.berkeley.edu/boinc
This commit is contained in:
commit
60fd0765cd
|
@ -6745,6 +6745,15 @@ David 10 Nov 2012
|
|||
html/ops/
|
||||
mass_email.php
|
||||
|
||||
David 11 Nov 2012
|
||||
- remove job submission: fix SQL typo and error messages.
|
||||
From Niclas Lockner.
|
||||
|
||||
html/user/
|
||||
submit_rpc_handler.php
|
||||
tools/
|
||||
manage_privileges
|
||||
|
||||
David 12 Nov 2012
|
||||
- client: Win build fix
|
||||
- add Visual Studio project for slide_show
|
||||
|
@ -6755,3 +6764,25 @@ David 12 Nov 2012
|
|||
boinc.sln
|
||||
client/
|
||||
client_types.h
|
||||
|
||||
David 13 Nov 2012
|
||||
- client: fix bug where, when updating a project, we fail to request work
|
||||
even though higher-priority projects are marked as no-new-tasks
|
||||
or are otherwise ineligible for work fetch.
|
||||
|
||||
client/
|
||||
cs_scheduler.cpp
|
||||
work_fetch.cpp
|
||||
|
||||
David 13 Nov 2012
|
||||
- build fixes for OpenBSD, from rustyBSD
|
||||
|
||||
configure.ac
|
||||
client/
|
||||
hostinfo_unix.cpp
|
||||
|
||||
David 13 Nov 2012
|
||||
- web: update .pot file for project web site translations
|
||||
|
||||
locale/templates/
|
||||
BOINC-Project-Generic.pot
|
||||
|
|
|
@ -430,13 +430,13 @@ bool CLIENT_STATE::scheduler_rpc_poll() {
|
|||
p->rsc_pwf[i].clear_backoff();
|
||||
}
|
||||
}
|
||||
work_fetch.compute_work_request(p);
|
||||
work_fetch.piggyback_work_request(p);
|
||||
scheduler_op->init_op_project(p, p->sched_rpc_pending);
|
||||
return true;
|
||||
}
|
||||
p = next_project_trickle_up_pending();
|
||||
if (p) {
|
||||
work_fetch.compute_work_request(p);
|
||||
work_fetch.piggyback_work_request(p);
|
||||
scheduler_op->init_op_project(p, RPC_REASON_TRICKLE_UP);
|
||||
return true;
|
||||
}
|
||||
|
@ -447,7 +447,7 @@ bool CLIENT_STATE::scheduler_rpc_poll() {
|
|||
suspend_soon |= global_prefs.cpu_times.suspended(now + 1800);
|
||||
p = find_project_with_overdue_results(suspend_soon);
|
||||
if (p && !actively_uploading(p)) {
|
||||
work_fetch.compute_work_request(p);
|
||||
work_fetch.piggyback_work_request(p);
|
||||
scheduler_op->init_op_project(p, RPC_REASON_RESULTS_DUE);
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -1365,15 +1365,8 @@ int HOST_INFO::get_host_info() {
|
|||
getsysinfo( GSI_PHYSMEM, (caddr_t) &mem_size, sizeof( mem_size));
|
||||
m_nbytes = 1024.* (double)mem_size;
|
||||
#elif defined(HW_PHYSMEM)
|
||||
// for OpenBSD
|
||||
mib[0] = CTL_HW;
|
||||
// for OpenBSD & NetBSD & FreeBSD
|
||||
int mem_size;
|
||||
mib[1] = HW_PHYSMEM;
|
||||
len = sizeof(mem_size);
|
||||
sysctl(mib, 2, &mem_size, &len, NULL, 0);
|
||||
m_nbytes = mem_size;
|
||||
#elif defined(__FreeBSD__)
|
||||
unsigned int mem_size;
|
||||
mib[0] = CTL_HW;
|
||||
mib[1] = HW_PHYSMEM;
|
||||
len = sizeof(mem_size);
|
||||
|
|
|
@ -552,13 +552,22 @@ void PROJECT_WORK_FETCH::reset(PROJECT* p) {
|
|||
|
||||
/////////////// WORK_FETCH ///////////////
|
||||
|
||||
// mark the projects from which we can fetch work
|
||||
//
|
||||
void WORK_FETCH::compute_cant_fetch_work_reason() {
|
||||
for (unsigned int i=0; i<gstate.projects.size(); i++) {
|
||||
PROJECT* p = gstate.projects[i];
|
||||
p->pwf.cant_fetch_work_reason = p->pwf.compute_cant_fetch_work_reason(p);
|
||||
}
|
||||
}
|
||||
|
||||
void WORK_FETCH::rr_init() {
|
||||
for (int i=0; i<coprocs.n_rsc; i++) {
|
||||
rsc_work_fetch[i].rr_init();
|
||||
}
|
||||
compute_cant_fetch_work_reason();
|
||||
for (unsigned int i=0; i<gstate.projects.size(); i++) {
|
||||
PROJECT* p = gstate.projects[i];
|
||||
p->pwf.cant_fetch_work_reason = p->pwf.compute_cant_fetch_work_reason(p);
|
||||
p->pwf.n_runnable_jobs = 0;
|
||||
for (int j=0; j<coprocs.n_rsc; j++) {
|
||||
p->rsc_pwf[j].rr_init(p, j);
|
||||
|
@ -663,7 +672,7 @@ void WORK_FETCH::clear_request() {
|
|||
// we're going to contact this project for reasons other than work fetch;
|
||||
// decide if we should piggy-back a work fetch request.
|
||||
//
|
||||
void WORK_FETCH::compute_work_request(PROJECT* p) {
|
||||
void WORK_FETCH::piggyback_work_request(PROJECT* p) {
|
||||
clear_request();
|
||||
if (config.fetch_minimal_work && gstate.had_or_requested_work) return;
|
||||
if (p->dont_request_more_work) return;
|
||||
|
@ -674,9 +683,10 @@ void WORK_FETCH::compute_work_request(PROJECT* p) {
|
|||
return;
|
||||
}
|
||||
|
||||
compute_cant_fetch_work_reason();
|
||||
PROJECT* bestp = choose_project(false);
|
||||
if (p != bestp) {
|
||||
if (!p->pwf.cant_fetch_work_reason) {
|
||||
if (p->pwf.cant_fetch_work_reason == 0) {
|
||||
if (bestp) {
|
||||
p->pwf.cant_fetch_work_reason = CANT_FETCH_WORK_NOT_HIGHEST_PRIORITY;
|
||||
} else {
|
||||
|
@ -704,7 +714,8 @@ PROJECT* WORK_FETCH::non_cpu_intensive_project_needing_work() {
|
|||
}
|
||||
|
||||
// choose a project to fetch work from,
|
||||
// and set the request fields of resource objects
|
||||
// and set the request fields of resource objects.
|
||||
// If strict is true, enforce hysteresis and backoff rules
|
||||
//
|
||||
PROJECT* WORK_FETCH::choose_project(bool strict) {
|
||||
PROJECT* p;
|
||||
|
|
|
@ -298,9 +298,9 @@ struct WORK_FETCH {
|
|||
// even if buffer is above min level
|
||||
// or project is backed off for a resource type
|
||||
PROJECT* non_cpu_intensive_project_needing_work();
|
||||
void compute_work_request(PROJECT*);
|
||||
void piggyback_work_request(PROJECT*);
|
||||
// we're going to contact this project anyway;
|
||||
// decide how much work to task for
|
||||
// piggyback a work request if appropriate.
|
||||
void accumulate_inst_sec(ACTIVE_TASK*, double dt);
|
||||
void write_request(FILE*, PROJECT*);
|
||||
void handle_reply(
|
||||
|
@ -311,6 +311,7 @@ struct WORK_FETCH {
|
|||
void set_all_requests_hyst(PROJECT*, int rsc_type);
|
||||
void print_state();
|
||||
void init();
|
||||
void compute_cant_fetch_work_reason();
|
||||
void rr_init();
|
||||
void clear_request();
|
||||
void compute_shares();
|
||||
|
|
27
configure.ac
27
configure.ac
|
@ -602,7 +602,32 @@ AC_HEADER_STDC
|
|||
AC_HEADER_SYS_WAIT
|
||||
AC_HEADER_TIME
|
||||
AC_TYPE_SIGNAL
|
||||
AC_CHECK_HEADERS(windows.h sys/types.h sys/un.h arpa/inet.h dirent.h grp.h fcntl.h inttypes.h stdint.h malloc.h alloca.h memory.h netdb.h netinet/in.h netinet/tcp.h netinet/ether.h net/if.h net/if_arp.h signal.h strings.h sys/auxv.h sys/file.h sys/fcntl.h sys/ipc.h sys/ioctl.h sys/mount.h sys/msg.h sys/param.h sys/resource.h sys/select.h sys/sem.h sys/shm.h sys/sockio.h sys/socket.h sys/stat.h sys/statvfs.h sys/statfs.h sys/swap.h sys/sysctl.h sys/systeminfo.h sys/time.h sys/types.h sys/utsname.h sys/vmmeter.h sys/wait.h unistd.h utmp.h errno.h procfs.h ieeefp.h setjmp.h resolv.h)
|
||||
AC_CHECK_HEADERS(windows.h sys/types.h sys/un.h arpa/inet.h dirent.h grp.h fcntl.h inttypes.h stdint.h malloc.h alloca.h memory.h netdb.h netinet/in.h netinet/tcp.h netinet/ether.h signal.h strings.h sys/auxv.h sys/file.h sys/fcntl.h sys/ipc.h sys/ioctl.h sys/msg.h sys/param.h sys/resource.h sys/select.h sys/sem.h sys/shm.h sys/sockio.h sys/socket.h sys/stat.h sys/statvfs.h sys/statfs.h sys/systeminfo.h sys/time.h sys/types.h sys/utsname.h sys/vmmeter.h sys/wait.h unistd.h utmp.h errno.h procfs.h ieeefp.h setjmp.h)
|
||||
|
||||
AC_CHECK_HEADER(net/if.h, [], [], [[
|
||||
#if HAVE_SYS_SOCKET_H
|
||||
# include <sys/socket.h>
|
||||
#endif
|
||||
]])
|
||||
|
||||
AC_CHECK_HEADER(net/if_arp.h, [], [], [[
|
||||
#if HAVE_SYS_SOCKET_H
|
||||
# include <sys/socket.h>
|
||||
#endif
|
||||
]])
|
||||
|
||||
AC_CHECK_HEADERS(sys/sysctl.h sys/mount.h sys/swap.h, [], [], [[
|
||||
#ifdef HAVE_SYS_PARAM_H
|
||||
# include <sys/param.h>
|
||||
#endif
|
||||
]])
|
||||
|
||||
AC_CHECK_HEADER(resolv.h, [], [], [[
|
||||
#ifdef HAVE_NETINET_IN_H
|
||||
# include <netinet/in.h>
|
||||
#endif
|
||||
]])
|
||||
|
||||
AC_CHECK_HEADERS(netinet/if_ether.h,[],[],[[
|
||||
#ifdef HAVE_SYS_TYPES_H
|
||||
#include <sys/types.h>
|
||||
|
|
|
@ -317,7 +317,7 @@ $math = array(
|
|||
array(
|
||||
array(
|
||||
"OProject@Home",
|
||||
"http://oproject.goldbach.pl/",
|
||||
"http://oproject.info/",
|
||||
tra("Private"),
|
||||
tra("Mathematics, Physics, Artificial Intelligence"),
|
||||
tra("Simulation of quantum computing; Goldbach's conjecture."),
|
||||
|
|
|
@ -115,7 +115,7 @@ function stage_file($file) {
|
|||
|
||||
$md5 = md5_file($file->source);
|
||||
if (!$md5) {
|
||||
error("Can't get MD5 of file $source");
|
||||
error("Can't get MD5 of file $file->source");
|
||||
}
|
||||
$name = "batch_$md5";
|
||||
$path = dir_hier_path($name, "../../download", $fanout);
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
#include <netinet/in.h>
|
||||
#include <netinet/tcp.h>
|
||||
#include <arpa/inet.h>
|
||||
#include <resolv.h>
|
||||
//#include <resolv.h>
|
||||
#include <netdb.h>
|
||||
#include <fcntl.h>
|
||||
#include <errno.h>
|
||||
|
@ -99,20 +99,18 @@ bool is_localhost(sockaddr_storage& s) {
|
|||
if (ntohl(s.sin_addr.s_addr) == 0x7f000001) return true;
|
||||
#else
|
||||
switch (s.ss_family) {
|
||||
case AF_INET:
|
||||
{
|
||||
case AF_INET: {
|
||||
sockaddr_in* sin = (sockaddr_in*)&s;
|
||||
return (ntohl(sin->sin_addr.s_addr) == 0x7f000001);
|
||||
break;
|
||||
}
|
||||
|
||||
case AF_INET6:
|
||||
{
|
||||
case AF_INET6: {
|
||||
sockaddr_in6* sin = (sockaddr_in6*)&s;
|
||||
char buf[256];
|
||||
inet_ntop(AF_INET6, (void*)(&sin->sin6_addr), buf, 256);
|
||||
return (strcmp(buf, "::1") == 0);
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
#endif
|
||||
return false;
|
||||
|
@ -124,15 +122,13 @@ bool same_ip_addr(sockaddr_storage& s1, sockaddr_storage& s2) {
|
|||
#else
|
||||
if (s1.ss_family != s2.ss_family) return false;
|
||||
switch (s1.ss_family) {
|
||||
case AF_INET:
|
||||
{
|
||||
case AF_INET: {
|
||||
sockaddr_in* sin1 = (sockaddr_in*)&s1;
|
||||
sockaddr_in* sin2 = (sockaddr_in*)&s2;
|
||||
return (memcmp((void*)(&sin1->sin_addr), (void*)(&sin2->sin_addr), sizeof(in_addr)) == 0);
|
||||
break;
|
||||
}
|
||||
case AF_INET6:
|
||||
{
|
||||
case AF_INET6: {
|
||||
sockaddr_in6* sin1 = (sockaddr_in6*)&s1;
|
||||
sockaddr_in6* sin2 = (sockaddr_in6*)&s2;
|
||||
return (memcmp((void*)(&sin1->sin6_addr), (void*)(&sin2->sin6_addr), sizeof(in6_addr)) == 0);
|
||||
|
@ -172,7 +168,9 @@ int resolve_hostname(const char* hostname, sockaddr_storage &ip_addr) {
|
|||
#endif
|
||||
}
|
||||
|
||||
int resolve_hostname_or_ip_addr(const char* hostname, sockaddr_storage &ip_addr) {
|
||||
int resolve_hostname_or_ip_addr(
|
||||
const char* hostname, sockaddr_storage &ip_addr
|
||||
) {
|
||||
#ifdef _WIN32 // inet_pton() only on Vista or later!!
|
||||
int x = inet_addr(hostname);
|
||||
if (x != -1) {
|
||||
|
@ -293,4 +291,3 @@ void reset_dns() {
|
|||
res_init();
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -122,14 +122,14 @@ if ($argv[3] === "all") {
|
|||
}
|
||||
} else {
|
||||
if ($grant) {
|
||||
BoincUserSubmit::insert("set user_id=$user->id, manage_all=1)");
|
||||
BoincUserSubmit::insert("set user_id=$user->id, manage_all=1");
|
||||
} else {
|
||||
die("User $user->id does not have global manage access\n");
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$app = BoincApp::lookup("name='".$argv[3]."'");
|
||||
if (!$app) die("no such app: ".$argv[2]."\n");
|
||||
if (!$app) die("no such app: ".$argv[3]."\n");
|
||||
$busa = BoincUserSubmitApp::lookup("user_id=$user->id and app_id=$app->id");
|
||||
if ($busa) {
|
||||
if ($grant) {
|
||||
|
|
Loading…
Reference in New Issue