Ignore:
Timestamp:
Jun 5, 2012 10:41:17 AM (12 years ago)
Author:
bennylp
Message:

Re #1527: added debugging facility to the timer heap. By enabling PJ_TIMER_DEBUG, application can use pj_timer_heap_dump() or pjsip_endpt_dump() to dump the timer entries along with the source location where it is scheduled from. The macro will also enable dumping the timer heap entries when the SIP endpoint is being destroyed

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjsip/include/pjsua-lib/pjsua.h

    r4138 r4154  
    20202020 * @see pjsip_endpt_schedule_timer() 
    20212021 */ 
     2022#if PJ_TIMER_DEBUG 
     2023#define pjsua_schedule_timer(e,d) pjsua_schedule_timer_dbg(e,d,\ 
     2024                                                           __FILE__,__LINE__) 
     2025 
     2026PJ_DECL(pj_status_t) pjsua_schedule_timer_dbg(pj_timer_entry *entry, 
     2027                                              const pj_time_val *delay, 
     2028                                              const char *src_file, 
     2029                                              int src_line); 
     2030#else 
    20222031PJ_DECL(pj_status_t) pjsua_schedule_timer(pj_timer_entry *entry, 
    20232032                                          const pj_time_val *delay); 
     2033#endif 
    20242034 
    20252035/** 
     
    20342044 * @return              PJ_SUCCESS on success, or the appropriate error code. 
    20352045 */ 
     2046#if PJ_TIMER_DEBUG 
     2047#define pjsua_schedule_timer2(cb,u,d) \ 
     2048                        pjsua_schedule_timer2_dbg(cb,u,d,__FILE__,__LINE__) 
     2049 
     2050PJ_DECL(pj_status_t) pjsua_schedule_timer2_dbg(void (*cb)(void *user_data), 
     2051                                               void *user_data, 
     2052                                               unsigned msec_delay, 
     2053                                               const char *src_file, 
     2054                                               int src_line); 
     2055#else 
    20362056PJ_DECL(pj_status_t) pjsua_schedule_timer2(void (*cb)(void *user_data), 
    20372057                                           void *user_data, 
    20382058                                           unsigned msec_delay); 
     2059#endif 
    20392060 
    20402061/** 
Note: See TracChangeset for help on using the changeset viewer.