- Timestamp:
- Sep 22, 2014 7:08:14 AM (10 years ago)
- Location:
- pjproject/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjmedia/src/pjmedia/sdp_neg.c
r4872 r4926 1401 1401 neg->has_remote_answer = PJ_FALSE; 1402 1402 1403 if (neg->state == PJMEDIA_SDP_NEG_STATE_LOCAL_OFFER) { 1403 if (neg->state == PJMEDIA_SDP_NEG_STATE_LOCAL_OFFER && 1404 neg->active_local_sdp) 1405 { 1404 1406 /* Increment next version number. This happens if for example 1405 1407 * the reinvite offer is rejected by 488. If we don't increment -
pjproject/trunk/pjsip/src/pjsip-ua/sip_inv.c
r4924 r4926 163 163 pj_str_t done_tag; /* To tag in RX response with answer */ 164 164 pj_bool_t done_early;/* Negotiation was done for early med? */ 165 pj_bool_t has_sdp; /* Message with SDP? */ 165 166 }; 166 167 … … 712 713 } 713 714 } 715 } 716 717 /* 718 * Check if tx_data has sdp. 719 */ 720 static pj_bool_t tx_data_has_sdp(const pjsip_tx_data *tdata) 721 { 722 pjsip_msg_body *body = tdata->msg->body; 723 pjsip_media_type app_sdp; 724 725 PJ_ASSERT_RETURN(tdata, PJ_FALSE); 726 727 pjsip_media_type_init2(&app_sdp, "application", "sdp"); 728 729 if (body && 730 pj_stricmp(&body->content_type.type, &app_sdp.type)==0 && 731 pj_stricmp(&body->content_type.subtype, &app_sdp.subtype)==0) 732 { 733 return PJ_TRUE; 734 735 } else if (body && 736 pj_stricmp2(&body->content_type.type, "multipart") && 737 (pj_stricmp2(&body->content_type.subtype, "mixed")==0 || 738 pj_stricmp2(&body->content_type.subtype, "alternative")==0)) 739 { 740 pjsip_multipart_part *part; 741 742 part = pjsip_multipart_find_part(body, &app_sdp, NULL); 743 if (part) { 744 return PJ_TRUE; 745 } 746 } 747 748 return PJ_FALSE; 714 749 } 715 750 … … 1496 1531 tsx_inv_data = PJ_POOL_ZALLOC_T(inv->invite_tsx->pool, struct tsx_inv_data); 1497 1532 tsx_inv_data->inv = inv; 1533 tsx_inv_data->has_sdp = (sdp_info->sdp!=NULL); 1498 1534 inv->invite_tsx->mod_data[mod_inv.mod.id] = tsx_inv_data; 1499 1535 … … 1852 1888 tsx_inv_data = PJ_POOL_ZALLOC_T(tsx->pool, struct tsx_inv_data); 1853 1889 tsx_inv_data->inv = inv; 1890 tsx_inv_data->has_sdp = (sdp_info->sdp!=NULL); 1854 1891 tsx->mod_data[mod_inv.mod.id] = tsx_inv_data; 1855 1892 } … … 3059 3096 tsx_inv_data = PJ_POOL_ZALLOC_T(inv->pool, struct tsx_inv_data); 3060 3097 tsx_inv_data->inv = inv; 3098 tsx_inv_data->has_sdp = tx_data_has_sdp(tdata); 3061 3099 3062 3100 pjsip_dlg_dec_lock(inv->dlg); … … 3494 3532 PJMEDIA_SDP_NEG_STATE_LOCAL_OFFER && 3495 3533 tsx_inv_data && tsx_inv_data->sdp_done == PJ_FALSE && 3496 !tsx_inv_data->retrying )3534 !tsx_inv_data->retrying && tsx_inv_data->has_sdp) 3497 3535 { 3498 3536 pjmedia_sdp_neg_cancel_offer(inv->neg); … … 3570 3608 struct tsx_inv_data); 3571 3609 tsx_inv_data->inv = inv; 3610 tsx_inv_data->has_sdp = PJ_TRUE; 3572 3611 inv->invite_tsx->mod_data[mod_inv.mod.id] = tsx_inv_data; 3573 3612 }
Note: See TracChangeset
for help on using the changeset viewer.