Changeset 8571
- Timestamp:
- 10/14/10 17:28:16 (3 years ago)
- Location:
- branches/windows-client
- Files:
-
- 4 modified
-
src/io/bmi/bmi_wintcp/bmi-wintcp.c (modified) (4 diffs)
-
src/io/bmi/bmi_wintcp/socket-collection.c (modified) (1 diff)
-
src/io/bmi/bmi_wintcp/sockio.c (modified) (2 diffs)
-
test/io/bmi/test-bmi-client.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/windows-client/src/io/bmi/bmi_wintcp/bmi-wintcp.c
r8560 r8571 2190 2190 { 2191 2191 /* this is a little weird, but we complete the nonblocking 2192 * connection by polling */ 2193 /* 2192 * connection by polling */ 2194 2193 poll_conn.fd = tcp_addr_data->socket; 2195 2194 poll_conn.events = POLLOUT; 2196 ret = poll(&poll_conn, 1, 2);2195 ret = WSAPoll(&poll_conn, 1, 2); 2197 2196 if ((ret < 0) || (poll_conn.revents & POLLERR)) 2198 2197 { 2199 tmp_errno = errno;2200 gossip_lerr("Error: poll: % s\n", strerror(tmp_errno));2198 tmp_errno = WSAGetLastError(); 2199 gossip_lerr("Error: poll: %d\n", tmp_errno); 2201 2200 return (bmi_tcp_errno_to_pvfs(-tmp_errno)); 2202 2201 } … … 2205 2204 tcp_addr_data->not_connected = 0; 2206 2205 } 2207 */ 2206 2208 2207 /* use select on Windows */ 2209 fd_set writefds;2208 /*fd_set writefds; 2210 2209 struct timeval timeout; 2211 2210 2212 2211 timeout.tv_sec = 0; 2213 2212 timeout.tv_usec = 2000; /* 2ms */ 2214 2213 /* 2215 2214 FD_ZERO(&writefds); 2216 2215 FD_SET(tcp_addr_data->socket, &writefds); … … 2226 2225 tcp_addr_data->not_connected = 0; 2227 2226 } 2227 */ 2228 2228 } 2229 2229 /* return. the caller should check the "not_connected" flag to … … 2288 2288 if (ret < 0) 2289 2289 { 2290 if (ret == - EINPROGRESS)2290 if (ret == -WSAEWOULDBLOCK) 2291 2291 { 2292 2292 tcp_addr_data->not_connected = 1; -
branches/windows-client/src/io/bmi/bmi_wintcp/socket-collection.c
r8560 r8571 314 314 315 315 /* nothing ready, just return */ 316 if(ret == 0 )316 if(ret == 0 && !pipe_notify) 317 317 { 318 318 return(0); -
branches/windows-client/src/io/bmi/bmi_wintcp/sockio.c
r8554 r8571 83 83 if (WSAGetLastError() == WSAEINTR) 84 84 goto bind_sock_restart; 85 return(bmi_errno_to_pvfs(- errno));85 return(bmi_errno_to_pvfs(-WSAGetLastError())); 86 86 } 87 87 return (sockd); … … 104 104 if (WSAGetLastError() == WSAEINTR) 105 105 goto connect_sock_restart; 106 return(bmi_errno_to_pvfs(- errno));106 return(bmi_errno_to_pvfs(-WSAGetLastError())); 107 107 } 108 108 return (sockd); -
branches/windows-client/test/io/bmi/test-bmi-client.c
r8556 r8571 296 296 free(user_opts->hostid); 297 297 free(user_opts); 298 299 getchar(); 298 300 299 301 return (0);
