Changeset 2960


Ignore:
Timestamp:
Oct 21, 2009 3:03:06 AM (14 years ago)
Author:
bennylp
Message:

More #937 (presence):

  • added protection to not resubscribe immediately if initial SUBSCRIBE is responded with 481 for some reason
Location:
pjproject/trunk/pjsip
Files:
2 edited

Legend:

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

    r2956 r2960  
    30383038 
    30393039/** 
    3040  * This specifies how long the library should retry resending SUBSCRIBE 
    3041  * if the previous SUBSCRIBE failed. This also controls the duration  
    3042  * before failed PUBLISH request will be retried. 
     3040 * This specifies how long the library should wait before retrying failed 
     3041 * SUBSCRIBE request, and there is no rule to automatically resubscribe  
     3042 * (for example, no "retry-after" parameter in Subscription-State header). 
     3043 * 
     3044 * This also controls the duration  before failed PUBLISH request will be 
     3045 * retried. 
    30433046 * 
    30443047 * Default: 300 seconds 
  • pjproject/trunk/pjsip/src/pjsua-lib/pjsua_pres.c

    r2959 r2960  
    14681468                         * immediately. 
    14691469                         */ 
    1470                         resub_delay = 500; 
     1470                        /* But this must only happen when the 481 is received 
     1471                         * on subscription refresh request. We MUST NOT try to 
     1472                         * resubscribe automatically if the 481 is received 
     1473                         * on the initial SUBSCRIBE (if server returns this 
     1474                         * response for some reason). 
     1475                         */ 
     1476                        if (buddy->dlg->remote.contact) 
     1477                            resub_delay = 500; 
    14711478                        break; 
    14721479                    } 
     
    15311538 
    15321539            buddy_resubscribe(buddy, PJ_TRUE, resub_delay); 
    1533                                    
     1540 
    15341541        } else { 
     1542            /* This will clear the last termination code/reason */ 
    15351543            buddy->term_code = 0; 
    15361544            buddy->term_reason.slen = 0; 
Note: See TracChangeset for help on using the changeset viewer.