add logger and mod_console to win32 build, fix warnings.
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@1119 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
56b9ed852d
commit
cf2bcc233a
|
@ -0,0 +1,209 @@
|
||||||
|
<?xml version="1.0" encoding="Windows-1252"?>
|
||||||
|
<VisualStudioProject
|
||||||
|
ProjectType="Visual C++"
|
||||||
|
Version="8.00"
|
||||||
|
Name="mod_console"
|
||||||
|
ProjectGUID="{1C453396-D912-4213-89FD-9B489162B7B5}"
|
||||||
|
RootNamespace="mod_console"
|
||||||
|
Keyword="Win32Proj"
|
||||||
|
>
|
||||||
|
<Platforms>
|
||||||
|
<Platform
|
||||||
|
Name="Win32"
|
||||||
|
/>
|
||||||
|
</Platforms>
|
||||||
|
<ToolFiles>
|
||||||
|
</ToolFiles>
|
||||||
|
<Configurations>
|
||||||
|
<Configuration
|
||||||
|
Name="Debug|Win32"
|
||||||
|
OutputDirectory="Debug"
|
||||||
|
IntermediateDirectory="Debug"
|
||||||
|
ConfigurationType="2"
|
||||||
|
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=""$(InputDir)..\..\..\include";"$(InputDir)include";"$(InputDir)..\..\..\..\libs\include""
|
||||||
|
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;MOD_EXPORTS"
|
||||||
|
MinimalRebuild="true"
|
||||||
|
BasicRuntimeChecks="3"
|
||||||
|
RuntimeLibrary="1"
|
||||||
|
UsePrecompiledHeader="0"
|
||||||
|
WarningLevel="4"
|
||||||
|
WarnAsError="true"
|
||||||
|
Detect64BitPortabilityProblems="true"
|
||||||
|
DebugInformationFormat="4"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManagedResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreLinkEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCLinkerTool"
|
||||||
|
OutputFile="..\..\..\..\w32\vsnet\$(OutDir)/mod/mod_console.dll"
|
||||||
|
LinkIncremental="2"
|
||||||
|
AdditionalLibraryDirectories="..\..\..\..\w32\vsnet\$(OutDir)"
|
||||||
|
GenerateDebugInformation="true"
|
||||||
|
ProgramDatabaseFile="$(OutDir)/mod_console.pdb"
|
||||||
|
SubSystem="2"
|
||||||
|
ImportLibrary="$(OutDir)/mod_console.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"
|
||||||
|
/>
|
||||||
|
</Configuration>
|
||||||
|
<Configuration
|
||||||
|
Name="Release|Win32"
|
||||||
|
OutputDirectory="Release"
|
||||||
|
IntermediateDirectory="Release"
|
||||||
|
ConfigurationType="2"
|
||||||
|
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=""$(InputDir)..\..\..\include";"$(InputDir)include";"$(InputDir)..\..\..\..\libs\include""
|
||||||
|
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;MOD_EXPORTS"
|
||||||
|
RuntimeLibrary="0"
|
||||||
|
UsePrecompiledHeader="0"
|
||||||
|
WarningLevel="4"
|
||||||
|
WarnAsError="true"
|
||||||
|
Detect64BitPortabilityProblems="true"
|
||||||
|
DebugInformationFormat="3"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManagedResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreLinkEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCLinkerTool"
|
||||||
|
OutputFile="..\..\..\..\w32\vsnet\$(OutDir)/mod/mod_console.dll"
|
||||||
|
LinkIncremental="1"
|
||||||
|
AdditionalLibraryDirectories="..\..\..\..\w32\vsnet\$(OutDir)"
|
||||||
|
GenerateDebugInformation="true"
|
||||||
|
SubSystem="2"
|
||||||
|
OptimizeReferences="2"
|
||||||
|
EnableCOMDATFolding="2"
|
||||||
|
ImportLibrary="$(OutDir)/mod_console.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"
|
||||||
|
/>
|
||||||
|
</Configuration>
|
||||||
|
</Configurations>
|
||||||
|
<References>
|
||||||
|
</References>
|
||||||
|
<Files>
|
||||||
|
<Filter
|
||||||
|
Name="Source Files"
|
||||||
|
Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
|
||||||
|
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
|
||||||
|
>
|
||||||
|
<File
|
||||||
|
RelativePath=".\mod_console.c"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
</Filter>
|
||||||
|
<Filter
|
||||||
|
Name="Header Files"
|
||||||
|
Filter="h;hpp;hxx;hm;inl;inc;xsd"
|
||||||
|
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
|
||||||
|
>
|
||||||
|
</Filter>
|
||||||
|
<Filter
|
||||||
|
Name="Resource Files"
|
||||||
|
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
|
||||||
|
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
|
||||||
|
>
|
||||||
|
</Filter>
|
||||||
|
</Files>
|
||||||
|
<Globals>
|
||||||
|
</Globals>
|
||||||
|
</VisualStudioProject>
|
|
@ -102,6 +102,7 @@ static void *SWITCH_THREAD_FUNC log_thread(switch_thread *thread, void *obj)
|
||||||
for(;;) {
|
for(;;) {
|
||||||
void *pop = NULL;
|
void *pop = NULL;
|
||||||
switch_log_node *node = NULL;
|
switch_log_node *node = NULL;
|
||||||
|
switch_log_binding *binding;
|
||||||
|
|
||||||
if (switch_queue_pop(LOG_QUEUE, &pop) != SWITCH_STATUS_SUCCESS) {
|
if (switch_queue_pop(LOG_QUEUE, &pop) != SWITCH_STATUS_SUCCESS) {
|
||||||
break;
|
break;
|
||||||
|
@ -113,7 +114,6 @@ static void *SWITCH_THREAD_FUNC log_thread(switch_thread *thread, void *obj)
|
||||||
|
|
||||||
node = (switch_log_node *) pop;
|
node = (switch_log_node *) pop;
|
||||||
|
|
||||||
switch_log_binding *binding;
|
|
||||||
switch_mutex_lock(BINDLOCK);
|
switch_mutex_lock(BINDLOCK);
|
||||||
for(binding = BINDINGS; binding; binding = binding->next) {
|
for(binding = BINDINGS; binding; binding = binding->next) {
|
||||||
if (binding->level >= node->level) {
|
if (binding->level >= node->level) {
|
||||||
|
@ -157,7 +157,7 @@ SWITCH_DECLARE(void) switch_log_printf(switch_text_channel channel, char *file,
|
||||||
switch_time_exp_lt(&tm, switch_time_now());
|
switch_time_exp_lt(&tm, switch_time_now());
|
||||||
switch_strftime(date, &retsize, sizeof(date), "%Y-%m-%d %T", &tm);
|
switch_strftime(date, &retsize, sizeof(date), "%Y-%m-%d %T", &tm);
|
||||||
|
|
||||||
len = strlen(extra_fmt) + strlen(date) + strlen(filep) + 32 + strlen(func) + strlen(fmt);
|
len = (uint32_t)(strlen(extra_fmt) + strlen(date) + strlen(filep) + 32 + strlen(func) + strlen(fmt));
|
||||||
new_fmt = malloc(len+1);
|
new_fmt = malloc(len+1);
|
||||||
snprintf(new_fmt, len, extra_fmt, date, LEVELS[level], filep, line, func, fmt);
|
snprintf(new_fmt, len, extra_fmt, date, LEVELS[level], filep, line, func, fmt);
|
||||||
fmt = new_fmt;
|
fmt = new_fmt;
|
||||||
|
@ -208,12 +208,13 @@ SWITCH_DECLARE(void) switch_log_printf(switch_text_channel channel, char *file,
|
||||||
|
|
||||||
SWITCH_DECLARE(switch_status) switch_log_init(switch_memory_pool *pool)
|
SWITCH_DECLARE(switch_status) switch_log_init(switch_memory_pool *pool)
|
||||||
{
|
{
|
||||||
|
switch_thread *thread;
|
||||||
|
switch_threadattr_t *thd_attr;;
|
||||||
|
|
||||||
assert(pool != NULL);
|
assert(pool != NULL);
|
||||||
|
|
||||||
LOG_POOL = pool;
|
LOG_POOL = pool;
|
||||||
|
|
||||||
switch_thread *thread;
|
|
||||||
switch_threadattr_t *thd_attr;;
|
|
||||||
switch_threadattr_create(&thd_attr, LOG_POOL);
|
switch_threadattr_create(&thd_attr, LOG_POOL);
|
||||||
switch_threadattr_detach_set(thd_attr, 1);
|
switch_threadattr_detach_set(thd_attr, 1);
|
||||||
|
|
||||||
|
|
|
@ -231,6 +231,10 @@
|
||||||
RelativePath="..\..\src\switch_loadable_module.c"
|
RelativePath="..\..\src\switch_loadable_module.c"
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\..\src\switch_log.c"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath="..\..\src\switch_resample.c"
|
RelativePath="..\..\src\switch_resample.c"
|
||||||
>
|
>
|
||||||
|
@ -301,6 +305,10 @@
|
||||||
RelativePath="..\..\src\include\switch_loadable_module.h"
|
RelativePath="..\..\src\include\switch_loadable_module.h"
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\..\src\include\switch_log.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath="..\..\src\include\switch_module_interfaces.h"
|
RelativePath="..\..\src\include\switch_module_interfaces.h"
|
||||||
>
|
>
|
||||||
|
|
|
@ -192,6 +192,13 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_commands", "..\..\src\m
|
||||||
{202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
|
{202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
|
||||||
EndProjectSection
|
EndProjectSection
|
||||||
EndProject
|
EndProject
|
||||||
|
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Loggers", "Loggers", "{A7AB4405-FDB7-4853-9FBB-1516B1C3D80A}"
|
||||||
|
EndProject
|
||||||
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_console", "..\..\src\mod\loggers\mod_console\mod_console.vcproj", "{1C453396-D912-4213-89FD-9B489162B7B5}"
|
||||||
|
ProjectSection(ProjectDependencies) = postProject
|
||||||
|
{202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
|
||||||
|
EndProjectSection
|
||||||
|
EndProject
|
||||||
Global
|
Global
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
Debug|Win32 = Debug|Win32
|
Debug|Win32 = Debug|Win32
|
||||||
|
@ -328,6 +335,10 @@ Global
|
||||||
{30A5B29C-983E-4580-9FD0-D647CCDCC7EB}.Debug|Win32.Build.0 = Debug|Win32
|
{30A5B29C-983E-4580-9FD0-D647CCDCC7EB}.Debug|Win32.Build.0 = Debug|Win32
|
||||||
{30A5B29C-983E-4580-9FD0-D647CCDCC7EB}.Release|Win32.ActiveCfg = Release|Win32
|
{30A5B29C-983E-4580-9FD0-D647CCDCC7EB}.Release|Win32.ActiveCfg = Release|Win32
|
||||||
{30A5B29C-983E-4580-9FD0-D647CCDCC7EB}.Release|Win32.Build.0 = Release|Win32
|
{30A5B29C-983E-4580-9FD0-D647CCDCC7EB}.Release|Win32.Build.0 = Release|Win32
|
||||||
|
{1C453396-D912-4213-89FD-9B489162B7B5}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||||
|
{1C453396-D912-4213-89FD-9B489162B7B5}.Debug|Win32.Build.0 = Debug|Win32
|
||||||
|
{1C453396-D912-4213-89FD-9B489162B7B5}.Release|Win32.ActiveCfg = Release|Win32
|
||||||
|
{1C453396-D912-4213-89FD-9B489162B7B5}.Release|Win32.Build.0 = Release|Win32
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(SolutionProperties) = preSolution
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
HideSolutionNode = FALSE
|
HideSolutionNode = FALSE
|
||||||
|
@ -364,5 +375,6 @@ Global
|
||||||
{B0C6CFF9-7DCD-4A21-8BA4-C2011E18DED8} = {0C808854-54D1-4230-BFF5-77B5FD905000}
|
{B0C6CFF9-7DCD-4A21-8BA4-C2011E18DED8} = {0C808854-54D1-4230-BFF5-77B5FD905000}
|
||||||
{7B077E7F-1BE7-4291-AB86-55E527B25CAC} = {0C808854-54D1-4230-BFF5-77B5FD905000}
|
{7B077E7F-1BE7-4291-AB86-55E527B25CAC} = {0C808854-54D1-4230-BFF5-77B5FD905000}
|
||||||
{692F6330-4D87-4C82-81DF-40DB5892636E} = {4CF6A6AC-07DE-4B9E-ABE1-7F98B64E0BB0}
|
{692F6330-4D87-4C82-81DF-40DB5892636E} = {4CF6A6AC-07DE-4B9E-ABE1-7F98B64E0BB0}
|
||||||
|
{1C453396-D912-4213-89FD-9B489162B7B5} = {A7AB4405-FDB7-4853-9FBB-1516B1C3D80A}
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
EndGlobal
|
EndGlobal
|
||||||
|
|
Loading…
Reference in New Issue