fix bugs in tests.

This commit is contained in:
Simon Morlat 2013-11-19 22:21:55 +01:00
parent d69cf918b6
commit 2b6dcf779a
2 changed files with 7 additions and 3 deletions

View file

@ -382,12 +382,16 @@ static void call_failed_because_of_codecs(void) {
static void call_with_dns_time_out(void) {
LinphoneCoreManager* marie = linphone_core_manager_new2( "empty_rc", FALSE);
LCSipTransports transport = {9773,0,0,0};
int i;
linphone_core_set_sip_transports(marie->lc,&transport);
linphone_core_iterate(marie->lc);
sal_set_dns_timeout(marie->lc->sal,0);
linphone_core_invite(marie->lc,"sip:toto@toto.com");
linphone_core_iterate(marie->lc);
linphone_core_iterate(marie->lc);
for(i=0;i<10;i++){
ms_usleep(200000);
linphone_core_iterate(marie->lc);
}
CU_ASSERT_EQUAL(marie->stat.number_of_LinphoneCallOutgoingInit,1);
CU_ASSERT_EQUAL(marie->stat.number_of_LinphoneCallOutgoingProgress,1);
CU_ASSERT_EQUAL(marie->stat.number_of_LinphoneCallError,1);

View file

@ -220,7 +220,7 @@ static void info_message_with_args(bool_t with_content) {
info=linphone_core_create_info_message(marie->lc);
linphone_info_message_add_header(info,"Weather","still bad");
if (with_content) {
LinphoneContent ct;
LinphoneContent ct={0};
ct.type="application";
ct.subtype="somexml";
ct.data=(void*)info_content;