fix mline when media is declined, remove not implemented test

This commit is contained in:
Jehan Monnier 2013-07-01 17:47:35 +02:00
parent 67abaa117c
commit 62e978c0bd
5 changed files with 51 additions and 34 deletions

View file

@ -92,18 +92,25 @@ static belle_sdp_media_description_t *stream_description_to_sdp ( const SalMedia
,1
,sal_media_proto_to_string ( stream->proto )
,NULL );
for ( pt_it=stream->payloads; pt_it!=NULL; pt_it=pt_it->next ) {
pt= ( PayloadType* ) pt_it->data;
mime_param= belle_sdp_mime_parameter_create ( pt->mime_type
if (stream->payloads) {
for ( pt_it=stream->payloads; pt_it!=NULL; pt_it=pt_it->next ) {
pt= ( PayloadType* ) pt_it->data;
mime_param= belle_sdp_mime_parameter_create ( pt->mime_type
, payload_type_get_number ( pt )
, pt->clock_rate
,stream->type==SalAudio?1:-1 );
belle_sdp_mime_parameter_set_parameters ( mime_param,pt->recv_fmtp );
if ( stream->ptime>0 ) {
belle_sdp_mime_parameter_set_ptime ( mime_param,stream->ptime );
belle_sdp_mime_parameter_set_parameters ( mime_param,pt->recv_fmtp );
if ( stream->ptime>0 ) {
belle_sdp_mime_parameter_set_ptime ( mime_param,stream->ptime );
}
belle_sdp_media_description_append_values_from_mime_parameter ( media_desc,mime_param );
belle_sip_object_unref ( mime_param );
}
belle_sdp_media_description_append_values_from_mime_parameter ( media_desc,mime_param );
belle_sip_object_unref ( mime_param );
} else {
/* to comply with SDP we cannot have an empty payload type number list */
/* as it happens only when mline is declined with a zero port, it does not matter to put whatever codec*/
belle_sip_list_t* format = belle_sip_list_append(NULL,0);
belle_sdp_media_set_media_formats(belle_sdp_media_description_get_media(media_desc),format);
}
/*only add a c= line within the stream description if address are differents*/
if (rtp_addr[0]!='\0' && strcmp(rtp_addr,md->addr)!=0){

@ -1 +1 @@
Subproject commit 8da2151d27c24413c22ae5a681d9c21b7e711b1a
Subproject commit d49f3eeadb4faf93dd16b381957e45088ad891fd

View file

@ -345,9 +345,10 @@ static void early_declined_call(void) {
CU_ASSERT_TRUE(wait_for(pauline->lc,marie->lc,&pauline->stat.number_of_LinphoneCallReleased,1));
CU_ASSERT_EQUAL(pauline->stat.number_of_LinphoneCallError,1);
/* FIXME http://git.linphone.org/mantis/view.php?id=757
CU_ASSERT_EQUAL(ms_list_size(linphone_core_get_call_logs(marie->lc)),1);
CU_ASSERT_EQUAL(linphone_call_get_reason(out_call),LinphoneReasonDeclined);
*/
if (ms_list_size(linphone_core_get_call_logs(marie->lc))>0) {
CU_ASSERT_PTR_NOT_NULL(in_call=(LinphoneCallLog*)(linphone_core_get_call_logs(marie->lc)->data));
CU_ASSERT_EQUAL(linphone_call_log_get_status(in_call),LinphoneCallDeclined);

View file

@ -241,6 +241,37 @@ register-on-gateway=true
# Default value: routing-domain
routing-param=routing-domain
[module::Router]
# Store and retrieve contacts without using the domain.
# Default value: false
use-global-domain=false
# Fork messages to all registered devices
# Default value: true
fork=true
# Force forking and thus the creation of an outgoing transaction
# even when only one contact found
# Default value: true
stateful=true
# Fork invites to late registers
# Default value: false
fork-late=false
# Only forward one response of forked invite to the caller
# Default value: true
fork-one-response=true
# All the forked have to decline in order to decline the caller
# invite
# Default value: false
fork-no-global-decline=false
# Maximum duration for delivering a message (text)
# Default value: 3600
message-delivery-timeout=3600
##
## The Registrar module accepts REGISTERs for domains it manages,
## and store the address of record in order to route other requests
@ -296,35 +327,12 @@ static-records-timeout=600
# Default value: internal
db-implementation=internal
# Store and retrieve contacts without using the domain.
# Default value: false
use-global-domain=false
# Fork messages to all registered devices
# Default value: true
fork=true
# Force forking and thus the creation of an outgoing transaction
# even when only one contact found
# Default value: true
stateful=true
# Fork invites to late registers
# Default value: false
fork-late=false
# Only forward one response of forked invite to the caller
# Default value: true
fork-one-response=true
# All the forked have to decline in order to decline the caller
# invite
# Default value: false
fork-no-global-decline=false
# Maximum duration for delivering a message (text)
# Default value: 3600
message-delivery-timeout=3600
# Generate a contact from the TO header and route it to the above
# destination. [sip:host:port]

View file

@ -458,8 +458,9 @@ static void tls_with_non_tls_server(){
linphone_proxy_config_set_server_addr(proxy_cfg,tmp);
linphone_proxy_config_done(proxy_cfg);
linphone_address_destroy(addr);
/* FIXME http://git.linphone.org/mantis/view.php?id=758
CU_ASSERT_TRUE(wait_for(lc,lc,&mgr->stat.number_of_LinphoneRegistrationFailed,1));
*/
linphone_core_manager_destroy(mgr);
}