Changeset 4396
- Timestamp:
- Feb 27, 2013 12:12:59 PM (12 years ago)
- Location:
- pjproject/branches/1.x
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/branches/1.x
- Property svn:mergeinfo changed
/pjproject/trunk merged: 4301
- Property svn:mergeinfo changed
-
pjproject/branches/1.x/pjsip/src/pjsip-ua/sip_inv.c
r4385 r4396 2855 2855 neg_state = pjmedia_sdp_neg_get_state(inv->neg); 2856 2856 2857 /* If UPDATE doesn't contain SDP, just respond with 200/OK. 2858 * This is a valid scenario according to session-timer draft. 2859 */ 2860 if (rdata->msg_info.msg->body == NULL) { 2861 2862 status = pjsip_dlg_create_response(inv->dlg, rdata, 2863 200, NULL, &tdata); 2864 } 2857 2865 /* Send 491 if we receive UPDATE while we're waiting for an answer */ 2858 if (neg_state == PJMEDIA_SDP_NEG_STATE_LOCAL_OFFER) {2866 else if (neg_state == PJMEDIA_SDP_NEG_STATE_LOCAL_OFFER) { 2859 2867 status = pjsip_dlg_create_response(inv->dlg, rdata, 2860 2868 PJSIP_SC_REQUEST_PENDING, NULL, … … 2865 2873 */ 2866 2874 else if (neg_state == PJMEDIA_SDP_NEG_STATE_REMOTE_OFFER || 2867 neg_state == PJMEDIA_SDP_NEG_STATE_WAIT_NEGO) { 2868 status = pjsip_dlg_create_response(inv->dlg, rdata, 2875 neg_state == PJMEDIA_SDP_NEG_STATE_WAIT_NEGO) 2876 { 2877 pjsip_retry_after_hdr *ra_hdr; 2878 int val; 2879 2880 status = pjsip_dlg_create_response(inv->dlg, rdata, 2869 2881 PJSIP_SC_INTERNAL_SERVER_ERROR, 2870 2882 NULL, &tdata); 2871 2883 2872 /* If UPDATE doesn't contain SDP, just respond with 200/OK. 2873 * This is a valid scenario according to session-timer draft. 2874 */ 2875 } else if (rdata->msg_info.msg->body == NULL) { 2876 2877 status = pjsip_dlg_create_response(inv->dlg, rdata, 2878 200, NULL, &tdata); 2884 val = (pj_rand() % 10); 2885 ra_hdr = pjsip_retry_after_hdr_create(tdata->pool, val); 2886 pjsip_msg_add_hdr(tdata->msg, (pjsip_hdr*)ra_hdr); 2879 2887 2880 2888 } else {
Note: See TracChangeset
for help on using the changeset viewer.