Ignore:
Timestamp:
Nov 23, 2007 3:47:50 AM (14 years ago)
Author:
bennylp
Message:

Ticket #424: Added API to retrieve number of transactions and dialogs (thanks Sergey Bakulin)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjsip/src/pjsip/sip_transaction.c

    r1469 r1594  
    582582 
    583583/* 
     584 * Retrieve the current number of transactions currently registered in  
     585 * the hash table. 
     586 */ 
     587PJ_DEF(unsigned) pjsip_tsx_layer_get_tsx_count(void) 
     588{ 
     589    unsigned count; 
     590 
     591    /* Are we registered? */ 
     592    PJ_ASSERT_RETURN(mod_tsx_layer.endpt!=NULL, 0); 
     593 
     594    pj_mutex_lock(mod_tsx_layer.mutex); 
     595    count = pj_hash_count(mod_tsx_layer.htable); 
     596    pj_mutex_unlock(mod_tsx_layer.mutex); 
     597 
     598    return count; 
     599} 
     600 
     601 
     602/* 
    584603 * Find a transaction. 
    585604 */ 
Note: See TracChangeset for help on using the changeset viewer.