clean up core curl patch
This commit is contained in:
parent
d98d51ed39
commit
29bf9157ef
|
@ -104,6 +104,10 @@ CORE_CFLAGS += -I$(switch_srcdir)/libs/srtp/include
|
||||||
CORE_CFLAGS += -I$(switch_srcdir)/libs/srtp/crypto/include -Ilibs/srtp/crypto/include
|
CORE_CFLAGS += -I$(switch_srcdir)/libs/srtp/crypto/include -Ilibs/srtp/crypto/include
|
||||||
CORE_CFLAGS += -I$(switch_srcdir)/libs/spandsp/src -I$(switch_srcdir)/libs/tiff-3.8.2/libtiff
|
CORE_CFLAGS += -I$(switch_srcdir)/libs/spandsp/src -I$(switch_srcdir)/libs/tiff-3.8.2/libtiff
|
||||||
|
|
||||||
|
if ENABLE_CORE_CURL
|
||||||
|
CORE_CFLAGS += -DCORE_USE_CURL
|
||||||
|
endif
|
||||||
|
|
||||||
CORE_LIBS = libs/apr-util/libaprutil-1.la libs/apr/libapr-1.la
|
CORE_LIBS = libs/apr-util/libaprutil-1.la libs/apr/libapr-1.la
|
||||||
CORE_LIBS += libs/sqlite/libsqlite3.la libs/pcre/libpcre.la libs/speex/libspeex/libspeexdsp.la
|
CORE_LIBS += libs/sqlite/libsqlite3.la libs/pcre/libpcre.la libs/speex/libspeex/libspeexdsp.la
|
||||||
if ENABLE_SRTP
|
if ENABLE_SRTP
|
||||||
|
|
|
@ -352,6 +352,11 @@ AC_ARG_ENABLE(srtp,
|
||||||
|
|
||||||
AM_CONDITIONAL([ENABLE_SRTP],[test "${enable_srtp}" = "yes"])
|
AM_CONDITIONAL([ENABLE_SRTP],[test "${enable_srtp}" = "yes"])
|
||||||
|
|
||||||
|
AC_ARG_ENABLE(core-curl,
|
||||||
|
[AC_HELP_STRING([--disable-core-curl],[build without core-curl support])],[enable_core_curl="$enableval"],[enable_core_curl="yes"])
|
||||||
|
|
||||||
|
AM_CONDITIONAL([ENABLE_CORE_CURL],[test "${enable_core_curl}" = "yes"])
|
||||||
|
|
||||||
AC_ARG_ENABLE(zrtp,
|
AC_ARG_ENABLE(zrtp,
|
||||||
[AS_HELP_STRING([--enable-zrtp], [Compile with zrtp Support])],,[enable_zrtp="no"])
|
[AS_HELP_STRING([--enable-zrtp], [Compile with zrtp Support])],,[enable_zrtp="no"])
|
||||||
if test "x$enable_zrtp" = "xyes" ; then
|
if test "x$enable_zrtp" = "xyes" ; then
|
||||||
|
|
|
@ -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_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:
|
||||||
|
*/
|
||||||
|
|
|
@ -28,8 +28,9 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#include <switch.h>
|
#include <switch.h>
|
||||||
|
|
||||||
|
#ifdef CORE_USE_CURL
|
||||||
#include <openssl/crypto.h>
|
#include <openssl/crypto.h>
|
||||||
#include <curl/curl.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);
|
curl_global_init(CURL_GLOBAL_ALL);
|
||||||
switch_curl_init_ssl_locks(pool);
|
switch_curl_init_ssl_locks(pool);
|
||||||
}
|
}
|
||||||
void switch_curl_destroy()
|
|
||||||
|
SWITCH_DECLARE(void) switch_curl_destroy()
|
||||||
{
|
{
|
||||||
switch_curl_destroy_ssl_locks();
|
switch_curl_destroy_ssl_locks();
|
||||||
curl_global_cleanup();
|
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:
|
/* For Emacs:
|
||||||
* Local Variables:
|
* Local Variables:
|
||||||
* mode:c
|
* mode:c
|
||||||
|
|
Loading…
Reference in New Issue