Changeset 2771 for pjproject/trunk/pjlib/src/pjlib-test/activesock.c
- Timestamp:
- Jun 17, 2009 1:31:13 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjlib/src/pjlib-test/activesock.c
r2394 r2771 213 213 for (i=0; i<10 && last_rx1 == srv1->rx_cnt && last_rx2 == srv2->rx_cnt; ++i) { 214 214 pj_time_val delay = {0, 10}; 215 #ifdef PJ_SYMBIAN 216 pj_symbianos_poll(-1, 100); 217 #else 215 218 pj_ioqueue_poll(ioqueue, &delay); 219 #endif 216 220 } 217 221 … … 404 408 if (status == PJ_EPENDING) { 405 409 do { 410 #if PJ_SYMBIAN 411 pj_symbianos_poll(-1, -1); 412 #else 406 413 pj_ioqueue_poll(ioqueue, NULL); 414 #endif 407 415 } while (!state2->sent); 408 } else if (status != PJ_SUCCESS) { 409 PJ_LOG(1,("", " err: send status=%d", status)); 410 status = -180; 411 break; 412 } else if (status == PJ_SUCCESS) { 413 if (len != sizeof(*pkt)) { 414 PJ_LOG(1,("", " err: shouldn't report partial sent")); 415 status = -190; 416 break; 417 } 416 } else { 417 #if PJ_SYMBIAN 418 /* The Symbian socket always returns PJ_SUCCESS for TCP send, 419 * eventhough the remote end hasn't received the data yet. 420 * If we continue sending, eventually send() will block, 421 * possibly because the send buffer is full. So we need to 422 * poll the ioqueue periodically, to let receiver gets the 423 * data. 424 */ 425 pj_symbianos_poll(-1, 0); 426 #endif 427 if (status != PJ_SUCCESS) { 428 PJ_LOG(1,("", " err: send status=%d", status)); 429 status = -180; 430 break; 431 } else if (status == PJ_SUCCESS) { 432 if (len != sizeof(*pkt)) { 433 PJ_LOG(1,("", " err: shouldn't report partial sent")); 434 status = -190; 435 break; 436 } 437 } 418 438 } 419 439 } … … 421 441 /* Wait until everything has been sent/received */ 422 442 if (state1->next_recv_seq < COUNT) { 443 #ifdef PJ_SYMBIAN 444 while (pj_symbianos_poll(-1, 1000) == PJ_TRUE) 445 ; 446 #else 423 447 pj_time_val delay = {0, 100}; 424 448 while (pj_ioqueue_poll(ioqueue, &delay) > 0) 425 449 ; 450 #endif 426 451 } 427 452
Note: See TracChangeset
for help on using the changeset viewer.