Ignore:
Timestamp:
Oct 14, 2009 1:58:04 AM (15 years ago)
Author:
bennylp
Message:

Ticket #970: More gracefull PJSUA-LIB shutdown sequence. Enhancements:

  • wait for unregistration to complete (or a preconfigured delay expires)
  • new account config field to set the maximum delay to wait for unregistration
  • rejects incoming requests (INVITE, SUBSCRIBE, and OPTIONS) when shutdown is in progress
File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjsip/src/pjsua-lib/pjsua_pres.c

    r2942 r2943  
    683683    /* Incoming SUBSCRIBE: */ 
    684684 
     685    /* Don't want to accept the request if shutdown is in progress */ 
     686    if (pjsua_var.thread_quit_flag) { 
     687        pjsip_endpt_respond_stateless(pjsua_var.endpt, rdata,  
     688                                      PJSIP_SC_TEMPORARILY_UNAVAILABLE, NULL, 
     689                                      NULL, NULL); 
     690        return PJ_TRUE; 
     691    } 
     692 
    685693    PJSUA_LOCK(); 
    686694 
     
    17221730    unsigned i; 
    17231731 
     1732    PJ_LOG(4,(THIS_FILE, "Shutting down presence..")); 
     1733 
    17241734    if (pjsua_var.pres_timer.id != 0) { 
    17251735        pjsip_endpt_cancel_timer(pjsua_var.endpt, &pjsua_var.pres_timer); 
Note: See TracChangeset for help on using the changeset viewer.