Ignore:
Timestamp:
May 3, 2007 1:31:21 PM (14 years ago)
Author:
bennylp
Message:

Implemented ticket #246, #247, #261, #268, #250 for Symbian

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjlib/src/pj/ioqueue_symbian.cpp

    r1244 r1246  
    3535{ 
    3636    int              eventCount; 
    37     CPjTimeoutTimer *timeoutTimer; 
    3837}; 
    3938 
     
    439438    PJ_UNUSED_ARG(max_fd); 
    440439 
    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); 
    443441    *p_ioqueue = ioq; 
    444442    return PJ_SUCCESS; 
     
    451449PJ_DEF(pj_status_t) pj_ioqueue_destroy( pj_ioqueue_t *ioq ) 
    452450{ 
    453     delete ioq->timeoutTimer; 
    454     ioq->timeoutTimer = NULL; 
    455  
     451    PJ_UNUSED_ARG(ioq); 
    456452    return PJ_SUCCESS; 
    457453} 
     
    488484    pj_ioqueue_key_t *key; 
    489485 
    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); 
    491487    key->cbObj = CIoqueueCallback::NewL(ioq, key, sock, cb, user_data); 
    492488 
     
    553549                                     pj_size_t size ) 
    554550{ 
    555     pj_memset(op_key, 0, size); 
     551    pj_bzero(op_key, size); 
    556552} 
    557553 
     
    635631                             const pj_time_val *timeout) 
    636632{ 
    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; 
    665639} 
    666640 
Note: See TracChangeset for help on using the changeset viewer.