Ticket #467: ticket467.patch
File ticket467.patch, 2.5 KB (added by nanang, 17 years ago) |
---|
-
pjmedia/src/pjmedia/transport_srtp.c
1171 1171 } 1172 1172 goto BYPASS_SRTP; 1173 1173 } else if (srtp->setting.use == PJMEDIA_SRTP_OPTIONAL) { 1174 if (pj_stricmp(&m_rem->desc.transport, &m_loc->desc.transport)) { 1175 DEACTIVATE_MEDIA(pool, m_loc); 1176 return PJMEDIA_SDP_EINPROTO; 1177 } 1174 // Regardless the answer's transport type (RTP/AVP or RTP/SAVP), 1175 // the answer must be processed through in optional mode. 1176 // Please note that at this point transport type is ensured to be 1177 // RTP/AVP or RTP/SAVP, see transport_media_create() 1178 //if (pj_stricmp(&m_rem->desc.transport, &m_loc->desc.transport)) { 1179 //DEACTIVATE_MEDIA(pool, m_loc); 1180 //return PJMEDIA_SDP_EINPROTO; 1181 //} 1178 1182 } else if (srtp->setting.use == PJMEDIA_SRTP_MANDATORY) { 1179 1183 if (pj_stricmp(&m_rem->desc.transport, &ID_RTP_SAVP)) { 1180 1184 DEACTIVATE_MEDIA(pool, m_loc); -
pjmedia/src/pjmedia/sdp_neg.c
478 478 return PJMEDIA_SDPNEG_EINVANSMEDIA; 479 479 } 480 480 481 #if !defined(PJMEDIA_HAS_SRTP) || (PJMEDIA_HAS_SRTP == 0) 482 /* When SRTP enabled, checking transport is handled by transprot SRTP */ 481 483 482 /* Chec that transport in the answer match our offer. */ 483 484 /* Check that transport in the answer match our offer. */ 484 485 if (pj_strcmp(&answer->desc.transport, 485 486 &offer->desc.transport)!=0) 486 487 { … … 488 489 return PJMEDIA_SDPNEG_EINVANSTP; 489 490 } 490 491 492 #endif 493 491 494 /* Check if remote has rejected our offer */ 492 495 493 496 if (answer->desc.port == 0) { -
pjmedia/src/pjmedia/session.c
190 190 191 191 /* Transport protocol */ 192 192 193 #if !defined(PJMEDIA_HAS_SRTP) || (PJMEDIA_HAS_SRTP == 0) 194 /* When SRTP enabled, checking transport is handled by transprot SRTP */ 195 193 196 /* Transport type must be equal */ 194 197 if (pj_stricmp(&rem_m->desc.transport, 195 198 &local_m->desc.transport) != 0) … … 197 200 si->type = PJMEDIA_TYPE_UNKNOWN; 198 201 return PJMEDIA_SDPNEG_EINVANSTP; 199 202 } 203 #endif 200 204 201 205 if (pj_stricmp(&local_m->desc.transport, &ID_RTP_AVP) == 0) { 202 206