add mod_event_socket to windows build.
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2049 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
9ef48b6e1f
commit
5378e48454
|
@ -213,9 +213,10 @@ static void parse_command(listener_t *listener, char *cmd, char *reply, uint32_t
|
||||||
|
|
||||||
if (!switch_test_flag(listener, LFLAG_AUTHED)) {
|
if (!switch_test_flag(listener, LFLAG_AUTHED)) {
|
||||||
if (!strncasecmp(cmd, "auth ", 5)) {
|
if (!strncasecmp(cmd, "auth ", 5)) {
|
||||||
|
char *pass;
|
||||||
strip_cr(cmd);
|
strip_cr(cmd);
|
||||||
|
|
||||||
char *pass = cmd + 5;
|
pass = cmd + 5;
|
||||||
|
|
||||||
if (!strcmp(prefs.password, pass)) {
|
if (!strcmp(prefs.password, pass)) {
|
||||||
switch_set_flag_locked(listener, LFLAG_AUTHED);
|
switch_set_flag_locked(listener, LFLAG_AUTHED);
|
||||||
|
@ -406,7 +407,7 @@ static void *SWITCH_THREAD_FUNC listener_run(switch_thread_t *thread, void *obj)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (status == SWITCH_STATUS_BREAK) {
|
if (status == SWITCH_STATUS_BREAK) {
|
||||||
elapsed = time(NULL) - start;
|
elapsed = (uint32_t)(time(NULL) - start);
|
||||||
if (elapsed >= 15) {
|
if (elapsed >= 15) {
|
||||||
switch_clear_flag_locked(listener, LFLAG_RUNNING);
|
switch_clear_flag_locked(listener, LFLAG_RUNNING);
|
||||||
break;
|
break;
|
||||||
|
@ -421,10 +422,10 @@ static void *SWITCH_THREAD_FUNC listener_run(switch_thread_t *thread, void *obj)
|
||||||
done:
|
done:
|
||||||
|
|
||||||
while(switch_test_flag(listener, LFLAG_RUNNING) && listen_list.ready) {
|
while(switch_test_flag(listener, LFLAG_RUNNING) && listen_list.ready) {
|
||||||
|
uint8_t do_sleep = 1;
|
||||||
len = sizeof(buf);
|
len = sizeof(buf);
|
||||||
memset(buf, 0, len);
|
memset(buf, 0, len);
|
||||||
status = switch_socket_recv(listener->sock, buf, &len);
|
status = switch_socket_recv(listener->sock, buf, &len);
|
||||||
uint8_t do_sleep = 1;
|
|
||||||
|
|
||||||
if (!len && status != SWITCH_STATUS_BREAK) {
|
if (!len && status != SWITCH_STATUS_BREAK) {
|
||||||
break;
|
break;
|
||||||
|
@ -554,7 +555,7 @@ static int config(void)
|
||||||
if (!strcmp(var, "listen-ip")) {
|
if (!strcmp(var, "listen-ip")) {
|
||||||
set_pref_ip(val);
|
set_pref_ip(val);
|
||||||
} else if (!strcmp(var, "listen-port")) {
|
} else if (!strcmp(var, "listen-port")) {
|
||||||
prefs.port = atoi(val);
|
prefs.port = (uint16_t)atoi(val);
|
||||||
} else if (!strcmp(var, "password")) {
|
} else if (!strcmp(var, "password")) {
|
||||||
set_pref_pass(val);
|
set_pref_pass(val);
|
||||||
}
|
}
|
||||||
|
@ -586,7 +587,6 @@ SWITCH_MOD_DECLARE(switch_status_t) switch_module_runtime(void)
|
||||||
switch_sockaddr_t *sa;
|
switch_sockaddr_t *sa;
|
||||||
switch_socket_t *inbound_socket = NULL;
|
switch_socket_t *inbound_socket = NULL;
|
||||||
listener_t *listener;
|
listener_t *listener;
|
||||||
uint32_t count;
|
|
||||||
|
|
||||||
memset(&listen_list, 0, sizeof(listen_list));
|
memset(&listen_list, 0, sizeof(listen_list));
|
||||||
config();
|
config();
|
||||||
|
@ -600,7 +600,6 @@ SWITCH_MOD_DECLARE(switch_status_t) switch_module_runtime(void)
|
||||||
|
|
||||||
|
|
||||||
for(;;) {
|
for(;;) {
|
||||||
count++;
|
|
||||||
rv = switch_sockaddr_info_get(&sa, prefs.ip, APR_INET, prefs.port, 0, pool);
|
rv = switch_sockaddr_info_get(&sa, prefs.ip, APR_INET, prefs.port, 0, pool);
|
||||||
if (rv) goto fail;
|
if (rv) goto fail;
|
||||||
rv = switch_socket_create(&listen_list.sock, sa->family, SOCK_STREAM, APR_PROTO_TCP, pool);
|
rv = switch_socket_create(&listen_list.sock, sa->family, SOCK_STREAM, APR_PROTO_TCP, pool);
|
||||||
|
|
|
@ -2,9 +2,9 @@
|
||||||
<VisualStudioProject
|
<VisualStudioProject
|
||||||
ProjectType="Visual C++"
|
ProjectType="Visual C++"
|
||||||
Version="8.00"
|
Version="8.00"
|
||||||
Name="mod_event_test"
|
Name="mod_event_socket"
|
||||||
ProjectGUID="{3A2A7795-C216-4FFF-B8EF-4D17A84BACCC}"
|
ProjectGUID="{05515420-16DE-4E63-BE73-85BE85BA5142}"
|
||||||
RootNamespace="mod_event_test"
|
RootNamespace="mod_event_socket"
|
||||||
Keyword="Win32Proj"
|
Keyword="Win32Proj"
|
||||||
>
|
>
|
||||||
<Platforms>
|
<Platforms>
|
||||||
|
@ -63,13 +63,13 @@
|
||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCLinkerTool"
|
Name="VCLinkerTool"
|
||||||
OutputFile="..\..\..\..\w32\vsnet\$(OutDir)/mod/mod_event_test.dll"
|
OutputFile="..\..\..\..\w32\vsnet\$(OutDir)/mod/mod_event_socket.dll"
|
||||||
LinkIncremental="2"
|
LinkIncremental="2"
|
||||||
AdditionalLibraryDirectories="..\..\..\..\w32\vsnet\$(OutDir)"
|
AdditionalLibraryDirectories="..\..\..\..\w32\vsnet\$(OutDir)"
|
||||||
GenerateDebugInformation="true"
|
GenerateDebugInformation="true"
|
||||||
ProgramDatabaseFile="$(OutDir)/mod_event_test.pdb"
|
ProgramDatabaseFile="$(OutDir)/mod_event_socket.pdb"
|
||||||
SubSystem="2"
|
SubSystem="2"
|
||||||
ImportLibrary="$(OutDir)/mod_event_test.lib"
|
ImportLibrary="$(OutDir)/mod_event_socket.lib"
|
||||||
TargetMachine="1"
|
TargetMachine="1"
|
||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
|
@ -142,14 +142,14 @@
|
||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCLinkerTool"
|
Name="VCLinkerTool"
|
||||||
OutputFile="..\..\..\..\w32\vsnet\$(OutDir)/mod/mod_event_test.dll"
|
OutputFile="..\..\..\..\w32\vsnet\$(OutDir)/mod/mod_event_socket.dll"
|
||||||
LinkIncremental="1"
|
LinkIncremental="1"
|
||||||
AdditionalLibraryDirectories="..\..\..\..\w32\vsnet\$(OutDir)"
|
AdditionalLibraryDirectories="..\..\..\..\w32\vsnet\$(OutDir)"
|
||||||
GenerateDebugInformation="true"
|
GenerateDebugInformation="true"
|
||||||
SubSystem="2"
|
SubSystem="2"
|
||||||
OptimizeReferences="2"
|
OptimizeReferences="2"
|
||||||
EnableCOMDATFolding="2"
|
EnableCOMDATFolding="2"
|
||||||
ImportLibrary="$(OutDir)/mod_event_test.lib"
|
ImportLibrary="$(OutDir)/mod_event_socket.lib"
|
||||||
TargetMachine="1"
|
TargetMachine="1"
|
||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
|
@ -187,7 +187,7 @@
|
||||||
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
|
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
|
||||||
>
|
>
|
||||||
<File
|
<File
|
||||||
RelativePath=".\mod_event_test.c"
|
RelativePath=".\mod_event_socket.c"
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
</Filter>
|
</Filter>
|
||||||
|
|
|
@ -216,6 +216,11 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_dptools", "..\..\src\mo
|
||||||
{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("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_event_socket", "..\..\src\mod\event_handlers\mod_event_socket\mod_event_socket.vcproj", "{05515420-16DE-4E63-BE73-85BE85BA5142}"
|
||||||
|
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
|
||||||
|
@ -370,6 +375,10 @@ Global
|
||||||
{B5881A85-FE70-4F64-8607-2CAAE52669C6}.Debug|Win32.Build.0 = Debug|Win32
|
{B5881A85-FE70-4F64-8607-2CAAE52669C6}.Debug|Win32.Build.0 = Debug|Win32
|
||||||
{B5881A85-FE70-4F64-8607-2CAAE52669C6}.Release|Win32.ActiveCfg = Release|Win32
|
{B5881A85-FE70-4F64-8607-2CAAE52669C6}.Release|Win32.ActiveCfg = Release|Win32
|
||||||
{B5881A85-FE70-4F64-8607-2CAAE52669C6}.Release|Win32.Build.0 = Release|Win32
|
{B5881A85-FE70-4F64-8607-2CAAE52669C6}.Release|Win32.Build.0 = Release|Win32
|
||||||
|
{05515420-16DE-4E63-BE73-85BE85BA5142}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||||
|
{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
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(SolutionProperties) = preSolution
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
HideSolutionNode = FALSE
|
HideSolutionNode = FALSE
|
||||||
|
@ -385,6 +394,7 @@ Global
|
||||||
{F10BE67C-A8FF-4CB2-AF29-D46D2590DC59} = {9ADF1E48-2F5C-4ED7-A893-596259FABFE0}
|
{F10BE67C-A8FF-4CB2-AF29-D46D2590DC59} = {9ADF1E48-2F5C-4ED7-A893-596259FABFE0}
|
||||||
{C7705DC4-2088-493E-AF8D-65BC6D65C125} = {9ADF1E48-2F5C-4ED7-A893-596259FABFE0}
|
{C7705DC4-2088-493E-AF8D-65BC6D65C125} = {9ADF1E48-2F5C-4ED7-A893-596259FABFE0}
|
||||||
{784113EF-44D9-4949-835D-7065D3C7AD08} = {9ADF1E48-2F5C-4ED7-A893-596259FABFE0}
|
{784113EF-44D9-4949-835D-7065D3C7AD08} = {9ADF1E48-2F5C-4ED7-A893-596259FABFE0}
|
||||||
|
{05515420-16DE-4E63-BE73-85BE85BA5142} = {9ADF1E48-2F5C-4ED7-A893-596259FABFE0}
|
||||||
{AFAC0568-7548-42D5-9F6A-8D3400A1E4F6} = {A5A27244-AD24-46E5-B01B-840CD296C91D}
|
{AFAC0568-7548-42D5-9F6A-8D3400A1E4F6} = {A5A27244-AD24-46E5-B01B-840CD296C91D}
|
||||||
{78100236-7CEA-4948-96CC-E8ED3160329C} = {E72B5BCB-6462-4D23-B419-3AF1A4AC3D78}
|
{78100236-7CEA-4948-96CC-E8ED3160329C} = {E72B5BCB-6462-4D23-B419-3AF1A4AC3D78}
|
||||||
{E1794405-29D4-466D-9BE3-DD2344C2A663} = {E72B5BCB-6462-4D23-B419-3AF1A4AC3D78}
|
{E1794405-29D4-466D-9BE3-DD2344C2A663} = {E72B5BCB-6462-4D23-B419-3AF1A4AC3D78}
|
||||||
|
|
Loading…
Reference in New Issue