mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-07-24 13:12:03 +00:00
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:
@@ -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 (!strncasecmp(cmd, "auth ", 5)) {
|
||||
char *pass;
|
||||
strip_cr(cmd);
|
||||
|
||||
char *pass = cmd + 5;
|
||||
pass = cmd + 5;
|
||||
|
||||
if (!strcmp(prefs.password, pass)) {
|
||||
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) {
|
||||
elapsed = time(NULL) - start;
|
||||
elapsed = (uint32_t)(time(NULL) - start);
|
||||
if (elapsed >= 15) {
|
||||
switch_clear_flag_locked(listener, LFLAG_RUNNING);
|
||||
break;
|
||||
@@ -421,10 +422,10 @@ static void *SWITCH_THREAD_FUNC listener_run(switch_thread_t *thread, void *obj)
|
||||
done:
|
||||
|
||||
while(switch_test_flag(listener, LFLAG_RUNNING) && listen_list.ready) {
|
||||
uint8_t do_sleep = 1;
|
||||
len = sizeof(buf);
|
||||
memset(buf, 0, len);
|
||||
status = switch_socket_recv(listener->sock, buf, &len);
|
||||
uint8_t do_sleep = 1;
|
||||
|
||||
if (!len && status != SWITCH_STATUS_BREAK) {
|
||||
break;
|
||||
@@ -554,7 +555,7 @@ static int config(void)
|
||||
if (!strcmp(var, "listen-ip")) {
|
||||
set_pref_ip(val);
|
||||
} else if (!strcmp(var, "listen-port")) {
|
||||
prefs.port = atoi(val);
|
||||
prefs.port = (uint16_t)atoi(val);
|
||||
} else if (!strcmp(var, "password")) {
|
||||
set_pref_pass(val);
|
||||
}
|
||||
@@ -586,7 +587,6 @@ SWITCH_MOD_DECLARE(switch_status_t) switch_module_runtime(void)
|
||||
switch_sockaddr_t *sa;
|
||||
switch_socket_t *inbound_socket = NULL;
|
||||
listener_t *listener;
|
||||
uint32_t count;
|
||||
|
||||
memset(&listen_list, 0, sizeof(listen_list));
|
||||
config();
|
||||
@@ -600,7 +600,6 @@ SWITCH_MOD_DECLARE(switch_status_t) switch_module_runtime(void)
|
||||
|
||||
|
||||
for(;;) {
|
||||
count++;
|
||||
rv = switch_sockaddr_info_get(&sa, prefs.ip, APR_INET, prefs.port, 0, pool);
|
||||
if (rv) goto fail;
|
||||
rv = switch_socket_create(&listen_list.sock, sa->family, SOCK_STREAM, APR_PROTO_TCP, pool);
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="8.00"
|
||||
Name="mod_event_test"
|
||||
ProjectGUID="{3A2A7795-C216-4FFF-B8EF-4D17A84BACCC}"
|
||||
RootNamespace="mod_event_test"
|
||||
Name="mod_event_socket"
|
||||
ProjectGUID="{05515420-16DE-4E63-BE73-85BE85BA5142}"
|
||||
RootNamespace="mod_event_socket"
|
||||
Keyword="Win32Proj"
|
||||
>
|
||||
<Platforms>
|
||||
@@ -63,13 +63,13 @@
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
OutputFile="..\..\..\..\w32\vsnet\$(OutDir)/mod/mod_event_test.dll"
|
||||
OutputFile="..\..\..\..\w32\vsnet\$(OutDir)/mod/mod_event_socket.dll"
|
||||
LinkIncremental="2"
|
||||
AdditionalLibraryDirectories="..\..\..\..\w32\vsnet\$(OutDir)"
|
||||
GenerateDebugInformation="true"
|
||||
ProgramDatabaseFile="$(OutDir)/mod_event_test.pdb"
|
||||
ProgramDatabaseFile="$(OutDir)/mod_event_socket.pdb"
|
||||
SubSystem="2"
|
||||
ImportLibrary="$(OutDir)/mod_event_test.lib"
|
||||
ImportLibrary="$(OutDir)/mod_event_socket.lib"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
@@ -142,14 +142,14 @@
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
OutputFile="..\..\..\..\w32\vsnet\$(OutDir)/mod/mod_event_test.dll"
|
||||
OutputFile="..\..\..\..\w32\vsnet\$(OutDir)/mod/mod_event_socket.dll"
|
||||
LinkIncremental="1"
|
||||
AdditionalLibraryDirectories="..\..\..\..\w32\vsnet\$(OutDir)"
|
||||
GenerateDebugInformation="true"
|
||||
SubSystem="2"
|
||||
OptimizeReferences="2"
|
||||
EnableCOMDATFolding="2"
|
||||
ImportLibrary="$(OutDir)/mod_event_test.lib"
|
||||
ImportLibrary="$(OutDir)/mod_event_socket.lib"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
@@ -187,7 +187,7 @@
|
||||
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
|
||||
>
|
||||
<File
|
||||
RelativePath=".\mod_event_test.c"
|
||||
RelativePath=".\mod_event_socket.c"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
|
||||
Reference in New Issue
Block a user