mirror of https://github.com/BOINC/boinc.git
*** empty log message ***
svn path=/trunk/boinc/; revision=1661
This commit is contained in:
parent
c9d88c816c
commit
a98c68414d
|
@ -67,9 +67,8 @@
|
|||
#include "client_state.h"
|
||||
#include "message.h"
|
||||
|
||||
// If socklen_t isn't defined, define it here as size_t
|
||||
#if !defined(socklen_t)
|
||||
#define socklen_t size_t
|
||||
#if !GETSOCKOPT_SOCKLEN_T
|
||||
typedef size_t socklen_t;
|
||||
#endif
|
||||
|
||||
int NET_XFER::get_ip_addr( char *hostname, int &ip_addr ) {
|
||||
|
@ -324,13 +323,7 @@ int NET_XFER_SET::do_select(double& bytes_transferred, timeval& timeout) {
|
|||
int n, fd, retval;
|
||||
socklen_t i;
|
||||
NET_XFER *nxp;
|
||||
#if GETSOCKOPT_SIZE_T
|
||||
size_t intsize = sizeof(int);
|
||||
#elif GETSOCKOPT_SOCKLEN_T
|
||||
socklen_t intsize = sizeof(int);
|
||||
#else
|
||||
socklen_t intsize = sizeof(int);
|
||||
#endif
|
||||
|
||||
ScopeMessages scope_messages(log_messages, ClientMessages::DEBUG_NET_XFER);
|
||||
|
||||
|
@ -390,13 +383,13 @@ int NET_XFER_SET::do_select(double& bytes_transferred, timeval& timeout) {
|
|||
fd = nxp->socket;
|
||||
if (FD_ISSET(fd, &read_fds) || FD_ISSET(fd, &write_fds)) {
|
||||
if (!nxp->is_connected) {
|
||||
#ifdef _WIN32
|
||||
getsockopt(fd, SOL_SOCKET, SO_ERROR, (char *)&n, (int *)&intsize);
|
||||
#elif __APPLE__
|
||||
getsockopt(fd, SOL_SOCKET, SO_ERROR, &n, (int *)&intsize);
|
||||
#else
|
||||
// #ifdef _WIN32
|
||||
// getsockopt(fd, SOL_SOCKET, SO_ERROR, (char *)&n, (int *)&intsize);
|
||||
// #elif __APPLE__
|
||||
// getsockopt(fd, SOL_SOCKET, SO_ERROR, &n, (int *)&intsize);
|
||||
// #else
|
||||
getsockopt(fd, SOL_SOCKET, SO_ERROR, (void*)&n, &intsize);
|
||||
#endif
|
||||
// #endif
|
||||
if (n) {
|
||||
scope_messages.printf("NET_XFER_SET::do_select(): socket %d connect failed\n", fd);
|
||||
nxp->error = ERR_CONNECT;
|
||||
|
|
Loading…
Reference in New Issue