forked from mirrors/linphone-iphone
fix bug in sdp offeranswer and malformed SDP.
This commit is contained in:
parent
4e721e8a4f
commit
9c814fc357
6 changed files with 19 additions and 12 deletions
|
|
@ -719,9 +719,9 @@ static int codec_compare(const PayloadType *a, const PayloadType *b){
|
|||
int ra,rb;
|
||||
ra=find_codec_rank(a->mime_type);
|
||||
rb=find_codec_rank(b->mime_type);
|
||||
if (ra==rb) return 0;
|
||||
if (ra>rb) return 1;
|
||||
if (ra<rb) return -1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static MSList *add_missing_codecs(SalStreamType mtype, MSList *l){
|
||||
|
|
@ -954,7 +954,7 @@ static void linphone_core_init (LinphoneCore * lc, const LinphoneCoreVTable *vta
|
|||
linphone_core_assign_payload_type(&payload_type_speex_nb,110,"vbr=on");
|
||||
linphone_core_assign_payload_type(&payload_type_speex_wb,111,"vbr=on");
|
||||
linphone_core_assign_payload_type(&payload_type_speex_uwb,112,"vbr=on");
|
||||
linphone_core_assign_payload_type(&payload_type_telephone_event,101,NULL);
|
||||
linphone_core_assign_payload_type(&payload_type_telephone_event,101,"0-11");
|
||||
linphone_core_assign_payload_type(&payload_type_ilbc,113,"mode=30");
|
||||
|
||||
#ifdef ENABLE_NONSTANDARD_GSM
|
||||
|
|
|
|||
|
|
@ -83,13 +83,13 @@ static void initiate_outgoing(const SalStreamDescription *local_offer,
|
|||
SalStreamDescription *result){
|
||||
if (remote_answer->port!=0)
|
||||
result->payloads=match_payloads(local_offer->payloads,remote_answer->payloads);
|
||||
result->proto=local_offer->proto;
|
||||
result->type=local_offer->type;
|
||||
if (result->payloads && !only_telephone_event(result->payloads)){
|
||||
strcpy(result->addr,remote_answer->addr);
|
||||
result->port=remote_answer->port;
|
||||
result->bandwidth=remote_answer->bandwidth;
|
||||
result->ptime=remote_answer->ptime;
|
||||
result->proto=local_offer->proto;
|
||||
result->type=local_offer->type;
|
||||
}else{
|
||||
result->port=0;
|
||||
}
|
||||
|
|
@ -100,13 +100,13 @@ static void initiate_incoming(const SalStreamDescription *local_cap,
|
|||
const SalStreamDescription *remote_offer,
|
||||
SalStreamDescription *result){
|
||||
result->payloads=match_payloads(local_cap->payloads,remote_offer->payloads);
|
||||
result->proto=local_cap->proto;
|
||||
result->type=local_cap->type;
|
||||
if (result->payloads && !only_telephone_event(result->payloads)){
|
||||
strcpy(result->addr,local_cap->addr);
|
||||
result->port=local_cap->port;
|
||||
result->bandwidth=local_cap->bandwidth;
|
||||
result->ptime=local_cap->ptime;
|
||||
result->proto=local_cap->proto;
|
||||
result->type=local_cap->type;
|
||||
result->ptime=local_cap->ptime;
|
||||
}else{
|
||||
result->port=0;
|
||||
}
|
||||
|
|
@ -157,6 +157,7 @@ int offer_answer_initiate_incoming(const SalMediaDescription *local_capabilities
|
|||
}
|
||||
}
|
||||
result->nstreams=j;
|
||||
strcpy(result->username, local_capabilities->username);
|
||||
strcpy(result->addr,local_capabilities->addr);
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -373,7 +373,10 @@ int sal_call_accept(SalOp * h){
|
|||
if (h->supports_session_timers) osip_message_set_supported(msg, "timer");
|
||||
}
|
||||
|
||||
if (contact) osip_message_set_contact(msg,contact);
|
||||
if (contact) {
|
||||
osip_list_special_free(&msg->contacts,(void (*)(void*))osip_contact_free);
|
||||
osip_message_set_contact(msg,contact);
|
||||
}
|
||||
|
||||
if (h->base.local_media){
|
||||
/*this is the case where we received an invite without SDP*/
|
||||
|
|
@ -536,6 +539,10 @@ static void handle_reinvite(Sal *sal, eXosip_event_t *ev){
|
|||
if (op->base.root->session_expires!=0){
|
||||
if (op->supports_session_timers) osip_message_set_supported(msg, "timer");
|
||||
}
|
||||
if (op->base.contact){
|
||||
osip_list_special_free(&msg->contacts,(void (*)(void*))osip_contact_free);
|
||||
osip_message_set_contact(msg,op->base.contact);
|
||||
}
|
||||
if (sdp){
|
||||
op->sdp_offering=FALSE;
|
||||
op->base.remote_media=sal_media_description_new();
|
||||
|
|
@ -644,7 +651,6 @@ static void call_terminated(Sal *sal, eXosip_event_t *ev){
|
|||
|
||||
static void call_released(Sal *sal, eXosip_event_t *ev){
|
||||
SalOp *op;
|
||||
char *from;
|
||||
op=(SalOp*)ev->external_reference;
|
||||
if (op==NULL){
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -134,7 +134,7 @@ static void add_payload(sdp_message_t *msg, int line, const PayloadType *pt)
|
|||
{
|
||||
char attr[256];
|
||||
sdp_message_m_payload_add (msg,line, int_2char (payload_type_get_number(pt)));
|
||||
if (pt->type==PAYLOAD_AUDIO_CONTINUOUS || pt->type==PAYLOAD_AUDIO_PACKETIZED)
|
||||
if (pt->channels>0)
|
||||
snprintf (attr,sizeof(attr),"%i %s/%i/%i", payload_type_get_number(pt),
|
||||
pt->mime_type, pt->clock_rate,pt->channels);
|
||||
else
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
Subproject commit ae7dfdcaea6d5fe6d4f44a6247b4ca506799e379
|
||||
Subproject commit 2e18cdfe53230763907f3f9b55adeb4c16d396a7
|
||||
2
oRTP
2
oRTP
|
|
@ -1 +1 @@
|
|||
Subproject commit 36773054c1e9a47029432a2e8540161dad426293
|
||||
Subproject commit 0424a6538e1741e064c8d8573efee365b25593f1
|
||||
Loading…
Add table
Reference in a new issue