Changeset 1246 for pjproject/trunk/pjlib/src/pj/ioqueue_symbian.cpp
- Timestamp:
- May 3, 2007 1:31:21 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjlib/src/pj/ioqueue_symbian.cpp
r1244 r1246 35 35 { 36 36 int eventCount; 37 CPjTimeoutTimer *timeoutTimer;38 37 }; 39 38 … … 439 438 PJ_UNUSED_ARG(max_fd); 440 439 441 ioq = (pj_ioqueue_t*) pj_pool_zalloc(pool, sizeof(pj_ioqueue_t)); 442 ioq->timeoutTimer = CPjTimeoutTimer::NewL(); 440 ioq = PJ_POOL_ZALLOC_T(pool, pj_ioqueue_t); 443 441 *p_ioqueue = ioq; 444 442 return PJ_SUCCESS; … … 451 449 PJ_DEF(pj_status_t) pj_ioqueue_destroy( pj_ioqueue_t *ioq ) 452 450 { 453 delete ioq->timeoutTimer; 454 ioq->timeoutTimer = NULL; 455 451 PJ_UNUSED_ARG(ioq); 456 452 return PJ_SUCCESS; 457 453 } … … 488 484 pj_ioqueue_key_t *key; 489 485 490 key = (pj_ioqueue_key_t*) pj_pool_zalloc(pool, sizeof(pj_ioqueue_key_t));486 key = PJ_POOL_ZALLOC_T(pool, pj_ioqueue_key_t); 491 487 key->cbObj = CIoqueueCallback::NewL(ioq, key, sock, cb, user_data); 492 488 … … 553 549 pj_size_t size ) 554 550 { 555 pj_ memset(op_key, 0, size);551 pj_bzero(op_key, size); 556 552 } 557 553 … … 635 631 const pj_time_val *timeout) 636 632 { 637 CPjTimeoutTimer *timer; 638 639 if (timeout) { 640 //if (!ioq->timeoutTimer->IsActive()) 641 if (0) 642 timer = ioq->timeoutTimer; 643 else 644 timer = CPjTimeoutTimer::NewL(); 645 646 timer->StartTimer(timeout->sec*1000 + timeout->msec); 647 648 } else { 649 timer = NULL; 650 } 651 652 ioq->eventCount = 0; 653 654 do { 655 PjSymbianOS::Instance()->WaitForActiveObjects(); 656 } while (ioq->eventCount == 0 && (!timer || (timer && !timer->HasTimedOut()))); 657 658 if (timer && !timer->HasTimedOut()) 659 timer->Cancel(); 660 661 if (timer && timer != ioq->timeoutTimer) 662 delete timer; 663 664 return ioq->eventCount; 633 /* Polling is not necessary on Symbian, since all async activities 634 * are registered to active scheduler. 635 */ 636 PJ_UNUSED_ARG(ioq); 637 PJ_UNUSED_ARG(timeout); 638 return 0; 665 639 } 666 640
Note: See TracChangeset
for help on using the changeset viewer.