Changeset 4301 for pjproject/trunk
- Timestamp:
- Nov 26, 2012 2:54:17 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip/src/pjsip-ua/sip_inv.c
r4208 r4301 2958 2958 neg_state = pjmedia_sdp_neg_get_state(inv->neg); 2959 2959 2960 /* If UPDATE doesn't contain SDP, just respond with 200/OK. 2961 * This is a valid scenario according to session-timer draft. 2962 */ 2963 if (rdata->msg_info.msg->body == NULL) { 2964 2965 status = pjsip_dlg_create_response(inv->dlg, rdata, 2966 200, NULL, &tdata); 2967 } 2960 2968 /* Send 491 if we receive UPDATE while we're waiting for an answer */ 2961 if (neg_state == PJMEDIA_SDP_NEG_STATE_LOCAL_OFFER) {2969 else if (neg_state == PJMEDIA_SDP_NEG_STATE_LOCAL_OFFER) { 2962 2970 status = pjsip_dlg_create_response(inv->dlg, rdata, 2963 2971 PJSIP_SC_REQUEST_PENDING, NULL, … … 2968 2976 */ 2969 2977 else if (neg_state == PJMEDIA_SDP_NEG_STATE_REMOTE_OFFER || 2970 neg_state == PJMEDIA_SDP_NEG_STATE_WAIT_NEGO) { 2971 status = pjsip_dlg_create_response(inv->dlg, rdata, 2978 neg_state == PJMEDIA_SDP_NEG_STATE_WAIT_NEGO) 2979 { 2980 pjsip_retry_after_hdr *ra_hdr; 2981 int val; 2982 2983 status = pjsip_dlg_create_response(inv->dlg, rdata, 2972 2984 PJSIP_SC_INTERNAL_SERVER_ERROR, 2973 2985 NULL, &tdata); 2974 2986 2975 /* If UPDATE doesn't contain SDP, just respond with 200/OK. 2976 * This is a valid scenario according to session-timer draft. 2977 */ 2978 } else if (rdata->msg_info.msg->body == NULL) { 2979 2980 status = pjsip_dlg_create_response(inv->dlg, rdata, 2981 200, NULL, &tdata); 2987 val = (pj_rand() % 10); 2988 ra_hdr = pjsip_retry_after_hdr_create(tdata->pool, val); 2989 pjsip_msg_add_hdr(tdata->msg, (pjsip_hdr*)ra_hdr); 2982 2990 2983 2991 } else {
Note: See TracChangeset
for help on using the changeset viewer.