mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-17 19:18:06 +00:00
Fix compilation for WP8
This commit is contained in:
parent
348e1ef874
commit
c3ebf99f5e
23 changed files with 194 additions and 147 deletions
|
|
@ -94,20 +94,22 @@
|
|||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level4</WarningLevel>
|
||||
<AdditionalIncludeDirectories>$(ProjectDir)..\..\..\coreapi;$(ProjectDir)..\..\..\..\mediastreamer2\include;$(ProjectDir)..\..\..\..\oRTP\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>__STDC_CONSTANT_MACROS;HAVE_SPEEXDSP;ORTP_INET6;WIN32;_DEBUG;_WINDOWS;_USRDLL;MEDIASTREAMER2_EXPORTS;MEDIASTREAMER2_INTERNAL_EXPORTS;WINDOW_NATIVE;_CRT_SECURE_NO_DEPRECATE;_TRUE_TIME;MS2_INTERNAL;MS2_FILTERS;IN_LINPHONE;USE_BELLESIP;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>$(ProjectDir)..\..\..\..\belle-sip\include;$(ProjectDir)..\..\..\..\oRTP\include;$(ProjectDir)..\..\..\..\mediastreamer2\include;$(ProjectDIr)..\..\..\..\tunnel\include;$(ProjectDir)..\..\..\coreapi;$(ProjectDir)..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>__STDC_CONSTANT_MACROS;_CRT_SECURE_NO_WARNINGS;WIN32;_DEBUG;_WINDOWS;_USRDLL;WINDOW_NATIVE;_TRUE_TIME;IN_LINPHONE;USE_BELLESIP;BUILD_UPNP;LINPHONE_PACKAGE_NAME="linphone";LINPHONE_VERSION="Devel";LIBLINPHONE_EXPORTS;LINPHONE_PLUGINS_DIR="";%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MinimalRebuild>false</MinimalRebuild>
|
||||
<BasicRuntimeChecks>Default</BasicRuntimeChecks>
|
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||
<CompileAsWinRT>false</CompileAsWinRT>
|
||||
<AdditionalUsingDirectories>$(WindowsSDK_MetadataPath);$(AdditionalUsingDirectories)</AdditionalUsingDirectories>
|
||||
<PreprocessToFile>false</PreprocessToFile>
|
||||
<IgnoreStandardIncludePath>false</IgnoreStandardIncludePath>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
|
||||
<GenerateWindowsMetadata>false</GenerateWindowsMetadata>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<AdditionalDependencies>mediastreamer2_dll.lib;ortp_dll.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>belle-sip_dll.lib;mediastreamer2_dll.lib;ws2_32.lib;ortp_dll.lib;gsm_dll.lib;speex_dll.lib;speexdsp_dll.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalLibraryDirectories>$(SolutionDir)$(Platform)\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<ImportLibrary>$(TargetDir)$(TargetName)_dll.lib</ImportLibrary>
|
||||
</Link>
|
||||
|
|
@ -117,10 +119,11 @@
|
|||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">
|
||||
<ClCompile>
|
||||
<PreprocessorDefinitions>_USRDLL;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>_USRDLL;NDEBUG;IN_LINPHONE;WIN32;USE_BELLESIP;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||
<CompileAsWinRT>false</CompileAsWinRT>
|
||||
<AdditionalUsingDirectories>$(WindowsSDK_MetadataPath);$(AdditionalUsingDirectories)</AdditionalUsingDirectories>
|
||||
<AdditionalIncludeDirectories>$(Project)../../../../belle-sip/include;$(Project)../../../../oRTP/include;$(Project)../../../../mediastreamer2/include;$(Project)../../../coreapi;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
|
|
@ -129,6 +132,65 @@
|
|||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\..\..\coreapi\address.c" />
|
||||
<ClCompile Include="..\..\..\coreapi\authentication.c" />
|
||||
<ClCompile Include="..\..\..\coreapi\bellesip_sal\sal_address_impl.c" />
|
||||
<ClCompile Include="..\..\..\coreapi\bellesip_sal\sal_impl.c" />
|
||||
<ClCompile Include="..\..\..\coreapi\bellesip_sal\sal_op_call.c" />
|
||||
<ClCompile Include="..\..\..\coreapi\bellesip_sal\sal_op_call_transfer.c" />
|
||||
<ClCompile Include="..\..\..\coreapi\bellesip_sal\sal_op_impl.c" />
|
||||
<ClCompile Include="..\..\..\coreapi\bellesip_sal\sal_op_message.c" />
|
||||
<ClCompile Include="..\..\..\coreapi\bellesip_sal\sal_op_presence.c" />
|
||||
<ClCompile Include="..\..\..\coreapi\bellesip_sal\sal_op_registration.c" />
|
||||
<ClCompile Include="..\..\..\coreapi\bellesip_sal\sal_sdp.c" />
|
||||
<ClCompile Include="..\..\..\coreapi\callbacks.c" />
|
||||
<ClCompile Include="..\..\..\coreapi\chat.c" />
|
||||
<ClCompile Include="..\..\..\coreapi\conference.c" />
|
||||
<ClCompile Include="..\..\..\coreapi\ec-calibrator.c" />
|
||||
<ClCompile Include="..\..\..\coreapi\enum.c" />
|
||||
<ClCompile Include="..\..\..\coreapi\friend.c" />
|
||||
<ClCompile Include="..\..\..\coreapi\linphonecall.c" />
|
||||
<ClCompile Include="..\..\..\coreapi\linphonecore.c" />
|
||||
<ClCompile Include="..\..\..\coreapi\lpconfig.c" />
|
||||
<ClCompile Include="..\..\..\coreapi\lsd.c" />
|
||||
<ClCompile Include="..\..\..\coreapi\misc.c" />
|
||||
<ClCompile Include="..\..\..\coreapi\offeranswer.c" />
|
||||
<ClCompile Include="..\..\..\coreapi\presence.c" />
|
||||
<ClCompile Include="..\..\..\coreapi\proxy.c" />
|
||||
<ClCompile Include="..\..\..\coreapi\sal.c" />
|
||||
<ClCompile Include="..\..\..\coreapi\siplogin.c" />
|
||||
<ClCompile Include="..\..\..\coreapi\sipsetup.c" />
|
||||
<ClCompile Include="..\..\..\coreapi\upnp.c" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\..\..\coreapi\bellesip_sal\sal_impl.h" />
|
||||
<ClInclude Include="..\..\..\coreapi\enum.h" />
|
||||
<ClInclude Include="..\..\..\coreapi\linphonecore.h" />
|
||||
<ClInclude Include="..\..\..\coreapi\linphonecore_utils.h" />
|
||||
<ClInclude Include="..\..\..\coreapi\linphonefriend.h" />
|
||||
<ClInclude Include="..\..\..\coreapi\lpconfig.h" />
|
||||
<ClInclude Include="..\..\..\coreapi\offeranswer.h" />
|
||||
<ClInclude Include="..\..\..\coreapi\private.h" />
|
||||
<ClInclude Include="..\..\..\coreapi\sipsetup.h" />
|
||||
<ClInclude Include="..\..\..\coreapi\upnp.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\..\..\belle-sip\build\windows\belle-sip\belle-sip.vcxproj">
|
||||
<Project>{4c225a82-800b-427b-ba7b-61686a9b347f}</Project>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\..\..\mediastreamer2\build\vsx\mediastreamer2\mediastreamer2\mediastreamer2.vcxproj">
|
||||
<Project>{027bad0e-9179-48c1-9733-7aa7e2c2ec70}</Project>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\..\..\oRTP\build\vsx\oRTP\oRTP\oRTP.vcxproj">
|
||||
<Project>{ffc7b532-0502-4d88-ac98-9e89071cbc97}</Project>
|
||||
<Private>false</Private>
|
||||
<ReferenceOutputAssembly>true</ReferenceOutputAssembly>
|
||||
<CopyLocalSatelliteAssemblies>false</CopyLocalSatelliteAssemblies>
|
||||
<LinkLibraryDependencies>true</LinkLibraryDependencies>
|
||||
<UseLibraryDependencyInputs>false</UseLibraryDependencyInputs>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup Condition="'$(Platform)'=='ARM'">
|
||||
<Reference Include="Windows">
|
||||
<IsWinMDFile>true</IsWinMDFile>
|
||||
|
|
@ -138,62 +200,6 @@
|
|||
<Private>false</Private>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\..\..\coreapi\address.c" />
|
||||
<ClCompile Include="..\..\..\coreapi\authentication.c" />
|
||||
<ClCompile Include="..\..\..\coreapi\callbacks.c" />
|
||||
<ClCompile Include="..\..\..\coreapi\chat.c" />
|
||||
<ClCompile Include="..\..\..\coreapi\conference.c" />
|
||||
<ClCompile Include="..\..\..\coreapi\ec-calibrator.c" />
|
||||
<ClCompile Include="..\..\..\coreapi\enum.c" />
|
||||
<ClCompile Include="..\..\..\coreapi\fonis.c" />
|
||||
<ClCompile Include="..\..\..\coreapi\friend.c" />
|
||||
<ClCompile Include="..\..\..\coreapi\help\buddy_status.c" />
|
||||
<ClCompile Include="..\..\..\coreapi\help\chatroom.c" />
|
||||
<ClCompile Include="..\..\..\coreapi\help\registration.c" />
|
||||
<ClCompile Include="..\..\..\coreapi\linphonecall.c" />
|
||||
<ClCompile Include="..\..\..\coreapi\linphonecore.c" />
|
||||
<ClCompile Include="..\..\..\coreapi\linphonecore_jni.cc" />
|
||||
<ClCompile Include="..\..\..\coreapi\linphone_tunnel.cc" />
|
||||
<ClCompile Include="..\..\..\coreapi\linphone_tunnel_config.c" />
|
||||
<ClCompile Include="..\..\..\coreapi\linphone_tunnel_stubs.c" />
|
||||
<ClCompile Include="..\..\..\coreapi\lpconfig.c" />
|
||||
<ClCompile Include="..\..\..\coreapi\lsd.c" />
|
||||
<ClCompile Include="..\..\..\coreapi\misc.c" />
|
||||
<ClCompile Include="..\..\..\coreapi\offeranswer.c" />
|
||||
<ClCompile Include="..\..\..\coreapi\plugins\buddylookup\src\lookup.c" />
|
||||
<ClCompile Include="..\..\..\coreapi\presence.c" />
|
||||
<ClCompile Include="..\..\..\coreapi\proxy.c" />
|
||||
<ClCompile Include="..\..\..\coreapi\sal.c" />
|
||||
<ClCompile Include="..\..\..\coreapi\sal_eXosip2.c" />
|
||||
<ClCompile Include="..\..\..\coreapi\sal_eXosip2_presence.c" />
|
||||
<ClCompile Include="..\..\..\coreapi\sal_eXosip2_sdp.c" />
|
||||
<ClCompile Include="..\..\..\coreapi\siplogin.c" />
|
||||
<ClCompile Include="..\..\..\coreapi\sipsetup.c" />
|
||||
<ClCompile Include="..\..\..\coreapi\sipwizard.c" />
|
||||
<ClCompile Include="..\..\..\coreapi\test_ecc.c" />
|
||||
<ClCompile Include="..\..\..\coreapi\test_lsd.c" />
|
||||
<ClCompile Include="..\..\..\coreapi\test_numbers.c" />
|
||||
<ClCompile Include="..\..\..\coreapi\TunnelManager.cc" />
|
||||
<ClCompile Include="..\..\..\coreapi\upnp.c" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\..\..\coreapi\enum.h" />
|
||||
<ClInclude Include="..\..\..\coreapi\linphonecore.h" />
|
||||
<ClInclude Include="..\..\..\coreapi\linphonecore_utils.h" />
|
||||
<ClInclude Include="..\..\..\coreapi\linphonefriend.h" />
|
||||
<ClInclude Include="..\..\..\coreapi\linphone_tunnel.h" />
|
||||
<ClInclude Include="..\..\..\coreapi\lpconfig.h" />
|
||||
<ClInclude Include="..\..\..\coreapi\offeranswer.h" />
|
||||
<ClInclude Include="..\..\..\coreapi\private.h" />
|
||||
<ClInclude Include="..\..\..\coreapi\sal.h" />
|
||||
<ClInclude Include="..\..\..\coreapi\sal_eXosip2.h" />
|
||||
<ClInclude Include="..\..\..\coreapi\sipsetup.h" />
|
||||
<ClInclude Include="..\..\..\coreapi\upnp.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="..\..\..\coreapi\TunnelManager.hh" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<Import Project="$(MSBuildExtensionsPath)\Microsoft\WindowsPhone\v$(TargetPlatformVersion)\Microsoft.Cpp.WindowsPhone.$(TargetPlatformVersion).targets" Condition="'$(Platform)'=='ARM'" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
|
|
|
|||
|
|
@ -14,14 +14,9 @@
|
|||
<ClCompile Include="..\..\..\coreapi\conference.c" />
|
||||
<ClCompile Include="..\..\..\coreapi\ec-calibrator.c" />
|
||||
<ClCompile Include="..\..\..\coreapi\enum.c" />
|
||||
<ClCompile Include="..\..\..\coreapi\fonis.c" />
|
||||
<ClCompile Include="..\..\..\coreapi\friend.c" />
|
||||
<ClCompile Include="..\..\..\coreapi\linphone_tunnel.cc" />
|
||||
<ClCompile Include="..\..\..\coreapi\linphone_tunnel_config.c" />
|
||||
<ClCompile Include="..\..\..\coreapi\linphone_tunnel_stubs.c" />
|
||||
<ClCompile Include="..\..\..\coreapi\linphonecall.c" />
|
||||
<ClCompile Include="..\..\..\coreapi\linphonecore.c" />
|
||||
<ClCompile Include="..\..\..\coreapi\linphonecore_jni.cc" />
|
||||
<ClCompile Include="..\..\..\coreapi\lpconfig.c" />
|
||||
<ClCompile Include="..\..\..\coreapi\lsd.c" />
|
||||
<ClCompile Include="..\..\..\coreapi\misc.c" />
|
||||
|
|
@ -29,37 +24,29 @@
|
|||
<ClCompile Include="..\..\..\coreapi\presence.c" />
|
||||
<ClCompile Include="..\..\..\coreapi\proxy.c" />
|
||||
<ClCompile Include="..\..\..\coreapi\sal.c" />
|
||||
<ClCompile Include="..\..\..\coreapi\sal_eXosip2.c" />
|
||||
<ClCompile Include="..\..\..\coreapi\sal_eXosip2_presence.c" />
|
||||
<ClCompile Include="..\..\..\coreapi\sal_eXosip2_sdp.c" />
|
||||
<ClCompile Include="..\..\..\coreapi\siplogin.c" />
|
||||
<ClCompile Include="..\..\..\coreapi\sipsetup.c" />
|
||||
<ClCompile Include="..\..\..\coreapi\sipwizard.c" />
|
||||
<ClCompile Include="..\..\..\coreapi\test_ecc.c" />
|
||||
<ClCompile Include="..\..\..\coreapi\test_lsd.c" />
|
||||
<ClCompile Include="..\..\..\coreapi\test_numbers.c" />
|
||||
<ClCompile Include="..\..\..\coreapi\TunnelManager.cc" />
|
||||
<ClCompile Include="..\..\..\coreapi\upnp.c" />
|
||||
<ClCompile Include="..\..\..\coreapi\help\buddy_status.c" />
|
||||
<ClCompile Include="..\..\..\coreapi\help\chatroom.c" />
|
||||
<ClCompile Include="..\..\..\coreapi\help\registration.c" />
|
||||
<ClCompile Include="..\..\..\coreapi\plugins\buddylookup\src\lookup.c" />
|
||||
<ClCompile Include="..\..\..\coreapi\bellesip_sal\sal_address_impl.c" />
|
||||
<ClCompile Include="..\..\..\coreapi\bellesip_sal\sal_impl.c" />
|
||||
<ClCompile Include="..\..\..\coreapi\bellesip_sal\sal_op_call.c" />
|
||||
<ClCompile Include="..\..\..\coreapi\bellesip_sal\sal_op_call_transfer.c" />
|
||||
<ClCompile Include="..\..\..\coreapi\bellesip_sal\sal_op_impl.c" />
|
||||
<ClCompile Include="..\..\..\coreapi\bellesip_sal\sal_op_message.c" />
|
||||
<ClCompile Include="..\..\..\coreapi\bellesip_sal\sal_op_presence.c" />
|
||||
<ClCompile Include="..\..\..\coreapi\bellesip_sal\sal_op_registration.c" />
|
||||
<ClCompile Include="..\..\..\coreapi\bellesip_sal\sal_sdp.c" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\..\..\coreapi\enum.h" />
|
||||
<ClInclude Include="..\..\..\coreapi\linphone_tunnel.h" />
|
||||
<ClInclude Include="..\..\..\coreapi\linphonecore.h" />
|
||||
<ClInclude Include="..\..\..\coreapi\linphonecore_utils.h" />
|
||||
<ClInclude Include="..\..\..\coreapi\linphonefriend.h" />
|
||||
<ClInclude Include="..\..\..\coreapi\lpconfig.h" />
|
||||
<ClInclude Include="..\..\..\coreapi\offeranswer.h" />
|
||||
<ClInclude Include="..\..\..\coreapi\private.h" />
|
||||
<ClInclude Include="..\..\..\coreapi\sal.h" />
|
||||
<ClInclude Include="..\..\..\coreapi\sal_eXosip2.h" />
|
||||
<ClInclude Include="..\..\..\coreapi\sipsetup.h" />
|
||||
<ClInclude Include="..\..\..\coreapi\upnp.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="..\..\..\coreapi\TunnelManager.hh" />
|
||||
<ClInclude Include="..\..\..\coreapi\bellesip_sal\sal_impl.h" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
|
@ -21,7 +21,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
#include "config.h"
|
||||
#endif
|
||||
|
||||
|
||||
void _belle_sip_log(belle_sip_log_level lev, const char *fmt, va_list args) {
|
||||
int ortp_level;
|
||||
switch(lev) {
|
||||
|
|
@ -209,8 +208,8 @@ static void process_response_event(void *user_ctx, const belle_sip_response_even
|
|||
int rport;
|
||||
bool_t contact_updated=FALSE;
|
||||
char* new_contact;
|
||||
belle_sip_request_t* old_request=NULL;;
|
||||
belle_sip_response_t* old_response=NULL;;
|
||||
belle_sip_request_t* old_request=NULL;
|
||||
belle_sip_response_t* old_response=NULL;
|
||||
|
||||
|
||||
if (op->state == SalOpStateTerminated) {
|
||||
|
|
@ -346,12 +345,14 @@ static void process_transaction_terminated(void *user_ctx, const belle_sip_trans
|
|||
belle_sip_client_transaction_t* client_transaction = belle_sip_transaction_terminated_event_get_client_transaction(event);
|
||||
belle_sip_server_transaction_t* server_transaction = belle_sip_transaction_terminated_event_get_server_transaction(event);
|
||||
belle_sip_transaction_t* trans;
|
||||
SalOp* op;
|
||||
|
||||
if(client_transaction)
|
||||
trans=BELLE_SIP_TRANSACTION(client_transaction);
|
||||
else
|
||||
trans=BELLE_SIP_TRANSACTION(server_transaction);
|
||||
|
||||
SalOp* op = (SalOp*)belle_sip_transaction_get_application_data(trans);
|
||||
op = (SalOp*)belle_sip_transaction_get_application_data(trans);
|
||||
if (op && op->callbacks.process_transaction_terminated) {
|
||||
op->callbacks.process_transaction_terminated(op,event);
|
||||
} else {
|
||||
|
|
@ -377,7 +378,7 @@ Sal * sal_init(){
|
|||
sal->nat_helper_enabled=TRUE;
|
||||
snprintf(stack_string,sizeof(stack_string)-1,"(belle-sip/%s)",belle_sip_version_to_string());
|
||||
sal->user_agent=belle_sip_header_user_agent_new();
|
||||
belle_sip_header_user_agent_add_product(sal->user_agent, PACKAGE_NAME "/" LINPHONE_VERSION);
|
||||
belle_sip_header_user_agent_add_product(sal->user_agent, LINPHONE_PACKAGE_NAME "/" LINPHONE_VERSION);
|
||||
belle_sip_header_user_agent_add_product(sal->user_agent,stack_string);
|
||||
belle_sip_object_ref(sal->user_agent);
|
||||
belle_sip_set_log_handler(_belle_sip_log);
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
|
||||
#ifndef SAL_IMPL_H_
|
||||
#define SAL_IMPL_H_
|
||||
#include "sal.h"
|
||||
#include "sal/sal.h"
|
||||
#include "belle-sip/belle-sip.h"
|
||||
#include "belle-sip/belle-sdp.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -162,8 +162,8 @@ int sal_call_notify_refer_state(SalOp *op, SalOp *newcall){
|
|||
|
||||
void sal_op_process_refer(SalOp *op, const belle_sip_request_event_t *event){
|
||||
belle_sip_request_t* req = belle_sip_request_event_get_request(event);
|
||||
belle_sip_header_refer_to_t *refer_to= belle_sip_message_get_header_by_type(BELLE_SIP_MESSAGE(req),belle_sip_header_refer_to_t);;
|
||||
belle_sip_header_referred_by_t *referred_by= belle_sip_message_get_header_by_type(BELLE_SIP_MESSAGE(req),belle_sip_header_referred_by_t);;
|
||||
belle_sip_header_refer_to_t *refer_to= belle_sip_message_get_header_by_type(BELLE_SIP_MESSAGE(req),belle_sip_header_refer_to_t);
|
||||
belle_sip_header_referred_by_t *referred_by= belle_sip_message_get_header_by_type(BELLE_SIP_MESSAGE(req),belle_sip_header_referred_by_t);
|
||||
belle_sip_server_transaction_t* server_transaction = belle_sip_provider_create_server_transaction(op->base.root->prov,req);
|
||||
belle_sip_response_t* resp;
|
||||
belle_sip_uri_t* refer_to_uri;
|
||||
|
|
|
|||
|
|
@ -479,7 +479,7 @@ static void presence_process_request_event(void *op_base, const belle_sip_reques
|
|||
belle_sip_request_t* req = belle_sip_request_event_get_request(event);
|
||||
belle_sip_dialog_state_t dialog_state;
|
||||
belle_sip_header_subscription_state_t* subscription_state_header=belle_sip_message_get_header_by_type(req,belle_sip_header_subscription_state_t);
|
||||
belle_sip_header_expires_t* expires = belle_sip_message_get_header_by_type(req,belle_sip_header_expires_t);;
|
||||
belle_sip_header_expires_t* expires = belle_sip_message_get_header_by_type(req,belle_sip_header_expires_t);
|
||||
const char* body = belle_sip_message_get_body(BELLE_SIP_MESSAGE(req));
|
||||
SalPresenceStatus estatus=SalPresenceOffline;
|
||||
SalSubscribeStatus sub_state;
|
||||
|
|
|
|||
|
|
@ -125,6 +125,7 @@ static int send_register_request_with_expires(SalOp* op, belle_sip_request_t* re
|
|||
|
||||
int sal_register(SalOp *op, const char *proxy, const char *from, int expires){
|
||||
belle_sip_request_t *req;
|
||||
belle_sip_uri_t* req_uri;
|
||||
sal_op_set_from(op,from);
|
||||
sal_op_set_to(op,from);
|
||||
sal_op_set_route(op,proxy);
|
||||
|
|
@ -134,7 +135,7 @@ int sal_register(SalOp *op, const char *proxy, const char *from, int expires){
|
|||
op->callbacks.process_transaction_terminated=register_process_transaction_terminated;
|
||||
|
||||
req = sal_op_build_request(op,"REGISTER");
|
||||
belle_sip_uri_t* req_uri = belle_sip_request_get_uri(req);
|
||||
req_uri = belle_sip_request_get_uri(req);
|
||||
belle_sip_uri_set_user(req_uri,NULL); /*remove userinfo if any*/
|
||||
|
||||
return send_register_request_with_expires(op,req,expires);
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
*/
|
||||
|
||||
|
||||
#include "sal.h"
|
||||
#include "sal/sal.h"
|
||||
|
||||
#include "linphonecore.h"
|
||||
#include "private.h"
|
||||
|
|
@ -179,9 +179,9 @@ static bool_t is_duplicate_call(LinphoneCore *lc, const LinphoneAddress *from, c
|
|||
#endif
|
||||
|
||||
static bool_t already_a_call_with_remote_address(const LinphoneCore *lc, const LinphoneAddress *remote) {
|
||||
MSList *elem;
|
||||
ms_warning(" searching for already_a_call_with_remote_address.");
|
||||
|
||||
MSList *elem;
|
||||
for(elem=lc->calls;elem!=NULL;elem=elem->next){
|
||||
const LinphoneCall *call=(LinphoneCall*)elem->data;
|
||||
const LinphoneAddress *cRemote=linphone_call_get_remote_address(call);
|
||||
|
|
|
|||
|
|
@ -215,6 +215,7 @@ int linphone_core_add_to_conference(LinphoneCore *lc, LinphoneCall *call){
|
|||
|
||||
static int remove_from_conference(LinphoneCore *lc, LinphoneCall *call, bool_t active){
|
||||
int err=0;
|
||||
char *str;
|
||||
|
||||
if (!call->current_params.in_conference){
|
||||
if (call->params.in_conference){
|
||||
|
|
@ -227,7 +228,7 @@ static int remove_from_conference(LinphoneCore *lc, LinphoneCall *call, bool_t a
|
|||
}
|
||||
call->params.in_conference=FALSE;
|
||||
|
||||
char *str=linphone_call_get_remote_address_as_string(call);
|
||||
str=linphone_call_get_remote_address_as_string(call);
|
||||
ms_message("%s will be removed from conference", str);
|
||||
ms_free(str);
|
||||
if (active){
|
||||
|
|
@ -283,10 +284,11 @@ static int convert_conference_to_call(LinphoneCore *lc){
|
|||
* @returns 0 if successful, -1 otherwise.
|
||||
**/
|
||||
int linphone_core_remove_from_conference(LinphoneCore *lc, LinphoneCall *call){
|
||||
int err;
|
||||
char * str=linphone_call_get_remote_address_as_string(call);
|
||||
ms_message("Removing call %s from the conference", str);
|
||||
ms_free(str);
|
||||
int err=remove_from_conference(lc,call, FALSE);
|
||||
err=remove_from_conference(lc,call, FALSE);
|
||||
if (err){
|
||||
ms_error("Error removing participant from conference.");
|
||||
return err;
|
||||
|
|
@ -335,13 +337,14 @@ int linphone_core_leave_conference(LinphoneCore *lc){
|
|||
* @returns 0 if successful, -1 otherwise
|
||||
**/
|
||||
int linphone_core_enter_conference(LinphoneCore *lc){
|
||||
LinphoneConference *conf;
|
||||
if (linphone_core_sound_resources_locked(lc)) {
|
||||
return -1;
|
||||
}
|
||||
if (lc->current_call != NULL) {
|
||||
linphone_core_pause_call(lc, lc->current_call);
|
||||
}
|
||||
LinphoneConference *conf=&lc->conf_ctx;
|
||||
conf=&lc->conf_ctx;
|
||||
if (conf->local_participant==NULL) add_local_endpoint(conf,lc);
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -241,11 +241,13 @@ void ec_calibrator_destroy(EcCalibrator *ecc){
|
|||
}
|
||||
|
||||
int linphone_core_start_echo_calibration(LinphoneCore *lc, LinphoneEcCalibrationCallback cb, void *cb_data){
|
||||
unsigned int rate;
|
||||
|
||||
if (lc->ecc!=NULL){
|
||||
ms_error("Echo calibration is still on going !");
|
||||
return -1;
|
||||
}
|
||||
unsigned int rate = lp_config_get_int(lc->config,"sound","echo_cancellation_rate",8000);
|
||||
rate = lp_config_get_int(lc->config,"sound","echo_cancellation_rate",8000);
|
||||
lc->ecc=ec_calibrator_new(lc->sound_conf.play_sndcard,lc->sound_conf.capt_sndcard,rate,cb,cb_data);
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -152,11 +152,13 @@ LinphoneFriend * linphone_friend_new(){
|
|||
|
||||
LinphoneFriend *linphone_friend_new_with_addr(const char *addr){
|
||||
LinphoneAddress* linphone_address = linphone_address_new(addr);
|
||||
LinphoneFriend *fr;
|
||||
|
||||
if (linphone_address == NULL) {
|
||||
ms_error("Cannot create friend for address [%s]",addr?addr:"null");
|
||||
return NULL;
|
||||
}
|
||||
LinphoneFriend *fr=linphone_friend_new();
|
||||
fr=linphone_friend_new();
|
||||
if (linphone_friend_set_addr(fr,linphone_address)<0){
|
||||
linphone_friend_destroy(fr);
|
||||
return NULL;
|
||||
|
|
@ -440,6 +442,8 @@ LinphoneFriend *linphone_core_get_friend_by_address(const LinphoneCore *lc, cons
|
|||
const MSList *elem;
|
||||
const char *username;
|
||||
const char *domain;
|
||||
const char *it_username;
|
||||
const char *it_host;
|
||||
LinphoneFriend *lf=NULL;
|
||||
|
||||
if (puri==NULL){
|
||||
|
|
@ -453,8 +457,8 @@ LinphoneFriend *linphone_core_get_friend_by_address(const LinphoneCore *lc, cons
|
|||
}
|
||||
for(elem=lc->friends;elem!=NULL;elem=ms_list_next(elem)){
|
||||
lf=(LinphoneFriend*)elem->data;
|
||||
const char *it_username=linphone_address_get_username(lf->uri);
|
||||
const char *it_host=linphone_address_get_domain(lf->uri);;
|
||||
it_username=linphone_address_get_username(lf->uri);
|
||||
it_host=linphone_address_get_domain(lf->uri);;
|
||||
if (strcasecmp(domain,it_host)==0 && username_match(username,it_username)){
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -120,9 +120,10 @@ static void linphone_call_videostream_encryption_changed(void *data, bool_t encr
|
|||
|
||||
static void linphone_call_audiostream_encryption_changed(void *data, bool_t encrypted) {
|
||||
char status[255]={0};
|
||||
LinphoneCall *call;
|
||||
ms_message("Audio stream is %s ", encrypted ? "encrypted" : "not encrypted");
|
||||
|
||||
LinphoneCall *call = (LinphoneCall *)data;
|
||||
call = (LinphoneCall *)data;
|
||||
call->audiostream_encrypted=encrypted;
|
||||
|
||||
if (encrypted && call->core->vtable.display_status != NULL) {
|
||||
|
|
@ -1333,6 +1334,13 @@ void _post_configure_audio_stream(AudioStream *st, LinphoneCore *lc, bool_t mute
|
|||
float ng_thres=lp_config_get_float(lc->config,"sound","ng_thres",0.05);
|
||||
float ng_floorgain=lp_config_get_float(lc->config,"sound","ng_floorgain",0);
|
||||
int dc_removal=lp_config_get_int(lc->config,"sound","dc_removal",0);
|
||||
float speed;
|
||||
float force;
|
||||
int sustain;
|
||||
float transmit_thres;
|
||||
MSFilter *f=NULL;
|
||||
float floorgain;
|
||||
int spk_agc;
|
||||
|
||||
if (!muted)
|
||||
linphone_core_set_mic_gain_db (lc, mic_gain);
|
||||
|
|
@ -1346,12 +1354,11 @@ void _post_configure_audio_stream(AudioStream *st, LinphoneCore *lc, bool_t mute
|
|||
|
||||
if (st->volsend){
|
||||
ms_filter_call_method(st->volsend,MS_VOLUME_REMOVE_DC,&dc_removal);
|
||||
float speed=lp_config_get_float(lc->config,"sound","el_speed",-1);
|
||||
speed=lp_config_get_float(lc->config,"sound","el_speed",-1);
|
||||
thres=lp_config_get_float(lc->config,"sound","el_thres",-1);
|
||||
float force=lp_config_get_float(lc->config,"sound","el_force",-1);
|
||||
int sustain=lp_config_get_int(lc->config,"sound","el_sustain",-1);
|
||||
float transmit_thres=lp_config_get_float(lc->config,"sound","el_transmit_thres",-1);
|
||||
MSFilter *f=NULL;
|
||||
force=lp_config_get_float(lc->config,"sound","el_force",-1);
|
||||
sustain=lp_config_get_int(lc->config,"sound","el_sustain",-1);
|
||||
transmit_thres=lp_config_get_float(lc->config,"sound","el_transmit_thres",-1);
|
||||
f=st->volsend;
|
||||
if (speed==-1) speed=0.03;
|
||||
if (force==-1) force=25;
|
||||
|
|
@ -1369,8 +1376,8 @@ void _post_configure_audio_stream(AudioStream *st, LinphoneCore *lc, bool_t mute
|
|||
}
|
||||
if (st->volrecv){
|
||||
/* parameters for a limited noise-gate effect, using echo limiter threshold */
|
||||
float floorgain = 1/pow(10,(mic_gain)/10);
|
||||
int spk_agc=lp_config_get_int(lc->config,"sound","speaker_agc_enabled",0);
|
||||
floorgain = 1/pow(10,(mic_gain)/10);
|
||||
spk_agc=lp_config_get_int(lc->config,"sound","speaker_agc_enabled",0);
|
||||
ms_filter_call_method(st->volrecv, MS_VOLUME_ENABLE_AGC, &spk_agc);
|
||||
ms_filter_call_method(st->volrecv,MS_VOLUME_SET_NOISE_GATE_THRESHOLD,&ng_thres);
|
||||
ms_filter_call_method(st->volrecv,MS_VOLUME_SET_NOISE_GATE_FLOORGAIN,&floorgain);
|
||||
|
|
@ -1478,9 +1485,19 @@ static void linphone_call_start_audio_stream(LinphoneCall *call, const char *cna
|
|||
LinphoneCore *lc=call->core;
|
||||
int used_pt=-1;
|
||||
char rtcp_tool[128]={0};
|
||||
const SalStreamDescription *stream;
|
||||
MSSndCard *playcard;
|
||||
MSSndCard *captcard;
|
||||
bool_t use_ec;
|
||||
bool_t mute;
|
||||
const char *playfile;
|
||||
const char *recfile;
|
||||
const SalStreamDescription *local_st_desc;
|
||||
int crypto_idx;
|
||||
|
||||
snprintf(rtcp_tool,sizeof(rtcp_tool)-1,"%s-%s",linphone_core_get_user_agent_name(),linphone_core_get_user_agent_version());
|
||||
/* look for savp stream first */
|
||||
const SalStreamDescription *stream=sal_media_description_find_stream(call->resultdesc,
|
||||
stream=sal_media_description_find_stream(call->resultdesc,
|
||||
SalProtoRtpSavp,SalAudio);
|
||||
/* no savp audio stream, use avp */
|
||||
if (!stream)
|
||||
|
|
@ -1488,13 +1505,12 @@ static void linphone_call_start_audio_stream(LinphoneCall *call, const char *cna
|
|||
SalProtoRtpAvp,SalAudio);
|
||||
|
||||
if (stream && stream->dir!=SalStreamInactive && stream->rtp_port!=0){
|
||||
MSSndCard *playcard=lc->sound_conf.lsd_card ?
|
||||
playcard=lc->sound_conf.lsd_card ?
|
||||
lc->sound_conf.lsd_card : lc->sound_conf.play_sndcard;
|
||||
MSSndCard *captcard=lc->sound_conf.capt_sndcard;
|
||||
const char *playfile=lc->play_file;
|
||||
const char *recfile=lc->rec_file;
|
||||
captcard=lc->sound_conf.capt_sndcard;
|
||||
playfile=lc->play_file;
|
||||
recfile=lc->rec_file;
|
||||
call->audio_profile=make_profile(call,call->resultdesc,stream,&used_pt);
|
||||
bool_t use_ec;
|
||||
|
||||
if (used_pt!=-1){
|
||||
call->current_params.audio_codec = rtp_profile_get_payload(call->audio_profile, used_pt);
|
||||
|
|
@ -1570,9 +1586,9 @@ static void linphone_call_start_audio_stream(LinphoneCall *call, const char *cna
|
|||
|
||||
/* valid local tags are > 0 */
|
||||
if (stream->proto == SalProtoRtpSavp) {
|
||||
const SalStreamDescription *local_st_desc=sal_media_description_find_stream(call->localdesc,
|
||||
local_st_desc=sal_media_description_find_stream(call->localdesc,
|
||||
SalProtoRtpSavp,SalAudio);
|
||||
int crypto_idx = find_crypto_index_from_tag(local_st_desc->crypto, stream->crypto_local_tag);
|
||||
crypto_idx = find_crypto_index_from_tag(local_st_desc->crypto, stream->crypto_local_tag);
|
||||
|
||||
if (crypto_idx >= 0) {
|
||||
audio_stream_enable_srtp(
|
||||
|
|
@ -1588,7 +1604,7 @@ static void linphone_call_start_audio_stream(LinphoneCall *call, const char *cna
|
|||
}else call->audiostream_encrypted=FALSE;
|
||||
if (call->params.in_conference){
|
||||
/*transform the graph to connect it to the conference filter */
|
||||
bool_t mute=stream->dir==SalStreamRecvOnly;
|
||||
mute=stream->dir==SalStreamRecvOnly;
|
||||
linphone_call_add_to_conf(call, mute);
|
||||
}
|
||||
call->current_params.in_conference=call->params.in_conference;
|
||||
|
|
@ -1696,13 +1712,15 @@ static void linphone_call_start_video_stream(LinphoneCall *call, const char *cna
|
|||
|
||||
void linphone_call_start_media_streams(LinphoneCall *call, bool_t all_inputs_muted, bool_t send_ringbacktone){
|
||||
LinphoneCore *lc=call->core;
|
||||
LinphoneAddress *me;
|
||||
char *cname;
|
||||
bool_t use_arc;
|
||||
|
||||
call->current_params.audio_codec = NULL;
|
||||
call->current_params.video_codec = NULL;
|
||||
|
||||
LinphoneAddress *me=linphone_core_get_primary_contact_parsed(lc);
|
||||
char *cname;
|
||||
bool_t use_arc=linphone_core_adaptive_rate_control_enabled(lc);
|
||||
me=linphone_core_get_primary_contact_parsed(lc);
|
||||
use_arc=linphone_core_adaptive_rate_control_enabled(lc);
|
||||
#ifdef VIDEO_ENABLED
|
||||
const SalStreamDescription *vstream=sal_media_description_find_stream(call->resultdesc,
|
||||
SalProtoRtpAvp,SalVideo);
|
||||
|
|
@ -2373,10 +2391,11 @@ void linphone_call_zoom_video(LinphoneCall* call, float zoom_factor, float* cx,
|
|||
VideoStream* vstream = call->videostream;
|
||||
if (vstream && vstream->output) {
|
||||
float zoom[3];
|
||||
float halfsize;
|
||||
|
||||
if (zoom_factor < 1)
|
||||
zoom_factor = 1;
|
||||
float halfsize = 0.5 * 1.0 / zoom_factor;
|
||||
halfsize = 0.5 * 1.0 / zoom_factor;
|
||||
|
||||
if ((*cx - halfsize) < 0)
|
||||
*cx = 0 + halfsize;
|
||||
|
|
|
|||
|
|
@ -2176,7 +2176,7 @@ void linphone_core_iterate(LinphoneCore *lc){
|
|||
LinphoneAddress * linphone_core_interpret_url(LinphoneCore *lc, const char *url){
|
||||
enum_lookup_res_t *enumres=NULL;
|
||||
char *enum_domain=NULL;
|
||||
LinphoneProxyConfig *proxy=lc->default_proxy;;
|
||||
LinphoneProxyConfig *proxy=lc->default_proxy;
|
||||
char *tmpurl;
|
||||
LinphoneAddress *uri;
|
||||
|
||||
|
|
@ -5344,9 +5344,10 @@ static void linphone_core_uninit(LinphoneCore *lc)
|
|||
}
|
||||
|
||||
static void set_network_reachable(LinphoneCore* lc,bool_t isReachable, time_t curtime){
|
||||
ms_message("Network state is now [%s]",isReachable?"UP":"DOWN");
|
||||
// second get the list of available proxies
|
||||
const MSList *elem=linphone_core_get_proxy_config_list(lc);
|
||||
|
||||
ms_message("Network state is now [%s]",isReachable?"UP":"DOWN");
|
||||
for(;elem!=NULL;elem=elem->next){
|
||||
LinphoneProxyConfig *cfg=(LinphoneProxyConfig*)elem->data;
|
||||
if (linphone_proxy_config_register_enabled(cfg) ) {
|
||||
|
|
@ -5661,13 +5662,18 @@ const char *linphone_core_get_zrtp_secrets_file(LinphoneCore *lc){
|
|||
}
|
||||
|
||||
const LinphoneCall* linphone_core_find_call_from_uri(LinphoneCore *lc, const char *uri) {
|
||||
MSList *calls;
|
||||
const LinphoneCall *c;
|
||||
const LinphoneAddress *address;
|
||||
char *current_uri;
|
||||
|
||||
if (uri == NULL) return NULL;
|
||||
MSList *calls=lc->calls;
|
||||
calls=lc->calls;
|
||||
while(calls) {
|
||||
const LinphoneCall *c=(LinphoneCall*)calls->data;
|
||||
c=(LinphoneCall*)calls->data;
|
||||
calls=calls->next;
|
||||
const LinphoneAddress *address = linphone_call_get_remote_address(c);
|
||||
char *current_uri=linphone_address_as_string_uri_only(address);
|
||||
address = linphone_call_get_remote_address(c);
|
||||
current_uri=linphone_address_as_string_uri_only(address);
|
||||
if (strcmp(uri,current_uri)==0) {
|
||||
ms_free(current_uri);
|
||||
return c;
|
||||
|
|
|
|||
|
|
@ -34,6 +34,9 @@
|
|||
#include <errno.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#if _MSC_VER
|
||||
#include <io.h>
|
||||
#endif
|
||||
#endif /*_WIN32_WCE*/
|
||||
|
||||
|
||||
|
|
@ -140,18 +143,20 @@ LpItem *lp_section_find_item(const LpSection *sec, const char *name){
|
|||
void lp_config_parse(LpConfig *lpconfig, FILE *file){
|
||||
char tmp[MAX_LEN]= {'\0'};
|
||||
LpSection *cur=NULL;
|
||||
char *pos1,*pos2;
|
||||
int nbs;
|
||||
char secname[MAX_LEN];
|
||||
char key[MAX_LEN];
|
||||
LpItem *item;
|
||||
|
||||
if (file==NULL) return;
|
||||
|
||||
while(fgets(tmp,MAX_LEN,file)!=NULL){
|
||||
tmp[sizeof(tmp) -1] = '\0';
|
||||
char *pos1,*pos2;
|
||||
pos1=strchr(tmp,'[');
|
||||
if (pos1!=NULL && is_first_char(tmp,pos1) ){
|
||||
pos2=strchr(pos1,']');
|
||||
if (pos2!=NULL){
|
||||
int nbs;
|
||||
char secname[MAX_LEN];
|
||||
secname[0]='\0';
|
||||
/* found section */
|
||||
*pos2='\0';
|
||||
|
|
@ -171,7 +176,6 @@ void lp_config_parse(LpConfig *lpconfig, FILE *file){
|
|||
}else {
|
||||
pos1=strchr(tmp,'=');
|
||||
if (pos1!=NULL){
|
||||
char key[MAX_LEN];
|
||||
key[0]='\0';
|
||||
|
||||
*pos1='\0';
|
||||
|
|
@ -191,7 +195,7 @@ void lp_config_parse(LpConfig *lpconfig, FILE *file){
|
|||
if (pos2-pos1>=0){
|
||||
/* found a pair key,value */
|
||||
if (cur!=NULL){
|
||||
LpItem *item=lp_section_find_item(cur,key);
|
||||
item=lp_section_find_item(cur,key);
|
||||
if (item==NULL){
|
||||
lp_section_add_item(cur,lp_item_new(key,pos1));
|
||||
}else{
|
||||
|
|
@ -211,17 +215,20 @@ void lp_config_parse(LpConfig *lpconfig, FILE *file){
|
|||
|
||||
LpConfig * lp_config_new(const char *filename){
|
||||
LpConfig *lpconfig=lp_new0(LpConfig,1);
|
||||
struct stat fileStat;
|
||||
if (filename!=NULL){
|
||||
lpconfig->filename=ortp_strdup(filename);
|
||||
lpconfig->file=fopen(filename,"rw");
|
||||
if (lpconfig->file!=NULL){
|
||||
struct stat fileStat;
|
||||
lp_config_parse(lpconfig,lpconfig->file);
|
||||
fclose(lpconfig->file);
|
||||
#if !defined(_WIN32_WCE)
|
||||
#ifndef S_ISREG
|
||||
#define S_ISREG(mode) ((mode & S_IFMT) == S_IFREG)
|
||||
#endif
|
||||
if ((stat(filename,&fileStat) == 0) && (S_ISREG(fileStat.st_mode))) {
|
||||
/* make existing configuration files non-group/world-accessible */
|
||||
if (chmod(filename, S_IRUSR | S_IWUSR) == -1) {
|
||||
if (_chmod(filename, _S_IREAD | _S_IWRITE) == -1) {
|
||||
ms_warning("unable to correct permissions on "
|
||||
"configuration file: %s", strerror(errno));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -32,7 +32,11 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
#include <errno.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#if _MSC_VER
|
||||
#include <io.h>
|
||||
#else
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
#include <fcntl.h>
|
||||
#endif /*_WIN32_WCE*/
|
||||
|
||||
|
|
@ -585,9 +589,10 @@ int linphone_core_get_edge_ptime(LinphoneCore *lc){
|
|||
}
|
||||
|
||||
void linphone_core_adapt_to_network(LinphoneCore *lc, int ping_time_ms, LinphoneCallParams *params){
|
||||
int threshold;
|
||||
if (ping_time_ms>0 && lp_config_get_int(lc->config,"net","activate_edge_workarounds",0)==1){
|
||||
ms_message("Stun server ping time is %i ms",ping_time_ms);
|
||||
int threshold=lp_config_get_int(lc->config,"net","edge_ping_time",500);
|
||||
threshold=lp_config_get_int(lc->config,"net","edge_ping_time",500);
|
||||
|
||||
if (ping_time_ms>threshold){
|
||||
/* we might be in a 2G network*/
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ along with this program; if not, write to the Free Software
|
|||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#include "sal.h"
|
||||
#include "sal/sal.h"
|
||||
#include "offeranswer.h"
|
||||
#include "private.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ extern "C" {
|
|||
#include "linphonefriend.h"
|
||||
#include "linphone_tunnel.h"
|
||||
#include "linphonecore_utils.h"
|
||||
#include "sal.h"
|
||||
#include "sal/sal.h"
|
||||
#include "sipsetup.h"
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
protocols and implementations under linphone, for example SIP, JINGLE...
|
||||
**/
|
||||
|
||||
#include "sal.h"
|
||||
#include "sal/sal.h"
|
||||
const char* sal_transport_to_string(SalTransport transport) {
|
||||
switch (transport) {
|
||||
case SalTransportUDP:return "udp";
|
||||
|
|
|
|||
|
|
@ -113,10 +113,9 @@ SipSetup linphone_sip_login={
|
|||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
sip_login_do_logout,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
sip_login_do_logout
|
||||
NULL
|
||||
};
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -21,6 +21,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
|
||||
#include "linphonecore.h"
|
||||
#include "linphonecore_utils.h"
|
||||
#if _MSC_VER
|
||||
#include <io.h>
|
||||
#endif
|
||||
|
||||
static void calibration_finished(LinphoneCore *lc, LinphoneEcCalibratorStatus status, int delay, void *data){
|
||||
ms_message("echo calibration finished %s.",status==LinphoneEcCalibratorDone ? "successfully" : "with faillure");
|
||||
|
|
@ -30,6 +33,9 @@ static void calibration_finished(LinphoneCore *lc, LinphoneEcCalibratorStatus st
|
|||
|
||||
static char config_file[1024];
|
||||
void parse_args(int argc, char *argv[]){
|
||||
#ifndef F_OK
|
||||
#define F_OK 4
|
||||
#endif
|
||||
if (argc != 3 || strncmp("-c",argv[1], 2) || access(argv[2],F_OK)!=0) {
|
||||
printf("Usage: test_ecc [-c config_file] where config_file will be written with the detected value\n");
|
||||
exit(-1);
|
||||
|
|
@ -38,10 +44,11 @@ void parse_args(int argc, char *argv[]){
|
|||
}
|
||||
|
||||
int main(int argc, char *argv[]){
|
||||
if (argc>1) parse_args(argc,argv);
|
||||
int count=0;
|
||||
LinphoneCoreVTable vtable={0};
|
||||
LinphoneCore *lc=linphone_core_new(&vtable,config_file,NULL,NULL);
|
||||
LinphoneCore *lc;
|
||||
if (argc>1) parse_args(argc,argv);
|
||||
lc=linphone_core_new(&vtable,config_file,NULL,NULL);
|
||||
|
||||
linphone_core_enable_logs(NULL);
|
||||
|
||||
|
|
|
|||
|
|
@ -491,7 +491,7 @@ int linphone_upnp_context_send_add_port_binding(UpnpContext *lupnp, UpnpPortBind
|
|||
mapping.remote_port = port->external_port;
|
||||
mapping.remote_host = "";
|
||||
snprintf(description, 128, "%s %s at %s:%d",
|
||||
PACKAGE_NAME,
|
||||
LINPHONE_PACKAGE_NAME,
|
||||
(port->protocol == UPNP_IGD_IP_PROTOCOL_TCP)? "TCP": "UDP",
|
||||
port->local_addr, port->local_port);
|
||||
mapping.description = description;
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
|
||||
#include "mediastreamer2/upnp_igd.h"
|
||||
#include "linphonecore.h"
|
||||
#include "sal.h"
|
||||
#include "sal/sal.h"
|
||||
|
||||
typedef struct _UpnpSession UpnpSession;
|
||||
typedef struct _UpnpContext UpnpContext;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue