mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-10-29 22:54:18 +00:00
clean up core curl patch
This commit is contained in:
1 parent
d98d51ed39
commit
29bf9157ef
4 files changed
+81
-4
No files matched your search
@@ -1,4 +1,58 @@
|
||||
/*
|
||||
* FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
|
||||
* Copyright (C) 2005-2011, Anthony Minessale II <anthm@freeswitch.org>
|
||||
*
|
||||
* Version: MPL 1.1
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License Version
|
||||
* 1.1 (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Anthony Minessale II <anthm@freeswitch.org>
|
||||
* Portions created by the Initial Developer are Copyright (C)
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*
|
||||
* Anthony Minessale II <anthm@freeswitch.org>
|
||||
*
|
||||
*
|
||||
* switch_curl.h -- Core cURL
|
||||
*
|
||||
*/
|
||||
/*! \file switch_core.h
|
||||
\brief Core Library
|
||||
|
||||
This module is the main core library and is the intended location of all fundamental operations.
|
||||
*/
|
||||
|
||||
#ifndef SWITCH_CURL_H
|
||||
#define SWITCH_CURL_H
|
||||
|
||||
SWITCH_BEGIN_EXTERN_C
|
||||
|
||||
void switch_curl_init(switch_memory_pool_t *pool);
|
||||
void switch_curl_destroy();
|
||||
void switch_curl_destroy(void);
|
||||
|
||||
SWITCH_END_EXTERN_C
|
||||
|
||||
#endif
|
||||
/* For Emacs:
|
||||
* Local Variables:
|
||||
* mode:c
|
||||
* indent-tabs-mode:t
|
||||
* tab-width:4
|
||||
* c-basic-offset:4
|
||||
* End:
|
||||
* For VIM:
|
||||
* vim:set softtabstop=4 shiftwidth=4 tabstop=4:
|
||||
*/
|
||||
+17
-3
@@ -28,8 +28,9 @@
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
#include <switch.h>
|
||||
|
||||
#ifdef CORE_USE_CURL
|
||||
#include <openssl/crypto.h>
|
||||
#include <curl/curl.h>
|
||||
|
||||
@@ -79,17 +80,30 @@ static void switch_curl_destroy_ssl_locks()
|
||||
}
|
||||
|
||||
|
||||
void switch_curl_init(switch_memory_pool_t *pool)
|
||||
SWITCH_DECLARE(void) switch_curl_init(switch_memory_pool_t *pool)
|
||||
{
|
||||
curl_global_init(CURL_GLOBAL_ALL);
|
||||
switch_curl_init_ssl_locks(pool);
|
||||
}
|
||||
void switch_curl_destroy()
|
||||
|
||||
SWITCH_DECLARE(void) switch_curl_destroy()
|
||||
{
|
||||
switch_curl_destroy_ssl_locks();
|
||||
curl_global_cleanup();
|
||||
}
|
||||
|
||||
#else
|
||||
SWITCH_DECLARE(void) switch_curl_init(switch_memory_pool_t *pool)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
SWITCH_DECLARE(void) switch_curl_destroy()
|
||||
{
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* For Emacs:
|
||||
* Local Variables:
|
||||
* mode:c
|
||||
|
||||
Reference in new issue
Block a user