From a912fa6b3e096c898e6f649f30fd53313cdcc06c Mon Sep 17 00:00:00 2001 From: Jeff Lenk Date: Thu, 12 May 2011 10:48:46 -0500 Subject: [PATCH] VS2008 cleanup for Core Curl integration --- Freeswitch.2008.express.sln | 2 ++ Freeswitch.2008.sln | 2 ++ src/include/switch.h | 2 -- src/include/switch_curl.h | 4 ++-- src/switch_core.c | 4 ---- src/switch_curl.c | 2 +- w32/Library/FreeSwitchCore.2008.vcproj | 24 ++++++++++++++++-------- 7 files changed, 23 insertions(+), 17 deletions(-) diff --git a/Freeswitch.2008.express.sln b/Freeswitch.2008.express.sln index b4f1f60201..43cbc02d0e 100644 --- a/Freeswitch.2008.express.sln +++ b/Freeswitch.2008.express.sln @@ -9,12 +9,14 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FreeSwitchConsole", "w32\Co EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FreeSwitchCoreLib", "w32\Library\FreeSwitchCore.2008.vcproj", "{202D7A4E-760D-4D0E-AFA1-D7459CED30FF}" ProjectSection(ProjectDependencies) = postProject + {D331904D-A00A-4694-A5A3-FCFF64AB5DBE} = {D331904D-A00A-4694-A5A3-FCFF64AB5DBE} {8D04B550-D240-4A44-8A18-35DA3F7038D9} = {8D04B550-D240-4A44-8A18-35DA3F7038D9} {89385C74-5860-4174-9CAF-A39E7C48909C} = {89385C74-5860-4174-9CAF-A39E7C48909C} {1CBB0077-18C5-455F-801C-0A0CE7B0BBF5} = {1CBB0077-18C5-455F-801C-0A0CE7B0BBF5} {F057DA7F-79E5-4B00-845C-EF446EF055E3} = {F057DA7F-79E5-4B00-845C-EF446EF055E3} {03207781-0D1C-4DB3-A71D-45C608F28DBD} = {03207781-0D1C-4DB3-A71D-45C608F28DBD} {F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF} + {87EE9DA4-DE1E-4448-8324-183C98DCA588} = {87EE9DA4-DE1E-4448-8324-183C98DCA588} {EEF031CB-FED8-451E-A471-91EC8D4F6750} = {EEF031CB-FED8-451E-A471-91EC8D4F6750} {6EDFEFD5-3596-4FA9-8EBA-B331547B35A3} = {6EDFEFD5-3596-4FA9-8EBA-B331547B35A3} EndProjectSection diff --git a/Freeswitch.2008.sln b/Freeswitch.2008.sln index f915005e7c..4061116d07 100644 --- a/Freeswitch.2008.sln +++ b/Freeswitch.2008.sln @@ -379,12 +379,14 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FreeSwitchConsole", "w32\Co EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FreeSwitchCoreLib", "w32\Library\FreeSwitchCore.2008.vcproj", "{202D7A4E-760D-4D0E-AFA1-D7459CED30FF}" ProjectSection(ProjectDependencies) = postProject + {D331904D-A00A-4694-A5A3-FCFF64AB5DBE} = {D331904D-A00A-4694-A5A3-FCFF64AB5DBE} {8D04B550-D240-4A44-8A18-35DA3F7038D9} = {8D04B550-D240-4A44-8A18-35DA3F7038D9} {89385C74-5860-4174-9CAF-A39E7C48909C} = {89385C74-5860-4174-9CAF-A39E7C48909C} {1CBB0077-18C5-455F-801C-0A0CE7B0BBF5} = {1CBB0077-18C5-455F-801C-0A0CE7B0BBF5} {F057DA7F-79E5-4B00-845C-EF446EF055E3} = {F057DA7F-79E5-4B00-845C-EF446EF055E3} {03207781-0D1C-4DB3-A71D-45C608F28DBD} = {03207781-0D1C-4DB3-A71D-45C608F28DBD} {F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF} + {87EE9DA4-DE1E-4448-8324-183C98DCA588} = {87EE9DA4-DE1E-4448-8324-183C98DCA588} {EEF031CB-FED8-451E-A471-91EC8D4F6750} = {EEF031CB-FED8-451E-A471-91EC8D4F6750} {6EDFEFD5-3596-4FA9-8EBA-B331547B35A3} = {6EDFEFD5-3596-4FA9-8EBA-B331547B35A3} EndProjectSection diff --git a/src/include/switch.h b/src/include/switch.h index 268243e989..2f5cf72f30 100644 --- a/src/include/switch.h +++ b/src/include/switch.h @@ -137,9 +137,7 @@ #include "switch_odbc.h" #include "switch_json.h" #include "switch_limit.h" -#ifndef WIN32 #include "switch_curl.h" -#endif #include diff --git a/src/include/switch_curl.h b/src/include/switch_curl.h index f664b0bc95..d3661226e0 100644 --- a/src/include/switch_curl.h +++ b/src/include/switch_curl.h @@ -40,8 +40,8 @@ SWITCH_BEGIN_EXTERN_C -void switch_curl_init(switch_memory_pool_t *pool); -void switch_curl_destroy(void); +SWITCH_DECLARE(void) switch_curl_init(switch_memory_pool_t *pool); +SWITCH_DECLARE(void) switch_curl_destroy(void); SWITCH_END_EXTERN_C diff --git a/src/switch_core.c b/src/switch_core.c index 538dffdb74..3ea92a5113 100644 --- a/src/switch_core.c +++ b/src/switch_core.c @@ -1446,9 +1446,7 @@ SWITCH_DECLARE(switch_status_t) switch_core_init(switch_core_flag_t flags, switc switch_uuid_get(&uuid); switch_uuid_format(runtime.uuid_str, &uuid); -#ifndef WIN32 switch_curl_init(runtime.memory_pool); -#endif return SWITCH_STATUS_SUCCESS; } @@ -2120,9 +2118,7 @@ SWITCH_DECLARE(switch_status_t) switch_core_destroy(void) switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CONSOLE, "Clean up modules.\n"); switch_loadable_module_shutdown(); -#ifndef WIN32 switch_curl_destroy(); -#endif if (switch_test_flag((&runtime), SCF_USE_SQL)) { switch_core_sqldb_stop(); diff --git a/src/switch_curl.c b/src/switch_curl.c index d31332ec79..94af5bdca9 100644 --- a/src/switch_curl.c +++ b/src/switch_curl.c @@ -64,7 +64,7 @@ static void switch_curl_init_ssl_locks(switch_memory_pool_t *pool) } CRYPTO_set_id_callback(switch_curl_ssl_thread_id); - CRYPTO_set_locking_callback((void (*)())switch_curl_ssl_lock_callback); + CRYPTO_set_locking_callback((void (*)(int, int, const char*, int))switch_curl_ssl_lock_callback); } static void switch_curl_destroy_ssl_locks() diff --git a/w32/Library/FreeSwitchCore.2008.vcproj b/w32/Library/FreeSwitchCore.2008.vcproj index 6ba5b95959..557be16f1e 100644 --- a/w32/Library/FreeSwitchCore.2008.vcproj +++ b/w32/Library/FreeSwitchCore.2008.vcproj @@ -47,8 +47,8 @@ + + @@ -1444,6 +1448,10 @@ RelativePath="..\..\src\include\switch_cpp.h" > + +