Added OpenSSL project, fixed building in Windows.

git-svn-id: http://yate.null.ro/svn/yate/trunk@1871 acf43c95-373e-0410-b603-e72c3f656dc1
This commit is contained in:
paulc 2008-04-03 12:10:34 +00:00
parent d9703a0089
commit 7ed1fc6fd4
9 changed files with 297 additions and 13 deletions

View File

@ -69,7 +69,7 @@ static inline bool valid(char ch)
static inline int validLiberal(char ch)
{
for (unsigned int i = 0; i < s_ignore.length(); i++)
if (s_ignore[i] == ch)
if (s_ignore.at(i) == ch)
return -1;
return valid(ch) ? 1 : 0;
}

View File

@ -950,7 +950,7 @@ bool ModuleGroup::initialize(const NamedList& params, const NamedList& defaults,
int level = params.getIntValue("debuglevel",m_init ? debugLevel() : plugin.debugLevel());
if (level >= 0) {
debugEnabled(level);
debugEnabled(0 != level);
debugLevel(level);
}

View File

@ -337,7 +337,7 @@ bool AAAHandler::loadQuery()
{
m_query = s_cfg.getValue(name(),"query");
indirectQuery(m_query);
return m_query;
return !m_query.null();
}
// replace a "@query" with the result of that query
@ -591,7 +591,7 @@ bool EventNotify::loadQuery()
Debug(&module,DebugNote,
"Notify(%s). Invalid 'subscribe_notify' in section '%s'",
m_event.c_str(),m_name.c_str());
return m_querySubs;
return !m_querySubs.null();
}
// Fill account/query and dispatch the message
@ -838,7 +838,7 @@ bool SubscribeTimerHandler::loadQuery()
if (!m_queryExpire)
Debug(&module,DebugNote,
"Invalid 'subscribe_expire' in section '%s'",name().safe());
return m_queryExpire;
return !m_queryExpire.null();
}
bool SubscribeTimerHandler::received(Message& msg)

View File

@ -28,6 +28,12 @@
extern "C" {
#include <speex.h>
#ifdef _WINDOWS
/* For some reason the DLL does not export the mode variables */
#define speex_nb_mode (*speex_lib_get_mode(SPEEX_MODEID_NB))
#define speex_wb_mode (*speex_lib_get_mode(SPEEX_MODEID_WB))
#define speex_uwb_mode (*speex_lib_get_mode(SPEEX_MODEID_UWB))
#endif
}
using namespace TelEngine;
@ -316,7 +322,7 @@ void SpeexCodec::Consume(const DataBlock& data, unsigned long tStamp)
m_encoding ? "en" : "de", frames, m_data.length(), consumed, outdata.length(), frame_size, tStamp, ret);
if (frames) {
m_data.cut(-consumed);
m_data.cut(-(int)consumed);
getTransSource()->Forward(outdata, tStamp);
}

View File

@ -237,6 +237,10 @@
/>
</FileConfiguration>
</File>
<File
RelativePath="..\engine\Base64.cpp"
>
</File>
<File
RelativePath="..\engine\Channel.cpp"
>

View File

@ -13,6 +13,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Console", "Console.vcproj",
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Extra", "Extra.vcproj", "{B1E0D82A-DB84-4D66-A30D-D028D96D8315}"
ProjectSection(ProjectDependencies) = postProject
{2358F303-8EF4-404A-80C8-6E1826B2D423} = {2358F303-8EF4-404A-80C8-6E1826B2D423}
{AB883DE2-2AE9-C12C-9F34-753E10B5C790} = {AB883DE2-2AE9-C12C-9F34-753E10B5C790}
{889C65FD-CBA9-4E88-B380-DE2640A140A7} = {889C65FD-CBA9-4E88-B380-DE2640A140A7}
{A9670DE2-5B1D-403C-9225-75135605C790} = {A9670DE2-5B1D-403C-9225-75135605C790}
{E91BA1B2-C7C3-4DF1-9560-44C8077CFD5F} = {E91BA1B2-C7C3-4DF1-9560-44C8077CFD5F}
@ -20,7 +22,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Extra", "Extra.vcproj", "{B
{8CF9A752-8606-4819-99D8-CE3C4E744F85} = {8CF9A752-8606-4819-99D8-CE3C4E744F85}
{3EA5873D-E3FA-4CA4-B8BB-8FE4183652A1} = {3EA5873D-E3FA-4CA4-B8BB-8FE4183652A1}
{DC897705-0065-4FA0-B1C2-5A3E75240A95} = {DC897705-0065-4FA0-B1C2-5A3E75240A95}
{2358F303-8EF4-404A-80C8-6E1826B2D423} = {2358F303-8EF4-404A-80C8-6E1826B2D423}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Gtk2Client", "Gtk2Client.vcproj", "{E91BA1B2-C7C3-4DF1-9560-44C8077CFD5F}"
@ -41,8 +42,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Libyate", "Libyate.vcproj",
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Modules", "Modules.vcproj", "{BE362993-354F-4315-B878-05E952E1D164}"
ProjectSection(ProjectDependencies) = postProject
{5F248A16-8E3D-497A-8E68-F9E08971F583} = {5F248A16-8E3D-497A-8E68-F9E08971F583}
{2F410A9D-D671-4928-7ACF-7268AF39D934} = {2F410A9D-D671-4928-7ACF-7268AF39D934}
{C296BBF2-AD56-4249-AEF6-C04B03131474} = {C296BBF2-AD56-4249-AEF6-C04B03131474}
{88C1CCEC-C1AF-4888-A4A1-C0798EDB3947} = {88C1CCEC-C1AF-4888-A4A1-C0798EDB3947}
{A9CA94EB-27BA-46FA-A585-94D36706C4D7} = {A9CA94EB-27BA-46FA-A585-94D36706C4D7}
@ -61,6 +60,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Modules", "Modules.vcproj",
{5F4005CD-2BA3-40C8-8348-726F5C99D964} = {5F4005CD-2BA3-40C8-8348-726F5C99D964}
{6E6F6DC8-4B8F-4237-9FEC-BE3BBF268558} = {6E6F6DC8-4B8F-4237-9FEC-BE3BBF268558}
{5F4005AA-CB7F-47C8-8598-726F5C506964} = {5F4005AA-CB7F-47C8-8598-726F5C506964}
{2F410A9D-D671-4928-7ACF-7268AF39D934} = {2F410A9D-D671-4928-7ACF-7268AF39D934}
{BA27419A-2595-49D6-B363-492B1180E885} = {BA27419A-2595-49D6-B363-492B1180E885}
{11BDB689-6A50-48AC-9D2E-1DF68E53510C} = {11BDB689-6A50-48AC-9D2E-1DF68E53510C}
{06121688-9DC7-4032-B366-9862CDE6D313} = {06121688-9DC7-4032-B366-9862CDE6D313}
@ -80,6 +80,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Modules", "Modules.vcproj",
{AA54CD1D-E1E1-4A00-9974-EE6924D85DBD} = {AA54CD1D-E1E1-4A00-9974-EE6924D85DBD}
{34AC2018-91F1-41AF-A839-47DCF27D4434} = {34AC2018-91F1-41AF-A839-47DCF27D4434}
{42B76F17-895F-4B1C-B783-7AAC92AFD56E} = {42B76F17-895F-4B1C-B783-7AAC92AFD56E}
{5F248A16-8E3D-497A-8E68-F9E08971F583} = {5F248A16-8E3D-497A-8E68-F9E08971F583}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Service", "Service.vcproj", "{B1015F66-0C3D-43DA-8329-15FB43D2F74B}"
@ -395,6 +396,11 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_lateroute", "_lateroute.vc
{254C6F00-6DE5-44A6-AD44-ACABA8912381} = {254C6F00-6DE5-44A6-AD44-ACABA8912381}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_openssl", "_openssl.vcproj", "{AB883DE2-2AE9-C12C-9F34-753E10B5C790}"
ProjectSection(ProjectDependencies) = postProject
{254C6F00-6DE5-44A6-AD44-ACABA8912381} = {254C6F00-6DE5-44A6-AD44-ACABA8912381}
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
@ -673,6 +679,10 @@ Global
{2F410A9D-D671-4928-7ACF-7268AF39D934}.Debug|Win32.Build.0 = Debug|Win32
{2F410A9D-D671-4928-7ACF-7268AF39D934}.Release|Win32.ActiveCfg = Release|Win32
{2F410A9D-D671-4928-7ACF-7268AF39D934}.Release|Win32.Build.0 = Release|Win32
{AB883DE2-2AE9-C12C-9F34-753E10B5C790}.Debug|Win32.ActiveCfg = Debug|Win32
{AB883DE2-2AE9-C12C-9F34-753E10B5C790}.Debug|Win32.Build.0 = Debug|Win32
{AB883DE2-2AE9-C12C-9F34-753E10B5C790}.Release|Win32.ActiveCfg = Release|Win32
{AB883DE2-2AE9-C12C-9F34-753E10B5C790}.Release|Win32.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE

256
windows/_openssl.vcproj Normal file
View File

@ -0,0 +1,256 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="8.00"
Name="_openssl"
ProjectGUID="{AB883DE2-2AE9-C12C-9F34-753E10B5C790}"
RootNamespace="_openssl"
>
<Platforms>
<Platform
Name="Win32"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
<Configurations>
<Configuration
Name="Release|Win32"
OutputDirectory=".\Release"
IntermediateDirectory=".\Release\modules"
ConfigurationType="2"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
PreprocessorDefinitions="NDEBUG"
MkTypLibCompatible="true"
SuppressStartupBanner="true"
TargetEnvironment="1"
TypeLibraryName=".\Release/_openssl.tlb"
HeaderFileName=""
/>
<Tool
Name="VCCLCompilerTool"
Optimization="2"
InlineFunctionExpansion="1"
AdditionalIncludeDirectories=".,.."
PreprocessorDefinitions="NDEBUG;WIN32;_WINDOWS;_USRDLL"
StringPooling="true"
RuntimeLibrary="2"
EnableFunctionLevelLinking="true"
PrecompiledHeaderFile=".\Release\modules/_openssl.pch"
AssemblerListingLocation=".\Release\modules/"
ObjectFile=".\Release\modules/"
ProgramDataBaseFileName=".\Release\modules/"
WarningLevel="3"
SuppressStartupBanner="true"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="NDEBUG"
Culture="1033"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
IgnoreImportLibrary="true"
AdditionalDependencies="ssleay32MD.lib libeay32MD.lib"
OutputFile="Release/openssl.yate"
LinkIncremental="1"
SuppressStartupBanner="true"
ProgramDatabaseFile=".\Release/openssl.pdb"
ImportLibrary=".\Release/openssl.lib"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
SuppressStartupBanner="true"
OutputFile=".\Release/_openssl.bsc"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCWebDeploymentTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Debug|Win32"
OutputDirectory=".\Debug"
IntermediateDirectory=".\Debug\modules"
ConfigurationType="2"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
PreprocessorDefinitions="_DEBUG"
MkTypLibCompatible="true"
SuppressStartupBanner="true"
TargetEnvironment="1"
TypeLibraryName=".\Debug/_openssl.tlb"
HeaderFileName=""
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories=".,.."
PreprocessorDefinitions="_DEBUG;WIN32;_WINDOWS;_USRDLL"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
PrecompiledHeaderFile=".\Debug\modules/_openssl.pch"
AssemblerListingLocation=".\Debug\modules/"
ObjectFile=".\Debug\modules/"
ProgramDataBaseFileName=".\Debug\modules/"
WarningLevel="3"
SuppressStartupBanner="true"
DebugInformationFormat="3"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="_DEBUG"
Culture="1033"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
IgnoreImportLibrary="true"
AdditionalDependencies="ssleay32MDd.lib libeay32MDd.lib"
OutputFile="Debug/openssl.yate"
LinkIncremental="1"
SuppressStartupBanner="true"
GenerateDebugInformation="true"
ProgramDatabaseFile=".\Debug/openssl.pdb"
ImportLibrary=".\Debug/openssl.lib"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
SuppressStartupBanner="true"
OutputFile=".\Debug/_openssl.bsc"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCWebDeploymentTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<Filter
Name="Source Files"
Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
>
<File
RelativePath="..\modules\openssl.cpp"
>
</File>
</Filter>
<Filter
Name="Resource Files"
Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
>
<File
RelativePath="version.rc"
>
<FileConfiguration
Name="Release|Win32"
>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions=""
/>
</FileConfiguration>
<FileConfiguration
Name="Debug|Win32"
>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions=""
/>
</FileConfiguration>
</File>
</Filter>
<Filter
Name="Header Files"
Filter="h;hpp;hxx;hm;inl"
>
</Filter>
</Files>
<Globals>
</Globals>
</VisualStudioProject>

View File

@ -74,7 +74,7 @@
<Tool
Name="VCLinkerTool"
IgnoreImportLibrary="true"
AdditionalDependencies="libspeex.lib"
AdditionalDependencies="libspeex.lib libspeexdsp.lib"
OutputFile="Release/speexcodec.yate"
LinkIncremental="1"
SuppressStartupBanner="true"
@ -170,7 +170,7 @@
<Tool
Name="VCLinkerTool"
IgnoreImportLibrary="true"
AdditionalDependencies="libspeexd.lib"
AdditionalDependencies="libspeex.lib libspeexdsp.lib"
OutputFile="Debug/speexcodec.yate"
LinkIncremental="1"
SuppressStartupBanner="true"

View File

@ -34,6 +34,8 @@ Name: "server"; Description: "Server files"; Types: full server
Name: "server\cluster"; Description: "Server clustering modules"; Types: full
Name: "driver"; Description: "Protocol drivers"; Types: full client server
Name: "driver\base"; Description: "Files, tones, mixers"; Types: full client server custom
Name: "driver\openssl"; Description: "SSL/TLS encryption support"; Types: full client server
Name: "driver\openssl\run"; Description: "OpenSSL runtime libraries"; Types: full client server
Name: "driver\sip"; Description: "SIP Protocol driver"; Types: full client server
Name: "driver\h323"; Description: "H.323 Protocol driver"; Types: full client server
Name: "driver\iax"; Description: "IAX Protocol driver"; Types: full client server
@ -47,6 +49,8 @@ Name: "database\pg\run"; Description: "PostgreSQL client libraries"; Types: full
Name: "codecs"; Description: "Audio codecs"; Types: full client server
Name: "codecs\gsm"; Description: "GSM codec"; Types: full client server
Name: "codecs\ilbc"; Description: "iLBC codec"; Types: full client server
Name: "codecs\speex"; Description: "SPEEX codec"; Types: full client server
Name: "codecs\speex\run"; Description: "SPEEX runtime libraries"; Types: full client server
Name: "external"; Description: "External interfaces"; Types: full server
Name: "external\php"; Description: "PHP5 scripting"; Types: full server
Name: "debug"; Description: "Extra debugging support"; Types: full engine
@ -109,20 +113,24 @@ Source: "Release\h323chan.yate"; DestDir: "{app}\modules"; Components: driver\h3
Source: "Release\yiaxchan.yate"; DestDir: "{app}\modules"; Components: driver\iax
Source: "Release\yjinglechan.yate"; DestDir: "{app}\modules"; Components: driver\jingle
Source: "Release\ystunchan.yate"; DestDir: "{app}\modules"; Components: driver\jingle
Source: "Release\openssl.yate"; DestDir: "{app}\modules"; Components: driver\openssl
Source: "Release\gsmcodec.yate"; DestDir: "{app}\modules"; Components: codecs\gsm
Source: "Release\ilbccodec.yate"; DestDir: "{app}\modules"; Components: codecs\ilbc
Source: "Release\speexcodec.yate"; DestDir: "{app}\modules"; Components: codecs\speex
Source: "Release\server\mysqldb.yate"; DestDir: "{app}\modules\server"; Components: database\my
Source: "Runtimes\libmysql.dll"; DestDir: "{app}"; Components: database\my\run
Source: "Release\server\pgsqldb.yate"; DestDir: "{app}\modules\server"; Components: database\pg
Source: "Runtimes\libpq.dll"; DestDir: "{app}"; Components: database\pg\run
Source: "Runtimes\comerr32.dll"; DestDir: "{app}"; Components: database\pg\run
Source: "Runtimes\libeay32.dll"; DestDir: "{app}"; Components: database\pg\run
Source: "Runtimes\ssleay32.dll"; DestDir: "{app}"; Components: database\pg\run
Source: "Runtimes\krb5_32.dll"; DestDir: "{app}"; Components: database\pg\run
Source: "Runtimes\libintl-2.dll"; DestDir: "{app}"; Components: database\pg\run
Source: "Runtimes\libiconv-2.dll"; DestDir: "{app}"; Components: database\pg\run
Source: "Runtimes\libeay32.dll"; DestDir: "{app}"; Components: database\pg\run driver\openssl\run
Source: "Runtimes\ssleay32.dll"; DestDir: "{app}"; Components: database\pg\run driver\openssl\run
Source: "Runtimes\libspeex.dll"; DestDir: "{app}"; Components: codecs\speex\run
Source: "Runtimes\libspeexdsp.dll"; DestDir: "{app}"; Components: codecs\speex\run
Source: "..\COPYING"; DestName: "COPYING.txt"; DestDir: "{app}"
Source: "..\packing\yate.url"; DestDir: "{app}"