Ignore:
Timestamp:
Oct 13, 2009 2:01:59 PM (15 years ago)
Author:
bennylp
Message:

Ticket #364: Upon unregistration, (un)REGISTER should be sent only after (un)PUBLISH has completed successfully

  • wait for unpublication to complete or some delay expires, before sending unregistration
  • added unpublish_max_wait_time_msec field in account config to control how long to wait
File:
1 edited

Legend:

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

    r2940 r2942  
    17521752 
    17531753/** 
     1754 * Maximum time to wait for unpublication transaction(s) to complete 
     1755 * during shutdown process, before sending unregistration. The library 
     1756 * tries to wait for the unpublication (un-PUBLISH) to complete before 
     1757 * sending REGISTER request to unregister the account, during library 
     1758 * shutdown process. If the value is set too short, it is possible that 
     1759 * the unregistration is sent before unpublication completes, causing 
     1760 * unpublication request to fail. 
     1761 * 
     1762 * Default: 2000 (2 seconds) 
     1763 */ 
     1764#ifndef PJSUA_UNPUBLISH_MAX_WAIT_TIME_MSEC 
     1765#   define PJSUA_UNPUBLISH_MAX_WAIT_TIME_MSEC   2000 
     1766#endif 
     1767 
     1768 
     1769/** 
    17541770 * This structure describes account configuration to be specified when 
    17551771 * adding a new account with #pjsua_acc_add(). Application MUST initialize 
     
    18011817     */ 
    18021818    pjsip_publishc_opt  publish_opt; 
     1819 
     1820    /** 
     1821     * Maximum time to wait for unpublication transaction(s) to complete 
     1822     * during shutdown process, before sending unregistration. The library 
     1823     * tries to wait for the unpublication (un-PUBLISH) to complete before 
     1824     * sending REGISTER request to unregister the account, during library 
     1825     * shutdown process. If the value is set too short, it is possible that 
     1826     * the unregistration is sent before unpublication completes, causing 
     1827     * unpublication request to fail. 
     1828     * 
     1829     * Default: PJSUA_UNPUBLISH_MAX_WAIT_TIME_MSEC 
     1830     */ 
     1831    unsigned        unpublish_max_wait_time_msec; 
    18031832 
    18041833    /** 
Note: See TracChangeset for help on using the changeset viewer.