diff --git a/src/mod/event_handlers/mod_event_socket/mod_event_socket.c b/src/mod/event_handlers/mod_event_socket/mod_event_socket.c index 445e847f52..9c35dbc10a 100644 --- a/src/mod/event_handlers/mod_event_socket/mod_event_socket.c +++ b/src/mod/event_handlers/mod_event_socket/mod_event_socket.c @@ -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); diff --git a/src/mod/event_handlers/mod_event_socket/mod_event_socket.vcproj b/src/mod/event_handlers/mod_event_socket/mod_event_socket.vcproj index 3e23ba9374..90d57bcc20 100644 --- a/src/mod/event_handlers/mod_event_socket/mod_event_socket.vcproj +++ b/src/mod/event_handlers/mod_event_socket/mod_event_socket.vcproj @@ -2,9 +2,9 @@ @@ -63,13 +63,13 @@ /> diff --git a/w32/vsnet/Freeswitch.sln b/w32/vsnet/Freeswitch.sln index ab8c14e14b..8fcafcdcdd 100644 --- a/w32/vsnet/Freeswitch.sln +++ b/w32/vsnet/Freeswitch.sln @@ -216,6 +216,11 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_dptools", "..\..\src\mo {202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF} EndProjectSection 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 GlobalSection(SolutionConfigurationPlatforms) = preSolution 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}.Release|Win32.ActiveCfg = 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 GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -385,6 +394,7 @@ Global {F10BE67C-A8FF-4CB2-AF29-D46D2590DC59} = {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} + {05515420-16DE-4E63-BE73-85BE85BA5142} = {9ADF1E48-2F5C-4ED7-A893-596259FABFE0} {AFAC0568-7548-42D5-9F6A-8D3400A1E4F6} = {A5A27244-AD24-46E5-B01B-840CD296C91D} {78100236-7CEA-4948-96CC-E8ED3160329C} = {E72B5BCB-6462-4D23-B419-3AF1A4AC3D78} {E1794405-29D4-466D-9BE3-DD2344C2A663} = {E72B5BCB-6462-4D23-B419-3AF1A4AC3D78}