Ignore:
Timestamp:
Jun 27, 2007 1:01:59 PM (17 years ago)
Author:
bennylp
Message:

Ticket #347: Assertion failure when handling incoming presence subscription with Expires=0

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjsip/src/pjsip-simple/presence.c

    r1266 r1396  
    225225    pjsip_accept_hdr *accept; 
    226226    pjsip_event_hdr *event; 
    227     pjsip_expires_hdr *expires_hdr; 
    228     unsigned expires; 
    229227    content_type_e content_type = CONTENT_TYPE_NONE; 
    230228    pjsip_evsub *sub; 
     
    282280    } 
    283281 
    284     /* Check that expires is not too short. */ 
    285     expires_hdr=(pjsip_expires_hdr*) 
    286                 pjsip_msg_find_hdr(rdata->msg_info.msg, PJSIP_H_EXPIRES, NULL); 
    287     if (expires_hdr) { 
    288         if (expires_hdr->ivalue < 5) { 
    289             return PJSIP_ERRNO_FROM_SIP_STATUS(PJSIP_SC_INTERVAL_TOO_BRIEF); 
    290         } 
    291  
    292         expires = expires_hdr->ivalue; 
    293         if (expires > PRES_DEFAULT_EXPIRES) 
    294             expires = PRES_DEFAULT_EXPIRES; 
    295  
    296     } else { 
    297         expires = PRES_DEFAULT_EXPIRES; 
    298     } 
    299      
    300282    /* Lock dialog */ 
    301283    pjsip_dlg_inc_lock(dlg); 
Note: See TracChangeset for help on using the changeset viewer.