mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-05-07 05:53:06 +00:00
Fix dns timeout test issue + fix terminate call mhen state = OutgoingInit
This commit is contained in:
parent
275d7c10a7
commit
f1928d246f
12 changed files with 31 additions and 8 deletions
|
|
@ -125,6 +125,7 @@
|
|||
<AdditionalUsingDirectories>$(WindowsSDK_MetadataPath);$(AdditionalUsingDirectories)</AdditionalUsingDirectories>
|
||||
<PreprocessToFile>false</PreprocessToFile>
|
||||
<IgnoreStandardIncludePath>false</IgnoreStandardIncludePath>
|
||||
<ExceptionHandling>Sync</ExceptionHandling>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -0,0 +1,5 @@
|
|||
[net]
|
||||
mtu=1300
|
||||
|
||||
[sip]
|
||||
ping_with_options=0
|
||||
|
|
@ -129,6 +129,7 @@
|
|||
</Page>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Assets\empty_rc" />
|
||||
<Content Include="Assets\laure_rc" />
|
||||
<Content Include="Assets\marie_rc" />
|
||||
<Content Include="Assets\oldphone.wav" />
|
||||
|
|
|
|||
|
|
@ -453,6 +453,7 @@ int sal_call(SalOp *op, const char *from, const char *to){
|
|||
sal_op_set_from(op,from);
|
||||
sal_op_set_to(op,to);
|
||||
|
||||
ms_message("[%s] calling [%s] on op [%p]", from, to, op);
|
||||
invite=sal_op_build_request(op,"INVITE");
|
||||
|
||||
sal_op_fill_invite(op,invite);
|
||||
|
|
|
|||
|
|
@ -3313,7 +3313,13 @@ int linphone_core_terminate_call(LinphoneCore *lc, LinphoneCall *the_call)
|
|||
call = the_call;
|
||||
}
|
||||
|
||||
sal_call_terminate(call->op);
|
||||
if (call->state != LinphoneCallOutgoingInit)
|
||||
sal_call_terminate(call->op);
|
||||
else {
|
||||
/* In state OutgoingInit, op has to be destroyed */
|
||||
sal_op_release(call->op);
|
||||
call->op = NULL;
|
||||
}
|
||||
terminate_call(lc,call);
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1323,7 +1323,7 @@ LINPHONE_PUBLIC void linphone_core_set_user_data(LinphoneCore *lc, void *userdat
|
|||
|
||||
/* returns LpConfig object to read/write to the config file: usefull if you wish to extend
|
||||
the config file with your own sections */
|
||||
struct _LpConfig *linphone_core_get_config(LinphoneCore *lc);
|
||||
LINPHONE_PUBLIC struct _LpConfig *linphone_core_get_config(LinphoneCore *lc);
|
||||
|
||||
/*set a callback for some blocking operations, it takes you informed of the progress of the operation*/
|
||||
void linphone_core_set_waiting_callback(LinphoneCore *lc, LinphoneWaitingCallback cb, void *user_context);
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@
|
|||
#include <stdio.h>
|
||||
#include "CUnit/Basic.h"
|
||||
#include "linphonecore.h"
|
||||
#include "lpconfig.h"
|
||||
#include "private.h"
|
||||
#include "liblinphone_tester.h"
|
||||
|
||||
|
|
@ -200,12 +201,11 @@ static void cancelled_call(void) {
|
|||
}
|
||||
|
||||
static void call_with_dns_time_out(void) {
|
||||
LinphoneCoreManager* marie = linphone_core_manager_new(NULL, NULL);
|
||||
LinphoneCoreManager* marie = linphone_core_manager_new2(liblinphone_tester_file_prefix, "empty_rc", FALSE);
|
||||
LCSipTransports transport = {9773,0,0,0};
|
||||
linphone_core_set_sip_transports(marie->lc,&transport);
|
||||
linphone_core_iterate(marie->lc);
|
||||
sal_set_dns_timeout(marie->lc->sal,0);
|
||||
linphone_core_set_mtu(marie->lc, 1300);
|
||||
linphone_core_invite(marie->lc,"sip:toto@toto.com");
|
||||
linphone_core_iterate(marie->lc);
|
||||
linphone_core_iterate(marie->lc);
|
||||
|
|
|
|||
5
tester/empty_rc
Normal file
5
tester/empty_rc
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
[net]
|
||||
mtu=1300
|
||||
|
||||
[sip]
|
||||
ping_with_options=0
|
||||
|
|
@ -162,7 +162,7 @@ static void enable_codec(LinphoneCore* lc,const char* type,int rate) {
|
|||
}
|
||||
}
|
||||
|
||||
LinphoneCoreManager* linphone_core_manager_new(const char* path, const char* rc_file) {
|
||||
LinphoneCoreManager* linphone_core_manager_new2(const char* path, const char* rc_file, int check_for_proxies) {
|
||||
LinphoneCoreManager* mgr= malloc(sizeof(LinphoneCoreManager));
|
||||
LinphoneProxyConfig* proxy;
|
||||
memset (mgr,0,sizeof(LinphoneCoreManager));
|
||||
|
|
@ -173,7 +173,7 @@ LinphoneCoreManager* linphone_core_manager_new(const char* path, const char* rc_
|
|||
mgr->v_table.new_subscription_request=new_subscribtion_request;
|
||||
mgr->v_table.notify_presence_recv=notify_presence_received;
|
||||
mgr->v_table.transfer_state_changed=linphone_transfer_state_changed;
|
||||
mgr->lc=configure_lc_from(&mgr->v_table, path, rc_file, rc_file?1:0);
|
||||
mgr->lc=configure_lc_from(&mgr->v_table, path, rc_file, check_for_proxies?(rc_file?1:0):0);
|
||||
enable_codec(mgr->lc,"PCMU",8000);
|
||||
linphone_core_set_user_data(mgr->lc,&mgr->stat);
|
||||
linphone_core_get_default_proxy(mgr->lc,&proxy);
|
||||
|
|
@ -184,6 +184,10 @@ LinphoneCoreManager* linphone_core_manager_new(const char* path, const char* rc_
|
|||
return mgr;
|
||||
}
|
||||
|
||||
LinphoneCoreManager* linphone_core_manager_new(const char* path, const char* rc_file) {
|
||||
return linphone_core_manager_new2(path, rc_file, TRUE);
|
||||
}
|
||||
|
||||
void linphone_core_manager_destroy(LinphoneCoreManager* mgr) {
|
||||
linphone_core_destroy(mgr->lc);
|
||||
if (mgr->identity) linphone_address_destroy(mgr->identity);
|
||||
|
|
|
|||
|
|
@ -130,7 +130,7 @@ typedef struct _LinphoneCoreManager {
|
|||
LinphoneAddress* identity;
|
||||
} LinphoneCoreManager;
|
||||
|
||||
|
||||
LinphoneCoreManager* linphone_core_manager_new2(const char* path, const char* rc_file, int check_for_proxies);
|
||||
LinphoneCoreManager* linphone_core_manager_new(const char * path, const char* rc_file);
|
||||
void linphone_core_manager_destroy(LinphoneCoreManager* mgr);
|
||||
|
||||
|
|
|
|||
|
|
@ -313,7 +313,7 @@ static void io_recv_error(){
|
|||
test_t register_tests[] = {
|
||||
{ "Simple register", simple_register },
|
||||
{ "TCP register", simple_tcp_register },
|
||||
#ifndef ANDROID
|
||||
#ifndef ANDROID
|
||||
{ "TLS register", simple_tls_register },
|
||||
#endif
|
||||
{ "Simple authenticated register", simple_authenticated_register },
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue