From 432c89a52f7236f758f10f70fbc6eb863cd8a685 Mon Sep 17 00:00:00 2001 From: Michael Jerris Date: Fri, 24 Oct 2008 16:52:53 +0000 Subject: [PATCH] add mod_loopback to windows build git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@10141 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- Freeswitch.2008.sln | 12 ++ .../mod_loopback/mod_loopback.2008.vcproj | 153 ++++++++++++++++++ src/mod/endpoints/mod_loopback/mod_loopback.c | 31 ++-- 3 files changed, 180 insertions(+), 16 deletions(-) create mode 100644 src/mod/endpoints/mod_loopback/mod_loopback.2008.vcproj diff --git a/Freeswitch.2008.sln b/Freeswitch.2008.sln index 95f7334c13..556585260e 100644 --- a/Freeswitch.2008.sln +++ b/Freeswitch.2008.sln @@ -980,6 +980,11 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libmpg123", "libs\win32\mpg {E796E337-DE78-4303-8614-9A590862EE95} = {E796E337-DE78-4303-8614-9A590862EE95} EndProjectSection EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_loopback", "src\mod\endpoints\mod_loopback\mod_loopback.2008.vcproj", "{B3F424EC-3D8F-417C-B244-3919D5E1A577}" + ProjectSection(ProjectDependencies) = postProject + {202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF} + EndProjectSection +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Win32 = Debug|Win32 @@ -1718,6 +1723,12 @@ Global {419C8F80-D858-4B48-A25C-AF4007608137}.Release|Win32.ActiveCfg = Release|Win32 {419C8F80-D858-4B48-A25C-AF4007608137}.Release|Win32.Build.0 = Release|Win32 {419C8F80-D858-4B48-A25C-AF4007608137}.Release|x64.ActiveCfg = Release|Win32 + {B3F424EC-3D8F-417C-B244-3919D5E1A577}.Debug|Win32.ActiveCfg = Debug|Win32 + {B3F424EC-3D8F-417C-B244-3919D5E1A577}.Debug|Win32.Build.0 = Debug|Win32 + {B3F424EC-3D8F-417C-B244-3919D5E1A577}.Debug|x64.ActiveCfg = Debug|Win32 + {B3F424EC-3D8F-417C-B244-3919D5E1A577}.Release|Win32.ActiveCfg = Release|Win32 + {B3F424EC-3D8F-417C-B244-3919D5E1A577}.Release|Win32.Build.0 = Release|Win32 + {B3F424EC-3D8F-417C-B244-3919D5E1A577}.Release|x64.ActiveCfg = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -1735,6 +1746,7 @@ Global {FE3540C5-3303-46E0-A69E-D92F775687F1} = {9460B5F1-0A95-41C4-BEB7-9C2C96459A7C} {FFAA4C52-3A53-4F99-90C1-D59D1F0427F3} = {9460B5F1-0A95-41C4-BEB7-9C2C96459A7C} {0DF3ABD0-DDC0-4265-B778-07C66780979B} = {9460B5F1-0A95-41C4-BEB7-9C2C96459A7C} + {B3F424EC-3D8F-417C-B244-3919D5E1A577} = {9460B5F1-0A95-41C4-BEB7-9C2C96459A7C} {30A5B29C-983E-4580-9FD0-D647CCDCC7EB} = {E72B5BCB-6462-4D23-B419-3AF1A4AC3D78} {B69247FA-ECD6-40ED-8E44-5CA6C3BAF9A4} = {E72B5BCB-6462-4D23-B419-3AF1A4AC3D78} {C24FB505-05D7-4319-8485-7540B44C8603} = {E72B5BCB-6462-4D23-B419-3AF1A4AC3D78} diff --git a/src/mod/endpoints/mod_loopback/mod_loopback.2008.vcproj b/src/mod/endpoints/mod_loopback/mod_loopback.2008.vcproj new file mode 100644 index 0000000000..e7abe1f2bc --- /dev/null +++ b/src/mod/endpoints/mod_loopback/mod_loopback.2008.vcproj @@ -0,0 +1,153 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/mod/endpoints/mod_loopback/mod_loopback.c b/src/mod/endpoints/mod_loopback/mod_loopback.c index 29250f5fbd..dbd49739a5 100644 --- a/src/mod/endpoints/mod_loopback/mod_loopback.c +++ b/src/mod/endpoints/mod_loopback/mod_loopback.c @@ -130,7 +130,7 @@ static switch_status_t tech_init(private_t *tech_pvt, switch_core_session_t *ses NULL, switch_core_session_get_pool(session)); - if (status != SWITCH_STATUS_SUCCESS) { + if (status != SWITCH_STATUS_SUCCESS || !tech_pvt->read_codec.implementation) { goto end; } @@ -206,10 +206,10 @@ static switch_status_t channel_on_init(switch_core_session_t *session) switch_caller_profile_t *caller_profile; tech_pvt = switch_core_session_get_private(session); - assert(tech_pvt != NULL); + switch_assert(tech_pvt != NULL); channel = switch_core_session_get_channel(session); - assert(channel != NULL); + switch_assert(channel != NULL); if (!switch_test_flag(tech_pvt, TFLAG_OUTBOUND)) { @@ -325,10 +325,10 @@ static switch_status_t channel_on_hangup(switch_core_session_t *session) private_t *tech_pvt = NULL; channel = switch_core_session_get_channel(session); - assert(channel != NULL); + switch_assert(channel != NULL); tech_pvt = switch_core_session_get_private(session); - assert(tech_pvt != NULL); + switch_assert(tech_pvt != NULL); switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "%s CHANNEL HANGUP\n", switch_channel_get_name(channel)); switch_clear_flag_locked(tech_pvt, TFLAG_LINKED); @@ -356,10 +356,10 @@ static switch_status_t channel_kill_channel(switch_core_session_t *session, int private_t *tech_pvt = NULL; channel = switch_core_session_get_channel(session); - assert(channel != NULL); + switch_assert(channel != NULL); tech_pvt = switch_core_session_get_private(session); - assert(tech_pvt != NULL); + switch_assert(tech_pvt != NULL); switch (sig) { case SWITCH_SIG_BREAK: @@ -419,8 +419,7 @@ static switch_status_t channel_on_reset(switch_core_session_t *session) static switch_status_t channel_on_hibernate(switch_core_session_t *session) { - private_t *tech_pvt = switch_core_session_get_private(session); - switch_assert(tech_pvt != NULL); + switch_assert(switch_core_session_get_private(session)); switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "%s HIBERNATE\n", switch_channel_get_name(switch_core_session_get_channel(session))); @@ -448,7 +447,7 @@ static switch_status_t channel_send_dtmf(switch_core_session_t *session, const s private_t *tech_pvt = NULL; tech_pvt = switch_core_session_get_private(session); - assert(tech_pvt != NULL); + switch_assert(tech_pvt != NULL); if (tech_pvt->other_channel) { switch_channel_queue_dtmf(tech_pvt->other_channel, dtmf); @@ -464,10 +463,10 @@ static switch_status_t channel_read_frame(switch_core_session_t *session, switch switch_status_t status = SWITCH_STATUS_FALSE; channel = switch_core_session_get_channel(session); - assert(channel != NULL); + switch_assert(channel != NULL); tech_pvt = switch_core_session_get_private(session); - assert(tech_pvt != NULL); + switch_assert(tech_pvt != NULL); if (!switch_test_flag(tech_pvt, TFLAG_LINKED)) { goto end; @@ -530,10 +529,10 @@ static switch_status_t channel_write_frame(switch_core_session_t *session, switc switch_status_t status = SWITCH_STATUS_FALSE; channel = switch_core_session_get_channel(session); - assert(channel != NULL); + switch_assert(channel != NULL); tech_pvt = switch_core_session_get_private(session); - assert(tech_pvt != NULL); + switch_assert(tech_pvt != NULL); if (switch_test_flag(frame, SFF_CNG) || switch_test_flag(tech_pvt, TFLAG_CNG) || switch_test_flag(tech_pvt, TFLAG_BOWOUT)) { return SWITCH_STATUS_SUCCESS; @@ -594,10 +593,10 @@ static switch_status_t channel_receive_message(switch_core_session_t *session, s private_t *tech_pvt; channel = switch_core_session_get_channel(session); - assert(channel != NULL); + switch_assert(channel != NULL); tech_pvt = switch_core_session_get_private(session); - assert(tech_pvt != NULL); + switch_assert(tech_pvt != NULL); switch (msg->message_id) { case SWITCH_MESSAGE_INDICATE_ANSWER: