- Timestamp:
- Feb 5, 2010 11:11:52 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjlib/src/pj/ioqueue_common_abs.c
r2826 r3088 200 200 if (h->connecting) { 201 201 /* Completion of connect() operation */ 202 pj_s size_t bytes_transfered;202 pj_status_t status; 203 203 pj_bool_t has_lock; 204 204 … … 227 227 * the socket to send/receive. 228 228 */ 229 bytes_transfered = 0;229 status = PJ_SUCCESS; 230 230 } else { 231 bytes_transfered = value;231 status = PJ_STATUS_FROM_OS(value); 232 232 } 233 233 } 234 234 #elif defined(PJ_WIN32) && PJ_WIN32!=0 235 bytes_transfered = 0; /* success */235 status = PJ_SUCCESS; /* success */ 236 236 #else 237 237 /* Excellent information in D.J. Bernstein page: … … 246 246 */ 247 247 { 248 int gp_rc;249 248 struct sockaddr_in addr; 250 socklen_t addrlen = sizeof(addr);251 252 gp_rc = getpeername(h->fd, (struct sockaddr*)&addr, &addrlen);253 bytes_transfered = (gp_rc < 0) ? gp_rc : -gp_rc;249 int addrlen = sizeof(addr); 250 251 status = pj_sock_getpeername(h->fd, (struct sockaddr*)&addr, 252 &addrlen); 254 253 } 255 254 #endif … … 270 269 /* Call callback. */ 271 270 if (h->cb.on_connect_complete && !IS_CLOSING(h)) 272 (*h->cb.on_connect_complete)(h, bytes_transfered);271 (*h->cb.on_connect_complete)(h, status); 273 272 274 273 /* Unlock if we still hold the lock */
Note: See TracChangeset
for help on using the changeset viewer.