Changeset 5351


Ignore:
Timestamp:
Jun 21, 2016 8:56:42 AM (8 years ago)
Author:
nanang
Message:

Close #1934: Add reference counting APIs to event subscription.

Location:
pjproject/trunk/pjsip
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjsip/include/pjsip-simple/evsub.h

    r4704 r5351  
    491491 
    492492 
     493/** 
     494 * Increment the event subscription's group lock. 
     495 * 
     496 * @param sub           The server subscription instance. 
     497 * 
     498 * @return              PJ_SUCCESS on success. 
     499 */ 
     500PJ_DEF(pj_status_t) pjsip_evsub_add_ref(pjsip_evsub *sub); 
     501 
     502 
     503/** 
     504 * Decrement the event subscription's group lock. 
     505 * 
     506 * @param sub           The server subscription instance. 
     507 * 
     508 * @return              PJ_SUCCESS on success. 
     509 */ 
     510PJ_DEF(pj_status_t) pjsip_evsub_dec_ref(pjsip_evsub *sub); 
     511 
     512 
    493513 
    494514PJ_END_DECL 
  • pjproject/trunk/pjsip/src/pjsip-simple/evsub.c

    r5245 r5351  
    832832} 
    833833 
    834  
     834/* 
     835 * Increment the event subscription's group lock. 
     836 */ 
     837PJ_DEF(pj_status_t) pjsip_evsub_add_ref(pjsip_evsub *sub) 
     838{ 
     839    return pj_grp_lock_add_ref(sub->grp_lock); 
     840} 
     841 
     842/* 
     843 * Decrement the event subscription's group lock. 
     844 */ 
     845PJ_DEF(pj_status_t) pjsip_evsub_dec_ref(pjsip_evsub *sub) 
     846{ 
     847    return pj_grp_lock_dec_ref(sub->grp_lock); 
     848} 
    835849 
    836850/* 
Note: See TracChangeset for help on using the changeset viewer.