From 8420b7e8fbb03518acc2abffbb9c9c23dc3ca105 Mon Sep 17 00:00:00 2001 From: Michael Jerris Date: Tue, 14 Feb 2006 22:58:07 +0000 Subject: [PATCH] add mod_event_multicast to msvc build. Fix some warnings. git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@618 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- .../mod_event_multicast/mod_event_multicast.c | 4 ++-- .../mod_event_multicast/mod_event_multicast.vcproj | 2 +- src/switch_utils.c | 2 ++ w32/vsnet/Freeswitch.sln | 10 ++++++++++ 4 files changed, 15 insertions(+), 3 deletions(-) diff --git a/src/mod/event_handlers/mod_event_multicast/mod_event_multicast.c b/src/mod/event_handlers/mod_event_multicast/mod_event_multicast.c index 2884788fcd..58f3d24314 100644 --- a/src/mod/event_handlers/mod_event_multicast/mod_event_multicast.c +++ b/src/mod/event_handlers/mod_event_multicast/mod_event_multicast.c @@ -84,7 +84,7 @@ static switch_status load_config(void) static void event_handler(switch_event *event) { char buf[1024]; - int len; + size_t len; if (event->subclass && !strcmp(event->subclass->name, MULTICAST_EVENT)) { /* ignore our own events to avoid ping pong*/ @@ -197,7 +197,7 @@ SWITCH_MOD_DECLARE(switch_status) switch_module_runtime(void) globals.running = 1; while(globals.running == 1) { switch_sockaddr_t addr = {0}; - int len = sizeof(buf); + size_t len = sizeof(buf); memset(buf, 0, len); if ((status = switch_socket_recvfrom(&addr, globals.udp_socket, 0, buf, &len)) == SWITCH_STATUS_SUCCESS) { if (switch_event_create_subclass(&local_event, SWITCH_EVENT_CUSTOM, MULTICAST_EVENT) == SWITCH_STATUS_SUCCESS) { diff --git a/src/mod/event_handlers/mod_event_multicast/mod_event_multicast.vcproj b/src/mod/event_handlers/mod_event_multicast/mod_event_multicast.vcproj index edf9f9d5f2..533cb35fec 100644 --- a/src/mod/event_handlers/mod_event_multicast/mod_event_multicast.vcproj +++ b/src/mod/event_handlers/mod_event_multicast/mod_event_multicast.vcproj @@ -3,7 +3,7 @@ ProjectType="Visual C++" Version="8.00" Name="mod_event_multicast" - ProjectGUID="{3A2A7795-C216-4FFF-B8EF-4D17A84BACCC}" + ProjectGUID="{784113EF-44D9-4949-835D-7065D3C7AD08}" RootNamespace="mod_event_multicast" Keyword="Win32Proj" > diff --git a/src/switch_utils.c b/src/switch_utils.c index 2b07e372d7..02e875d2c0 100644 --- a/src/switch_utils.c +++ b/src/switch_utils.c @@ -119,5 +119,7 @@ void include_me(void) { apr_socket_shutdown(NULL, 0); apr_socket_recvfrom(NULL, NULL, 0, NULL, NULL); + apr_mcast_join(NULL, NULL, NULL, NULL); + apr_socket_opt_set(NULL, 0, 0); } #endif diff --git a/w32/vsnet/Freeswitch.sln b/w32/vsnet/Freeswitch.sln index cf4e25f081..b908c5422d 100644 --- a/w32/vsnet/Freeswitch.sln +++ b/w32/vsnet/Freeswitch.sln @@ -140,6 +140,11 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_zeroconf", "..\..\src\m {202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF} EndProjectSection EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_event_multicast", "..\..\src\mod\event_handlers\mod_event_multicast\mod_event_multicast.vcproj", "{784113EF-44D9-4949-835D-7065D3C7AD08}" + ProjectSection(ProjectDependencies) = postProject + {202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF} + EndProjectSection +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Win32 = Debug|Win32 @@ -244,6 +249,10 @@ Global {C7705DC4-2088-493E-AF8D-65BC6D65C125}.Debug|Win32.Build.0 = Debug|Win32 {C7705DC4-2088-493E-AF8D-65BC6D65C125}.Release|Win32.ActiveCfg = Release|Win32 {C7705DC4-2088-493E-AF8D-65BC6D65C125}.Release|Win32.Build.0 = Release|Win32 + {784113EF-44D9-4949-835D-7065D3C7AD08}.Debug|Win32.ActiveCfg = Debug|Win32 + {784113EF-44D9-4949-835D-7065D3C7AD08}.Debug|Win32.Build.0 = Debug|Win32 + {784113EF-44D9-4949-835D-7065D3C7AD08}.Release|Win32.ActiveCfg = Release|Win32 + {784113EF-44D9-4949-835D-7065D3C7AD08}.Release|Win32.Build.0 = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -257,6 +266,7 @@ Global {3A2A7795-C216-4FFF-B8EF-4D17A84BACCC} = {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} + {784113EF-44D9-4949-835D-7065D3C7AD08} = {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}