mirror of https://github.com/BOINC/boinc.git
Merge branch 'master' of ssh://isaac.ssl.berkeley.edu/boinc-v2
This commit is contained in:
commit
2f817e4fd5
|
@ -223,8 +223,8 @@ int GUI_RPC_CONN_SET::insert(GUI_RPC_CONN* p) {
|
|||
}
|
||||
|
||||
int GUI_RPC_CONN_SET::init_unix_domain() {
|
||||
#ifndef _WIN32
|
||||
sockaddr_un addr;
|
||||
#if !defined(_WIN32)
|
||||
struct sockaddr_un addr;
|
||||
get_password();
|
||||
int retval = boinc_socket(lsock, AF_UNIX);
|
||||
if (retval) {
|
||||
|
@ -240,8 +240,13 @@ int GUI_RPC_CONN_SET::init_unix_domain() {
|
|||
strcpy(&addr.sun_path[1], GUI_RPC_FILE);
|
||||
socklen_t len = offsetof(struct sockaddr_un, sun_path) + 1 + strlen(&addr.sun_path[1]);
|
||||
#else
|
||||
// NOTE: if we ever add Mac OS X support, need to change this
|
||||
//
|
||||
#ifdef __APPLE__
|
||||
addr.sun_len = sizeof(addr);
|
||||
#endif
|
||||
strcpy(addr.sun_path, GUI_RPC_FILE);
|
||||
int len = strlen(GUI_RPC_FILE) + sizeof(addr.sun_family);
|
||||
socklen_t len = SUN_LEN(&addr);
|
||||
#endif
|
||||
unlink(GUI_RPC_FILE);
|
||||
if (bind(lsock, (struct sockaddr*)&addr, len) < 0) {
|
||||
|
|
|
@ -1709,7 +1709,14 @@ void CAdvancedFrame::OnConnect(CFrameEvent& WXUNUSED(event)) {
|
|||
|
||||
pDoc->rpc.get_project_init_status(pis);
|
||||
pDoc->rpc.acct_mgr_info(ami);
|
||||
if (ami.acct_mgr_url.size() && !ami.have_credentials) {
|
||||
|
||||
if (ami.acct_mgr_url.size() && ami.have_credentials) {
|
||||
// Fall through
|
||||
//
|
||||
// There isn't a need to bring up the attach wizard, the account manager will
|
||||
// take care of ataching to projects when it completes the RPCs
|
||||
//
|
||||
} else if (ami.acct_mgr_url.size() && !ami.have_credentials) {
|
||||
wasShown = IsShown();
|
||||
Show();
|
||||
wasVisible = wxGetApp().IsApplicationVisible();
|
||||
|
|
|
@ -237,7 +237,7 @@ int RPC_CLIENT::init_poll() {
|
|||
}
|
||||
|
||||
int RPC_CLIENT::init_unix_domain() {
|
||||
#ifdef _WIN32
|
||||
#if defined(_WIN32)
|
||||
fprintf(stderr, "Unix domain not implemented in Windows\n");
|
||||
return -1;
|
||||
#else
|
||||
|
@ -245,8 +245,11 @@ int RPC_CLIENT::init_unix_domain() {
|
|||
int retval = boinc_socket(sock, AF_UNIX);
|
||||
if (retval) return retval;
|
||||
addr_un.sun_family = AF_UNIX;
|
||||
#ifdef __APPLE__
|
||||
addr_un.sun_len = sizeof(addr_un);
|
||||
#endif
|
||||
strcpy(addr_un.sun_path, GUI_RPC_FILE);
|
||||
int len = strlen(GUI_RPC_FILE) + sizeof(addr_un.sun_family);
|
||||
socklen_t len = SUN_LEN(&addr_un);
|
||||
if (connect(sock, (struct sockaddr*)&addr_un, len) < 0) {
|
||||
boinc_close_socket(sock);
|
||||
return ERR_CONNECT;
|
||||
|
|
Loading…
Reference in New Issue