Commit c3ebf99f authored by Sylvain Berfini's avatar Sylvain Berfini 🎩

Fix compilation for WP8

parent 348e1ef8
...@@ -94,20 +94,22 @@ ...@@ -94,20 +94,22 @@
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'"> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">
<ClCompile> <ClCompile>
<WarningLevel>Level4</WarningLevel> <WarningLevel>Level4</WarningLevel>
<AdditionalIncludeDirectories>$(ProjectDir)..\..\..\coreapi;$(ProjectDir)..\..\..\..\mediastreamer2\include;$(ProjectDir)..\..\..\..\oRTP\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>$(ProjectDir)..\..\..\..\belle-sip\include;$(ProjectDir)..\..\..\..\oRTP\include;$(ProjectDir)..\..\..\..\mediastreamer2\include;$(ProjectDIr)..\..\..\..\tunnel\include;$(ProjectDir)..\..\..\coreapi;$(ProjectDir)..\..\..\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> <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> <MinimalRebuild>false</MinimalRebuild>
<BasicRuntimeChecks>Default</BasicRuntimeChecks> <BasicRuntimeChecks>Default</BasicRuntimeChecks>
<PrecompiledHeader>NotUsing</PrecompiledHeader> <PrecompiledHeader>NotUsing</PrecompiledHeader>
<CompileAsWinRT>false</CompileAsWinRT> <CompileAsWinRT>false</CompileAsWinRT>
<AdditionalUsingDirectories>$(WindowsSDK_MetadataPath);$(AdditionalUsingDirectories)</AdditionalUsingDirectories> <AdditionalUsingDirectories>$(WindowsSDK_MetadataPath);$(AdditionalUsingDirectories)</AdditionalUsingDirectories>
<PreprocessToFile>false</PreprocessToFile>
<IgnoreStandardIncludePath>false</IgnoreStandardIncludePath>
</ClCompile> </ClCompile>
<Link> <Link>
<SubSystem>Console</SubSystem> <SubSystem>Console</SubSystem>
<IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries> <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
<GenerateWindowsMetadata>false</GenerateWindowsMetadata> <GenerateWindowsMetadata>false</GenerateWindowsMetadata>
<GenerateDebugInformation>true</GenerateDebugInformation> <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> <AdditionalLibraryDirectories>$(SolutionDir)$(Platform)\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<ImportLibrary>$(TargetDir)$(TargetName)_dll.lib</ImportLibrary> <ImportLibrary>$(TargetDir)$(TargetName)_dll.lib</ImportLibrary>
</Link> </Link>
...@@ -117,10 +119,11 @@ ...@@ -117,10 +119,11 @@
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'"> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">
<ClCompile> <ClCompile>
<PreprocessorDefinitions>_USRDLL;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>_USRDLL;NDEBUG;IN_LINPHONE;WIN32;USE_BELLESIP;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PrecompiledHeader>NotUsing</PrecompiledHeader> <PrecompiledHeader>NotUsing</PrecompiledHeader>
<CompileAsWinRT>false</CompileAsWinRT> <CompileAsWinRT>false</CompileAsWinRT>
<AdditionalUsingDirectories>$(WindowsSDK_MetadataPath);$(AdditionalUsingDirectories)</AdditionalUsingDirectories> <AdditionalUsingDirectories>$(WindowsSDK_MetadataPath);$(AdditionalUsingDirectories)</AdditionalUsingDirectories>
<AdditionalIncludeDirectories>$(Project)../../../../belle-sip/include;$(Project)../../../../oRTP/include;$(Project)../../../../mediastreamer2/include;$(Project)../../../coreapi;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile> </ClCompile>
<Link> <Link>
<SubSystem>Console</SubSystem> <SubSystem>Console</SubSystem>
...@@ -129,70 +132,73 @@ ...@@ -129,70 +132,73 @@
<GenerateDebugInformation>true</GenerateDebugInformation> <GenerateDebugInformation>true</GenerateDebugInformation>
</Link> </Link>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemGroup Condition="'$(Platform)'=='ARM'">
<Reference Include="Windows">
<IsWinMDFile>true</IsWinMDFile>
</Reference>
<Reference Include="platform.winmd">
<IsWinMDFile>true</IsWinMDFile>
<Private>false</Private>
</Reference>
</ItemGroup>
<ItemGroup> <ItemGroup>
<ClCompile Include="..\..\..\coreapi\address.c" /> <ClCompile Include="..\..\..\coreapi\address.c" />
<ClCompile Include="..\..\..\coreapi\authentication.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\callbacks.c" />
<ClCompile Include="..\..\..\coreapi\chat.c" /> <ClCompile Include="..\..\..\coreapi\chat.c" />
<ClCompile Include="..\..\..\coreapi\conference.c" /> <ClCompile Include="..\..\..\coreapi\conference.c" />
<ClCompile Include="..\..\..\coreapi\ec-calibrator.c" /> <ClCompile Include="..\..\..\coreapi\ec-calibrator.c" />
<ClCompile Include="..\..\..\coreapi\enum.c" /> <ClCompile Include="..\..\..\coreapi\enum.c" />
<ClCompile Include="..\..\..\coreapi\fonis.c" />
<ClCompile Include="..\..\..\coreapi\friend.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\linphonecall.c" />
<ClCompile Include="..\..\..\coreapi\linphonecore.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\lpconfig.c" />
<ClCompile Include="..\..\..\coreapi\lsd.c" /> <ClCompile Include="..\..\..\coreapi\lsd.c" />
<ClCompile Include="..\..\..\coreapi\misc.c" /> <ClCompile Include="..\..\..\coreapi\misc.c" />
<ClCompile Include="..\..\..\coreapi\offeranswer.c" /> <ClCompile Include="..\..\..\coreapi\offeranswer.c" />
<ClCompile Include="..\..\..\coreapi\plugins\buddylookup\src\lookup.c" />
<ClCompile Include="..\..\..\coreapi\presence.c" /> <ClCompile Include="..\..\..\coreapi\presence.c" />
<ClCompile Include="..\..\..\coreapi\proxy.c" /> <ClCompile Include="..\..\..\coreapi\proxy.c" />
<ClCompile Include="..\..\..\coreapi\sal.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\siplogin.c" />
<ClCompile Include="..\..\..\coreapi\sipsetup.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\upnp.c" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ClInclude Include="..\..\..\coreapi\bellesip_sal\sal_impl.h" />
<ClInclude Include="..\..\..\coreapi\enum.h" /> <ClInclude Include="..\..\..\coreapi\enum.h" />
<ClInclude Include="..\..\..\coreapi\linphonecore.h" /> <ClInclude Include="..\..\..\coreapi\linphonecore.h" />
<ClInclude Include="..\..\..\coreapi\linphonecore_utils.h" /> <ClInclude Include="..\..\..\coreapi\linphonecore_utils.h" />
<ClInclude Include="..\..\..\coreapi\linphonefriend.h" /> <ClInclude Include="..\..\..\coreapi\linphonefriend.h" />
<ClInclude Include="..\..\..\coreapi\linphone_tunnel.h" />
<ClInclude Include="..\..\..\coreapi\lpconfig.h" /> <ClInclude Include="..\..\..\coreapi\lpconfig.h" />
<ClInclude Include="..\..\..\coreapi\offeranswer.h" /> <ClInclude Include="..\..\..\coreapi\offeranswer.h" />
<ClInclude Include="..\..\..\coreapi\private.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\sipsetup.h" />
<ClInclude Include="..\..\..\coreapi\upnp.h" /> <ClInclude Include="..\..\..\coreapi\upnp.h" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<None Include="..\..\..\coreapi\TunnelManager.hh" /> <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>
</Reference>
<Reference Include="platform.winmd">
<IsWinMDFile>true</IsWinMDFile>
<Private>false</Private>
</Reference>
</ItemGroup> </ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<Import Project="$(MSBuildExtensionsPath)\Microsoft\WindowsPhone\v$(TargetPlatformVersion)\Microsoft.Cpp.WindowsPhone.$(TargetPlatformVersion).targets" Condition="'$(Platform)'=='ARM'" /> <Import Project="$(MSBuildExtensionsPath)\Microsoft\WindowsPhone\v$(TargetPlatformVersion)\Microsoft.Cpp.WindowsPhone.$(TargetPlatformVersion).targets" Condition="'$(Platform)'=='ARM'" />
......
...@@ -14,14 +14,9 @@ ...@@ -14,14 +14,9 @@
<ClCompile Include="..\..\..\coreapi\conference.c" /> <ClCompile Include="..\..\..\coreapi\conference.c" />
<ClCompile Include="..\..\..\coreapi\ec-calibrator.c" /> <ClCompile Include="..\..\..\coreapi\ec-calibrator.c" />
<ClCompile Include="..\..\..\coreapi\enum.c" /> <ClCompile Include="..\..\..\coreapi\enum.c" />
<ClCompile Include="..\..\..\coreapi\fonis.c" />
<ClCompile Include="..\..\..\coreapi\friend.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\linphonecall.c" />
<ClCompile Include="..\..\..\coreapi\linphonecore.c" /> <ClCompile Include="..\..\..\coreapi\linphonecore.c" />
<ClCompile Include="..\..\..\coreapi\linphonecore_jni.cc" />
<ClCompile Include="..\..\..\coreapi\lpconfig.c" /> <ClCompile Include="..\..\..\coreapi\lpconfig.c" />
<ClCompile Include="..\..\..\coreapi\lsd.c" /> <ClCompile Include="..\..\..\coreapi\lsd.c" />
<ClCompile Include="..\..\..\coreapi\misc.c" /> <ClCompile Include="..\..\..\coreapi\misc.c" />
...@@ -29,37 +24,29 @@ ...@@ -29,37 +24,29 @@
<ClCompile Include="..\..\..\coreapi\presence.c" /> <ClCompile Include="..\..\..\coreapi\presence.c" />
<ClCompile Include="..\..\..\coreapi\proxy.c" /> <ClCompile Include="..\..\..\coreapi\proxy.c" />
<ClCompile Include="..\..\..\coreapi\sal.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\siplogin.c" />
<ClCompile Include="..\..\..\coreapi\sipsetup.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\upnp.c" />
<ClCompile Include="..\..\..\coreapi\help\buddy_status.c" /> <ClCompile Include="..\..\..\coreapi\bellesip_sal\sal_address_impl.c" />
<ClCompile Include="..\..\..\coreapi\help\chatroom.c" /> <ClCompile Include="..\..\..\coreapi\bellesip_sal\sal_impl.c" />
<ClCompile Include="..\..\..\coreapi\help\registration.c" /> <ClCompile Include="..\..\..\coreapi\bellesip_sal\sal_op_call.c" />
<ClCompile Include="..\..\..\coreapi\plugins\buddylookup\src\lookup.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>
<ItemGroup> <ItemGroup>
<ClInclude Include="..\..\..\coreapi\enum.h" /> <ClInclude Include="..\..\..\coreapi\enum.h" />
<ClInclude Include="..\..\..\coreapi\linphone_tunnel.h" />
<ClInclude Include="..\..\..\coreapi\linphonecore.h" /> <ClInclude Include="..\..\..\coreapi\linphonecore.h" />
<ClInclude Include="..\..\..\coreapi\linphonecore_utils.h" /> <ClInclude Include="..\..\..\coreapi\linphonecore_utils.h" />
<ClInclude Include="..\..\..\coreapi\linphonefriend.h" /> <ClInclude Include="..\..\..\coreapi\linphonefriend.h" />
<ClInclude Include="..\..\..\coreapi\lpconfig.h" /> <ClInclude Include="..\..\..\coreapi\lpconfig.h" />
<ClInclude Include="..\..\..\coreapi\offeranswer.h" /> <ClInclude Include="..\..\..\coreapi\offeranswer.h" />
<ClInclude Include="..\..\..\coreapi\private.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\sipsetup.h" />
<ClInclude Include="..\..\..\coreapi\upnp.h" /> <ClInclude Include="..\..\..\coreapi\upnp.h" />
</ItemGroup> <ClInclude Include="..\..\..\coreapi\bellesip_sal\sal_impl.h" />
<ItemGroup>
<None Include="..\..\..\coreapi\TunnelManager.hh" />
</ItemGroup> </ItemGroup>
</Project> </Project>
\ No newline at end of file
...@@ -21,7 +21,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ...@@ -21,7 +21,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "config.h" #include "config.h"
#endif #endif
void _belle_sip_log(belle_sip_log_level lev, const char *fmt, va_list args) { void _belle_sip_log(belle_sip_log_level lev, const char *fmt, va_list args) {
int ortp_level; int ortp_level;
switch(lev) { switch(lev) {
...@@ -209,8 +208,8 @@ static void process_response_event(void *user_ctx, const belle_sip_response_even ...@@ -209,8 +208,8 @@ static void process_response_event(void *user_ctx, const belle_sip_response_even
int rport; int rport;
bool_t contact_updated=FALSE; bool_t contact_updated=FALSE;
char* new_contact; char* new_contact;
belle_sip_request_t* old_request=NULL;; belle_sip_request_t* old_request=NULL;
belle_sip_response_t* old_response=NULL;; belle_sip_response_t* old_response=NULL;
if (op->state == SalOpStateTerminated) { if (op->state == SalOpStateTerminated) {
...@@ -346,12 +345,14 @@ static void process_transaction_terminated(void *user_ctx, const belle_sip_trans ...@@ -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_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_server_transaction_t* server_transaction = belle_sip_transaction_terminated_event_get_server_transaction(event);
belle_sip_transaction_t* trans; belle_sip_transaction_t* trans;
SalOp* op;
if(client_transaction) if(client_transaction)
trans=BELLE_SIP_TRANSACTION(client_transaction); trans=BELLE_SIP_TRANSACTION(client_transaction);
else else
trans=BELLE_SIP_TRANSACTION(server_transaction); 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) { if (op && op->callbacks.process_transaction_terminated) {
op->callbacks.process_transaction_terminated(op,event); op->callbacks.process_transaction_terminated(op,event);
} else { } else {
...@@ -377,7 +378,7 @@ Sal * sal_init(){ ...@@ -377,7 +378,7 @@ Sal * sal_init(){
sal->nat_helper_enabled=TRUE; sal->nat_helper_enabled=TRUE;
snprintf(stack_string,sizeof(stack_string)-1,"(belle-sip/%s)",belle_sip_version_to_string()); snprintf(stack_string,sizeof(stack_string)-1,"(belle-sip/%s)",belle_sip_version_to_string());
sal->user_agent=belle_sip_header_user_agent_new(); 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_header_user_agent_add_product(sal->user_agent,stack_string);
belle_sip_object_ref(sal->user_agent); belle_sip_object_ref(sal->user_agent);
belle_sip_set_log_handler(_belle_sip_log); belle_sip_set_log_handler(_belle_sip_log);
......
...@@ -19,7 +19,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ...@@ -19,7 +19,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#ifndef SAL_IMPL_H_ #ifndef SAL_IMPL_H_
#define SAL_IMPL_H_ #define SAL_IMPL_H_
#include "sal.h" #include "sal/sal.h"
#include "belle-sip/belle-sip.h" #include "belle-sip/belle-sip.h"
#include "belle-sip/belle-sdp.h" #include "belle-sip/belle-sdp.h"
......
...@@ -162,8 +162,8 @@ int sal_call_notify_refer_state(SalOp *op, SalOp *newcall){ ...@@ -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){ 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_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_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_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_server_transaction_t* server_transaction = belle_sip_provider_create_server_transaction(op->base.root->prov,req);
belle_sip_response_t* resp; belle_sip_response_t* resp;
belle_sip_uri_t* refer_to_uri; belle_sip_uri_t* refer_to_uri;
......
...@@ -479,7 +479,7 @@ static void presence_process_request_event(void *op_base, const belle_sip_reques ...@@ -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_request_t* req = belle_sip_request_event_get_request(event);
belle_sip_dialog_state_t dialog_state; 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_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)); const char* body = belle_sip_message_get_body(BELLE_SIP_MESSAGE(req));
SalPresenceStatus estatus=SalPresenceOffline; SalPresenceStatus estatus=SalPresenceOffline;
SalSubscribeStatus sub_state; SalSubscribeStatus sub_state;
......
...@@ -125,6 +125,7 @@ static int send_register_request_with_expires(SalOp* op, belle_sip_request_t* re ...@@ -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){ int sal_register(SalOp *op, const char *proxy, const char *from, int expires){
belle_sip_request_t *req; belle_sip_request_t *req;
belle_sip_uri_t* req_uri;
sal_op_set_from(op,from); sal_op_set_from(op,from);
sal_op_set_to(op,from); sal_op_set_to(op,from);
sal_op_set_route(op,proxy); sal_op_set_route(op,proxy);
...@@ -134,7 +135,7 @@ int sal_register(SalOp *op, const char *proxy, const char *from, int expires){ ...@@ -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; op->callbacks.process_transaction_terminated=register_process_transaction_terminated;
req = sal_op_build_request(op,"REGISTER"); 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*/ belle_sip_uri_set_user(req_uri,NULL); /*remove userinfo if any*/
return send_register_request_with_expires(op,req,expires); 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. ...@@ -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 "linphonecore.h"
#include "private.h" #include "private.h"
...@@ -179,9 +179,9 @@ static bool_t is_duplicate_call(LinphoneCore *lc, const LinphoneAddress *from, c ...@@ -179,9 +179,9 @@ static bool_t is_duplicate_call(LinphoneCore *lc, const LinphoneAddress *from, c
#endif #endif
static bool_t already_a_call_with_remote_address(const LinphoneCore *lc, const LinphoneAddress *remote) { 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."); ms_warning(" searching for already_a_call_with_remote_address.");
MSList *elem;
for(elem=lc->calls;elem!=NULL;elem=elem->next){ for(elem=lc->calls;elem!=NULL;elem=elem->next){
const LinphoneCall *call=(LinphoneCall*)elem->data; const LinphoneCall *call=(LinphoneCall*)elem->data;
const LinphoneAddress *cRemote=linphone_call_get_remote_address(call); const LinphoneAddress *cRemote=linphone_call_get_remote_address(call);
......
...@@ -215,6 +215,7 @@ int linphone_core_add_to_conference(LinphoneCore *lc, LinphoneCall *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){ static int remove_from_conference(LinphoneCore *lc, LinphoneCall *call, bool_t active){
int err=0; int err=0;
char *str;
if (!call->current_params.in_conference){ if (!call->current_params.in_conference){
if (call->params.in_conference){ if (call->params.in_conference){
...@@ -227,7 +228,7 @@ static int remove_from_conference(LinphoneCore *lc, LinphoneCall *call, bool_t a ...@@ -227,7 +228,7 @@ static int remove_from_conference(LinphoneCore *lc, LinphoneCall *call, bool_t a
} }
call->params.in_conference=FALSE; 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_message("%s will be removed from conference", str);
ms_free(str); ms_free(str);
if (active){ if (active){
...@@ -283,10 +284,11 @@ static int convert_conference_to_call(LinphoneCore *lc){ ...@@ -283,10 +284,11 @@ static int convert_conference_to_call(LinphoneCore *lc){
* @returns 0 if successful, -1 otherwise. * @returns 0 if successful, -1 otherwise.
**/ **/
int linphone_core_remove_from_conference(LinphoneCore *lc, LinphoneCall *call){ int linphone_core_remove_from_conference(LinphoneCore *lc, LinphoneCall *call){
int err;
char * str=linphone_call_get_remote_address_as_string(call); char * str=linphone_call_get_remote_address_as_string(call);
ms_message("Removing call %s from the conference", str); ms_message("Removing call %s from the conference", str);
ms_free(str); ms_free(str);
int err=remove_from_conference(lc,call, FALSE); err=remove_from_conference(lc,call, FALSE);
if (err){ if (err){
ms_error("Error removing participant from conference."); ms_error("Error removing participant from conference.");
return err; return err;
...@@ -335,13 +337,14 @@ int linphone_core_leave_conference(LinphoneCore *lc){ ...@@ -335,13 +337,14 @@ int linphone_core_leave_conference(LinphoneCore *lc){
* @returns 0 if successful, -1 otherwise * @returns 0 if successful, -1 otherwise
**/ **/
int linphone_core_enter_conference(LinphoneCore *lc){ int linphone_core_enter_conference(LinphoneCore *lc){
LinphoneConference *conf;
if (linphone_core_sound_resources_locked(lc)) { if (linphone_core_sound_resources_locked(lc)) {
return -1; return -1;
} }
if (lc->current_call != NULL) { if (lc->current_call != NULL) {
linphone_core_pause_call(lc, lc->current_call); 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); if (conf->local_participant==NULL) add_local_endpoint(conf,lc);
return 0; return 0;
} }
......
...@@ -241,11 +241,13 @@ void ec_calibrator_destroy(EcCalibrator *ecc){ ...@@ -241,11 +241,13 @@ void ec_calibrator_destroy(EcCalibrator *ecc){
} }
int linphone_core_start_echo_calibration(LinphoneCore *lc, LinphoneEcCalibrationCallback cb, void *cb_data){ int linphone_core_start_echo_calibration(LinphoneCore *lc, LinphoneEcCalibrationCallback cb, void *cb_data){
unsigned int rate;
if (lc->ecc!=NULL){ if (lc->ecc!=NULL){
ms_error("Echo calibration is still on going !"); ms_error("Echo calibration is still on going !");
return -1; 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); lc->ecc=ec_calibrator_new(lc->sound_conf.play_sndcard,lc->sound_conf.capt_sndcard,rate,cb,cb_data);
return 0; return 0;
} }
......
...@@ -152,11 +152,13 @@ LinphoneFriend * linphone_friend_new(){ ...@@ -152,11 +152,13 @@ LinphoneFriend * linphone_friend_new(){
LinphoneFriend *linphone_friend_new_with_addr(const char *addr){ LinphoneFriend *linphone_friend_new_with_addr(const char *addr){
LinphoneAddress* linphone_address = linphone_address_new(addr); LinphoneAddress* linphone_address = linphone_address_new(addr);
LinphoneFriend *fr;
if (linphone_address == NULL) { if (linphone_address == NULL) {
ms_error("Cannot create friend for address [%s]",addr?addr:"null"); ms_error("Cannot create friend for address [%s]",addr?addr:"null");
return NULL; return NULL;
} }
LinphoneFriend *fr=linphone_friend_new(); fr=linphone_friend_new();
if (linphone_friend_set_addr(fr,linphone_address)<0){ if (linphone_friend_set_addr(fr,linphone_address)<0){
linphone_friend_destroy(fr); linphone_friend_destroy(fr);
return NULL; return NULL;
...@@ -440,6 +442,8 @@ LinphoneFriend *linphone_core_get_friend_by_address(const LinphoneCore *lc, cons ...@@ -440,6 +442,8 @@ LinphoneFriend *linphone_core_get_friend_by_address(const LinphoneCore *lc, cons
const MSList *elem; const MSList *elem;
const char *username; const char *username;
const char *domain; const char *domain;
const char *it_username;
const char *it_host;
LinphoneFriend *lf=NULL; LinphoneFriend *lf=NULL;
if (puri==NULL){ if (puri==NULL){
...@@ -453,8 +457,8 @@ LinphoneFriend *linphone_core_get_friend_by_address(const LinphoneCore *lc, cons ...@@ -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)){ for(elem=lc->friends;elem!=NULL;elem=ms_list_next(elem)){
lf=(LinphoneFriend*)elem->data; lf=(LinphoneFriend*)elem->data;
const char *it_username=linphone_address_get_username(lf->uri); it_username=linphone_address_get_username(lf->uri);
const char *it_host=linphone_address_get_domain(lf->uri);; it_host=linphone_address_get_domain(lf->uri);;
if (strcasecmp(domain,it_host)==0 && username_match(username,it_username)){ if (strcasecmp(domain,it_host)==0 && username_match(username,it_username)){
break; break;
} }
......
...@@ -120,9 +120,10 @@ static void linphone_call_videostream_encryption_changed(void *data, bool_t encr ...@@ -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) { static void linphone_call_audiostream_encryption_changed(void *data, bool_t encrypted) {
char status[255]={0}; char status[255]={0};
LinphoneCall *call;
ms_message("Audio stream is %s ", encrypted ? "encrypted" : "not encrypted"); ms_message("Audio stream is %s ", encrypted ? "encrypted" : "not encrypted");
LinphoneCall *call = (LinphoneCall *)data; call = (LinphoneCall *)data;
call->audiostream_encrypted=encrypted; call->audiostream_encrypted=encrypted;
if (encrypted && call->core->vtable.display_status != NULL) { if (encrypted && call->core->vtable.display_status != NULL) {
...@@ -1333,6 +1334,13 @@ void _post_configure_audio_stream(AudioStream *st, LinphoneCore *lc, bool_t mute ...@@ -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_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); 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); 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) if (!muted)
linphone_core_set_mic_gain_db (lc, mic_gain); 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 ...@@ -1346,12 +1354,11 @@ void _post_configure_audio_stream(AudioStream *st, LinphoneCore *lc, bool_t mute
if (st->volsend){ if (st->volsend){
ms_filter_call_method(st->volsend,MS_VOLUME_REMOVE_DC,&dc_removal); 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); thres=lp_config_get_float(lc->config,"sound","el_thres",-1);
float force=lp_config_get_float(lc->config,"sound","el_force",-1); force=lp_config_get_float(lc->config,"sound","el_force",-1);
int sustain=lp_config_get_int(lc->config,"sound","el_sustain",-1); 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); transmit_thres=lp_config_get_float(lc->config,"sound","el_transmit_thres",-1);
MSFilter *f=NULL;
f=st->volsend; f=st->volsend;
if (speed==-1) speed=0.03; if (speed==-1) speed=0.03;
if (force==-1) force=25; if (force==-1) force=25;
...@@ -1369,8 +1376,8 @@ void _post_configure_audio_stream(AudioStream *st, LinphoneCore *lc, bool_t mute ...@@ -1369,8 +1376,8 @@ void _post_configure_audio_stream(AudioStream *st, LinphoneCore *lc, bool_t mute
} }
if (st->volrecv){ if (st->volrecv){
/* parameters for a limited noise-gate effect, using echo limiter threshold */ /* parameters for a limited noise-gate effect, using echo limiter threshold */
float floorgain = 1/pow(10,(mic_gain)/10); floorgain = 1/pow(10,(mic_gain)/10);
int spk_agc=lp_config_get_int(lc->config,"sound","speaker_agc_enabled",0); 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_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_THRESHOLD,&ng_thres);
ms_filter_call_method(st->volrecv,MS_VOLUME_SET_NOISE_GATE_FLOORGAIN,&floorgain); 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 ...@@ -1478,9 +1485,19 @@ static void linphone_call_start_audio_stream(LinphoneCall *call, const char *cna
LinphoneCore *lc=call->core; LinphoneCore *lc=call->core;
int used_pt=-1; int used_pt=-1;
char rtcp_tool[128]={0}; 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()); 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 */ /* 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); SalProtoRtpSavp,SalAudio);
/* no savp audio stream, use avp */ /* no savp audio stream, use avp */
if (!stream) if (!stream)
...@@ -1488,13 +1505,12 @@ static void linphone_call_start_audio_stream(LinphoneCall *call, const char *cna ...@@ -1488,13 +1505,12 @@ static void linphone_call_start_audio_stream(LinphoneCall *call, const char *cna
SalProtoRtpAvp,SalAudio); SalProtoRtpAvp,SalAudio);
if (stream && stream->dir!=SalStreamInactive && stream->rtp_port!=0){ 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; lc->sound_conf.lsd_card : lc->sound_conf.play_sndcard;
MSSndCard *captcard=lc->sound_conf.capt_sndcard;