Add MysqlCDR to mod_cdr build on windows.

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2085 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Michael Jerris 2006-07-24 20:10:12 +00:00
parent 8d45333627
commit ae4ff80250
6 changed files with 23 additions and 425 deletions

View File

@ -207,7 +207,7 @@
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;MOD_EXPORTS"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
RuntimeLibrary="1"
UsePrecompiledHeader="0"
WarningLevel="4"
WarnAsError="true"
@ -225,7 +225,7 @@
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="mysqlclient.lib"
AdditionalDependencies="mysqlclient.lib ws2_32.lib"
OutputFile="..\..\..\..\w32\vsnet\$(OutDir)/mod/mod_cdr.dll"
LinkIncremental="2"
AdditionalLibraryDirectories="..\..\..\..\w32\vsnet\Debug;&quot;C:\Program Files\MySQL\MySQL Server 5.0\lib\debug&quot;"
@ -287,7 +287,7 @@
Name="VCCLCompilerTool"
AdditionalIncludeDirectories="&quot;$(InputDir)..\..\..\include&quot;;&quot;$(InputDir)include&quot;;&quot;$(InputDir)..\..\..\..\libs\include&quot;;&quot;C:\Program Files\MySQL\MySQL Server 5.0\include&quot;"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;MOD_EXPORTS"
RuntimeLibrary="2"
RuntimeLibrary="0"
UsePrecompiledHeader="0"
WarningLevel="4"
WarnAsError="true"
@ -305,7 +305,7 @@
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="mysqlclient.lib"
AdditionalDependencies="mysqlclient.lib ws2_32.lib"
OutputFile="..\..\..\..\w32\vsnet\$(OutDir)/mod/mod_cdr.dll"
LinkIncremental="1"
AdditionalLibraryDirectories="&quot;..\..\..\..\w32\vsnet\Release&quot;;&quot;C:\Program Files\MySQL\MySQL Server 5.0\lib\opt&quot;"

View File

@ -50,18 +50,18 @@ MysqlCDR::MysqlCDR(switch_mod_cdr_newchannel_t *newchannel) : BaseCDR(newchannel
{
if(newchannel != 0)
{
clid_length = strlen(clid);
src_length = strlen(src);
dst_length = strlen(dst);
ani_length = strlen(ani);
ani2_length = strlen(ani2);
dialplan_length = strlen(dialplan);
myuuid_length = strlen(myuuid);
destuuid_length = strlen(destuuid);
srcchannel_length = strlen(srcchannel);
dstchannel_length = strlen(dstchannel);
lastapp_length = strlen(lastapp);
lastdata_length = strlen(lastdata);
clid_length = (long unsigned int)strlen(clid);
src_length = (long unsigned int)strlen(src);
dst_length = (long unsigned int)strlen(dst);
ani_length = (long unsigned int)strlen(ani);
ani2_length = (long unsigned int)strlen(ani2);
dialplan_length = (long unsigned int)strlen(dialplan);
myuuid_length = (long unsigned int)strlen(myuuid);
destuuid_length = (long unsigned int)strlen(destuuid);
srcchannel_length = (long unsigned int)strlen(srcchannel);
dstchannel_length = (long unsigned int)strlen(dstchannel);
lastapp_length = (long unsigned int)strlen(lastapp);
lastdata_length = (long unsigned int)strlen(lastdata);
if(chanvars_fixed_list.size() > 0)
process_channel_variables(chanvars_fixed_list,newchannel->channel);
@ -232,12 +232,12 @@ void MysqlCDR::connect(switch_xml_t& cfg, switch_xml_t& xml, switch_xml_t& setti
mysql_autocommit(conn,0);
stmt = mysql_stmt_init(conn);
mysql_stmt_prepare(stmt,sql_query,strlen(sql_query));
mysql_stmt_prepare(stmt,sql_query,(long unsigned int)strlen(sql_query));
if(logchanvars)
{
stmt_chanvars = mysql_stmt_init(conn);
mysql_stmt_prepare(stmt_chanvars,sql_query_chanvars,strlen(sql_query_chanvars));
mysql_stmt_prepare(stmt_chanvars,sql_query_chanvars,(long unsigned int)strlen(sql_query_chanvars));
}
}
}
@ -408,7 +408,7 @@ bool MysqlCDR::process_record()
case CDR_DECIMAL:
{
long unsigned int* stringlength = new long unsigned int;
*stringlength = iItr->second.size();
*stringlength = (long unsigned int)(iItr->second.size());
char* x = new char[(*stringlength+1)];
strncpy(x,iItr->second.c_str(),*stringlength);
@ -459,7 +459,7 @@ bool MysqlCDR::process_record()
char* varname_temp = &tempfirstvector[0];
bindme_chanvars[1].buffer_type = MYSQL_TYPE_VAR_STRING;
long unsigned int varname_length = iItr->first.size();
long unsigned int varname_length = (long unsigned int)(iItr->first.size());
bindme_chanvars[1].length = &varname_length;
bindme_chanvars[1].buffer_length = varname_length;
bindme_chanvars[1].buffer = varname_temp;
@ -473,7 +473,7 @@ bool MysqlCDR::process_record()
bindme_chanvars[2].is_null = (my_bool*)1;
else
{
long unsigned int varvalue_length = iItr->second.size();
long unsigned int varvalue_length = (long unsigned int)(iItr->second.size());
bindme_chanvars[2].length = &varvalue_length;
bindme_chanvars[2].buffer_length = varvalue_length;
bindme_chanvars[2].buffer = varvalue_temp;

View File

@ -175,166 +175,6 @@
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Debug with MySql|Win32"
OutputDirectory="$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="1"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="&quot;$(InputDir)include&quot;;&quot;$(InputDir)..\libs\include&quot;"
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
UsePrecompiledHeader="0"
WarningLevel="4"
WarnAsError="true"
Detect64BitPortabilityProblems="true"
DebugInformationFormat="4"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
OutputFile="$(OutDir)/FreeSwitch.exe"
LinkIncremental="2"
AdditionalLibraryDirectories="$(OutDir)"
GenerateDebugInformation="true"
ProgramDatabaseFile="$(OutDir)/FreeSwitchConsole.pdb"
SubSystem="1"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCWebDeploymentTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release with MySql|Win32"
OutputDirectory="$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="1"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories="&quot;$(InputDir)include&quot;;&quot;$(InputDir)..\libs\include&quot;"
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
RuntimeLibrary="2"
UsePrecompiledHeader="0"
WarningLevel="4"
WarnAsError="true"
Detect64BitPortabilityProblems="true"
DebugInformationFormat="3"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
OutputFile="$(OutDir)/FreeSwitch.exe"
LinkIncremental="1"
AdditionalLibraryDirectories="$(OutDir)"
GenerateDebugInformation="true"
SubSystem="1"
OptimizeReferences="2"
EnableCOMDATFolding="2"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCWebDeploymentTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
</Configurations>
<References>
</References>

View File

@ -195,186 +195,6 @@
CommandLine="xcopy $(Projectdir)..\..\conf\*.* $(Outdir)\conf\ /C /D /Y&#x0D;&#x0A;xcopy &quot;$(Projectdir)..\..\libs\sqlite\$(IntDir) DLL\*.dll&quot; $(Outdir)\ /C /D /Y&#x0D;&#x0A;xcopy &quot;$(Projectdir)..\..\libs\sqlite\$(IntDir) DLL\*.lib&quot; $(Outdir)\ /C /D /Y&#x0D;&#x0A;if not exist $(Outdir)\db md $(Outdir)\db&#x0D;&#x0A;if not exist $(Outdir)\log md $(Outdir)\log&#x0D;&#x0A;if not exist $(Outdir)\log md $(Outdir)\htdocs&#x0D;&#x0A;&#x0D;&#x0A;"
/>
</Configuration>
<Configuration
Name="Debug with MySql|Win32"
OutputDirectory="$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="2"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
CommandLine="cscript /nologo &quot;$(InputDir)getlibs.vbs&quot; Core Debug"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="..\..\src\include;..\..\libs\include"
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;FREESWITCHCORE_EXPORTS"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
UsePrecompiledHeader="2"
PrecompiledHeaderThrough="switch.h"
PrecompiledHeaderFile="$(IntDir)\$(TargetName).pch"
BrowseInformation="0"
WarningLevel="4"
WarnAsError="true"
Detect64BitPortabilityProblems="true"
DebugInformationFormat="4"
ForcedIncludeFiles=""
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
LinkLibraryDependencies="false"
AdditionalDependencies="Ws2_32.lib Mswsock.lib libapr-1.lib sqlite.lib libapriconv-1.lib libaprutil-1.lib Rpcrt4.lib libresampled.lib srtp.lib"
OutputFile="$(OutDir)/FreeSwitch.dll"
LinkIncremental="2"
AdditionalLibraryDirectories="&quot;$(InputDir)..\..\libs\apr\$(OutDir)&quot;;&quot;$(InputDir)..\..\libs\sqlite\$(OutDir) DLL&quot;;&quot;$(InputDir)..\..\libs\apr-util\$(OutDir)&quot;;&quot;$(InputDir)..\..\libs\apr-iconv\$(OutDir)&quot;;&quot;$(InputDir)..\..\libs\libresample\win&quot;;&quot;$(InputDir)..\..\libs\srtp\$(OutDir)&quot;"
AddModuleNamesToAssembly=""
GenerateDebugInformation="true"
ProgramDatabaseFile="$(OutDir)/FreeSwitchCore.pdb"
SubSystem="2"
OptimizeReferences="0"
EnableCOMDATFolding="0"
ImportLibrary="$(OutDir)/FreeSwitchCore.lib"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCWebDeploymentTool"
/>
<Tool
Name="VCPostBuildEventTool"
CommandLine="xcopy $(Projectdir)..\..\conf\*.* $(Outdir)\conf\ /C /D /Y&#x0D;&#x0A;xcopy &quot;$(Projectdir)..\..\libs\sqlite\$(IntDir) DLL\*.dll&quot; $(Outdir)\ /C /D /Y&#x0D;&#x0A;xcopy &quot;$(Projectdir)..\..\libs\sqlite\$(IntDir) DLL\*.lib&quot; $(Outdir)\ /C /D /Y&#x0D;&#x0A;if not exist $(Outdir)\db md $(Outdir)\db&#x0D;&#x0A;if not exist $(Outdir)\log md $(Outdir)\log&#x0D;&#x0A;if not exist $(Outdir)\log md $(Outdir)\htdocs&#x0D;&#x0A;&#x0D;&#x0A;"
/>
</Configuration>
<Configuration
Name="Release with MySql|Win32"
OutputDirectory="$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="2"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
CommandLine="cscript /nologo &quot;$(InputDir)getlibs.vbs&quot; Core Release"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories="..\..\src\include;..\..\libs\include"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;FREESWITCHCORE_EXPORTS"
RuntimeLibrary="2"
UsePrecompiledHeader="2"
PrecompiledHeaderThrough="switch.h"
PrecompiledHeaderFile="$(IntDir)\$(TargetName).pch"
BrowseInformation="0"
WarningLevel="4"
WarnAsError="true"
Detect64BitPortabilityProblems="true"
DebugInformationFormat="3"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
LinkLibraryDependencies="false"
AdditionalDependencies="Ws2_32.lib Mswsock.lib libapr-1.lib sqlite.lib libapriconv-1.lib libaprutil-1.lib Rpcrt4.lib libresample.lib srtp.lib"
OutputFile="$(OutDir)/FreeSwitch.dll"
LinkIncremental="1"
AdditionalLibraryDirectories="&quot;$(InputDir)..\..\libs\apr\$(OutDir)&quot;;&quot;$(InputDir)..\..\libs\sqlite\$(OutDir) DLL&quot;;&quot;$(InputDir)..\..\libs\apr-util\$(OutDir)&quot;;&quot;$(InputDir)..\..\libs\apr-iconv\$(OutDir)&quot;;&quot;$(InputDir)..\..\libs\libresample\win&quot;;&quot;$(InputDir)..\..\libs\srtp\$(OutDir)&quot;"
GenerateDebugInformation="true"
SubSystem="2"
OptimizeReferences="2"
EnableCOMDATFolding="2"
ImportLibrary="$(OutDir)/FreeSwitchCore.lib"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCWebDeploymentTool"
/>
<Tool
Name="VCPostBuildEventTool"
CommandLine="xcopy $(Projectdir)..\..\conf\*.* $(Outdir)\conf\ /C /D /Y&#x0D;&#x0A;xcopy &quot;$(Projectdir)..\..\libs\sqlite\$(IntDir) DLL\*.dll&quot; $(Outdir)\ /C /D /Y&#x0D;&#x0A;xcopy &quot;$(Projectdir)..\..\libs\sqlite\$(IntDir) DLL\*.lib&quot; $(Outdir)\ /C /D /Y&#x0D;&#x0A;if not exist $(Outdir)\db md $(Outdir)\db&#x0D;&#x0A;if not exist $(Outdir)\log md $(Outdir)\log&#x0D;&#x0A;if not exist $(Outdir)\log md $(Outdir)\htdocs&#x0D;&#x0A;&#x0D;&#x0A;"
/>
</Configuration>
</Configurations>
<References>
</References>
@ -403,22 +223,6 @@
UsePrecompiledHeader="1"
/>
</FileConfiguration>
<FileConfiguration
Name="Debug with MySql|Win32"
>
<Tool
Name="VCCLCompilerTool"
UsePrecompiledHeader="1"
/>
</FileConfiguration>
<FileConfiguration
Name="Release with MySql|Win32"
>
<Tool
Name="VCCLCompilerTool"
UsePrecompiledHeader="1"
/>
</FileConfiguration>
</File>
<File
RelativePath="..\..\src\switch_caller.c"

View File

@ -61,52 +61,6 @@
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Debug with MySql|Win32"
OutputDirectory="$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="10"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
Description="Generating switch_version.h"
CommandLine="cscript /nologo &quot;$(InputDir)getlibs.vbs&quot; Version"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release with MySql|Win32"
OutputDirectory="$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="10"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
Description="Generating switch_version.h"
CommandLine="cscript /nologo &quot;$(InputDir)getlibs.vbs&quot; Version"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
</Configurations>
<References>
</References>

View File

@ -384,8 +384,8 @@ Global
{05515420-16DE-4E63-BE73-85BE85BA5142}.Debug|Win32.Build.0 = Debug|Win32
{05515420-16DE-4E63-BE73-85BE85BA5142}.Release|Win32.ActiveCfg = Release|Win32
{05515420-16DE-4E63-BE73-85BE85BA5142}.Release|Win32.Build.0 = Release|Win32
{3D1EED36-A510-4EDB-B4D9-4E0F4A5EC2A8}.Debug|Win32.ActiveCfg = Debug|Win32
{3D1EED36-A510-4EDB-B4D9-4E0F4A5EC2A8}.Debug|Win32.Build.0 = Debug|Win32
{3D1EED36-A510-4EDB-B4D9-4E0F4A5EC2A8}.Debug|Win32.ActiveCfg = Debug with MySql|Win32
{3D1EED36-A510-4EDB-B4D9-4E0F4A5EC2A8}.Debug|Win32.Build.0 = Debug with MySql|Win32
{3D1EED36-A510-4EDB-B4D9-4E0F4A5EC2A8}.Release|Win32.ActiveCfg = Release|Win32
{3D1EED36-A510-4EDB-B4D9-4E0F4A5EC2A8}.Release|Win32.Build.0 = Release|Win32
EndGlobalSection