Changeset 1396 for pjproject/trunk/pjsip/src/pjsip-simple/presence.c
- Timestamp:
- Jun 27, 2007 1:01:59 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip/src/pjsip-simple/presence.c
r1266 r1396 225 225 pjsip_accept_hdr *accept; 226 226 pjsip_event_hdr *event; 227 pjsip_expires_hdr *expires_hdr;228 unsigned expires;229 227 content_type_e content_type = CONTENT_TYPE_NONE; 230 228 pjsip_evsub *sub; … … 282 280 } 283 281 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 300 282 /* Lock dialog */ 301 283 pjsip_dlg_inc_lock(dlg);
Note: See TracChangeset
for help on using the changeset viewer.