aboutsummaryrefslogtreecommitdiffstats
path: root/main
diff options
context:
space:
mode:
authortilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2010-07-14 20:48:59 +0000
committertilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2010-07-14 20:48:59 +0000
commit943f6b879d4c525c0b87c62d7cd3caa2916896a9 (patch)
tree2b34378f0a47d89598b41b610afdfbe6643fad16 /main
parentbc8a8e4c642f07e8c5bf6adcf5a47d3073ff50b6 (diff)
Remove the old stub files, preferring the optional_api method.
(closes issue #17475) Reported by: tilghman Review: https://reviewboard.asterisk.org/r/695/ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@276490 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main')
-rw-r--r--main/Makefile2
-rw-r--r--main/adsistub.c77
-rw-r--r--main/asterisk.dynamics16
-rw-r--r--main/cryptostub.c68
-rw-r--r--main/loader.c2
5 files changed, 14 insertions, 151 deletions
diff --git a/main/Makefile b/main/Makefile
index 809aae747..361b0dc40 100644
--- a/main/Makefile
+++ b/main/Makefile
@@ -92,7 +92,7 @@ ifneq ($(findstring USE_HOARD_ALLOCATOR,$(MENUSELECT_CFLAGS)),)
endif
ifeq ($(GNU_LD),1)
-ASTLINK+=-Wl,--version-script,asterisk.exports
+ASTLINK+=-Wl,--version-script,asterisk.exports,--dynamic-list,asterisk.dynamics
endif
CHECK_SUBDIR: # do nothing, just make sure that we recurse in the subdir/
diff --git a/main/adsistub.c b/main/adsistub.c
deleted file mode 100644
index 8f2908225..000000000
--- a/main/adsistub.c
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
- * Asterisk -- An open source telephony toolkit.
- *
- * Copyright (C) 1999 - 2005, Digium, Inc.
- *
- * Christopher L. Wade <wade.christopher@gmail.com>
- *
- * See http://www.asterisk.org for more information about
- * the Asterisk project. Please do not directly contact
- * any of the maintainers of this project for assistance;
- * the project provides a web site, mailing lists and IRC
- * channels for your use.
- *
- * This program is free software, distributed under the terms of
- * the GNU General Public License Version 2. See the LICENSE file
- * at the top of the source tree.
- */
-
-#include "asterisk.h"
-
-ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
-
-#include "asterisk/channel.h"
-#include "asterisk/adsi.h"
-
-#ifdef SKREP
-#define build_stub(func_name,...) \
-static int stub_ ## func_name(__VA_ARGS__) \
-{ \
- if (option_debug > 4) \
- ast_log(LOG_NOTICE, "ADSI support not loaded!\n"); \
- return -1; \
-} \
-\
-int (*func_name)(__VA_ARGS__) = \
- stub_ ## func_name;
-#endif
-#define build_stub(func_name,...) \
-static int stub_##func_name(__VA_ARGS__) \
-{ \
- ast_debug(5, "ADSI support not loaded!\n"); \
- return -1; \
-} \
-\
-int (*func_name)(__VA_ARGS__) = \
- stub_##func_name;
-
-build_stub(ast_adsi_channel_init, struct ast_channel *chan)
-build_stub(ast_adsi_begin_download, struct ast_channel *chan, char *service, unsigned char *fdn, unsigned char *sec, int version)
-build_stub(ast_adsi_end_download, struct ast_channel *chan)
-build_stub(ast_adsi_channel_restore, struct ast_channel *chan)
-build_stub(ast_adsi_print, struct ast_channel *chan, char **lines, int *align, int voice)
-build_stub(ast_adsi_load_session, struct ast_channel *chan, unsigned char *app, int ver, int data)
-build_stub(ast_adsi_unload_session, struct ast_channel *chan)
-build_stub(ast_adsi_transmit_messages, struct ast_channel *chan, unsigned char **msg, int *msglen, int *msgtype)
-build_stub(ast_adsi_transmit_message, struct ast_channel *chan, unsigned char *msg, int msglen, int msgtype)
-build_stub(ast_adsi_transmit_message_full, struct ast_channel *chan, unsigned char *msg, int msglen, int msgtype, int dowait)
-build_stub(ast_adsi_read_encoded_dtmf, struct ast_channel *chan, unsigned char *buf, int maxlen)
-build_stub(ast_adsi_connect_session, unsigned char *buf, unsigned char *fdn, int ver)
-build_stub(ast_adsi_query_cpeid, unsigned char *buf)
-build_stub(ast_adsi_query_cpeinfo, unsigned char *buf)
-build_stub(ast_adsi_get_cpeid, struct ast_channel *chan, unsigned char *cpeid, int voice)
-build_stub(ast_adsi_get_cpeinfo, struct ast_channel *chan, int *width, int *height, int *buttons, int voice)
-build_stub(ast_adsi_download_connect, unsigned char *buf, char *service, unsigned char *fdn, unsigned char *sec, int ver)
-build_stub(ast_adsi_disconnect_session, unsigned char *buf)
-build_stub(ast_adsi_download_disconnect, unsigned char *buf)
-build_stub(ast_adsi_data_mode, unsigned char *buf)
-build_stub(ast_adsi_clear_soft_keys, unsigned char *buf)
-build_stub(ast_adsi_clear_screen, unsigned char *buf)
-build_stub(ast_adsi_voice_mode, unsigned char *buf, int when)
-build_stub(ast_adsi_available, struct ast_channel *chan)
-build_stub(ast_adsi_display, unsigned char *buf, int page, int line, int just, int wrap, char *col1, char *col2)
-build_stub(ast_adsi_set_line, unsigned char *buf, int page, int line)
-build_stub(ast_adsi_load_soft_key, unsigned char *buf, int key, const char *llabel, const char *slabel, char *ret, int data)
-build_stub(ast_adsi_set_keys, unsigned char *buf, unsigned char *keys)
-build_stub(ast_adsi_input_control, unsigned char *buf, int page, int line, int display, int format, int just)
-build_stub(ast_adsi_input_format, unsigned char *buf, int num, int dir, int wrap, char *format1, char *format2)
diff --git a/main/asterisk.dynamics b/main/asterisk.dynamics
index 946007dac..28f801b1e 100644
--- a/main/asterisk.dynamics
+++ b/main/asterisk.dynamics
@@ -1,6 +1,14 @@
{
- ast_agi_*;
- ast_pktccops_*;
- ast_smdi_*;
- ast_monitor_*;
+ *ast_adsi_*;
+ *ast_agi_*;
+ *ast_pktccops_*;
+ *ast_smdi_*;
+ *ast_monitor_*;
+ *ast_key_get;
+ *ast_check_signature;
+ *ast_check_signature_bin;
+ *ast_sign;
+ *ast_sign_bin;
+ *ast_encrypt_bin;
+ *ast_decrypt_bin;
};
diff --git a/main/cryptostub.c b/main/cryptostub.c
deleted file mode 100644
index 1a0ffa4e8..000000000
--- a/main/cryptostub.c
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * Asterisk -- An open source telephony toolkit.
- *
- * Copyright (C) 1999 - 2005, Digium, Inc.
- *
- * Mark Spencer <markster@digium.com>
- *
- * See http://www.asterisk.org for more information about
- * the Asterisk project. Please do not directly contact
- * any of the maintainers of this project for assistance;
- * the project provides a web site, mailing lists and IRC
- * channels for your use.
- *
- * This program is free software, distributed under the terms of
- * the GNU General Public License Version 2. See the LICENSE file
- * at the top of the source tree.
- */
-
-/*! \file
- *
- * \brief Stubs for res_crypto routines
- *
- * \author Mark Spencer <markster@digium.com>
- */
-
-#include "asterisk.h"
-
-ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
-
-#include "asterisk/crypto.h"
-#include "asterisk/logger.h"
-
-static struct ast_key *stub_ast_key_get(const char *kname, int ktype)
-{
- ast_log(LOG_NOTICE, "Crypto support not loaded!\n");
- return NULL;
-}
-
-#ifdef SKREP
-#define build_stub(func_name,...) \
-static int stub_ ## func_name(__VA_ARGS__) \
-{ \
- ast_log(LOG_NOTICE, "Crypto support not loaded!\n"); \
- return -1; \
-} \
-\
-int (*func_name)(__VA_ARGS__) = \
- stub_ ## func_name;
-#endif
-#define build_stub(func_name,...) \
-static int stub_##func_name(__VA_ARGS__) \
-{ \
- ast_log(LOG_NOTICE, "Crypto support not loaded!\n"); \
- return -1; \
-} \
-\
-int (*func_name)(__VA_ARGS__) = \
- stub_##func_name;
-
-struct ast_key *(*ast_key_get)(const char *key, int type) =
-stub_ast_key_get;
-
-build_stub(ast_check_signature, struct ast_key *key, const char *msg, const char *sig);
-build_stub(ast_check_signature_bin, struct ast_key *key, const char *msg, int msglen, const unsigned char *sig);
-build_stub(ast_sign, struct ast_key *key, char *msg, char *sig);
-build_stub(ast_sign_bin, struct ast_key *key, const char *msg, int msglen, unsigned char *sig);
-build_stub(ast_encrypt_bin, unsigned char *dst, const unsigned char *src, int srclen, struct ast_key *key);
-build_stub(ast_decrypt_bin, unsigned char *dst, const unsigned char *src, int srclen, struct ast_key *key);
diff --git a/main/loader.c b/main/loader.c
index 0249af9d8..8a3d18bdb 100644
--- a/main/loader.c
+++ b/main/loader.c
@@ -836,7 +836,7 @@ static enum ast_module_load_result load_resource(const char *resource_name, unsi
return required ? AST_MODULE_LOAD_FAILURE : AST_MODULE_LOAD_DECLINE;
}
- if (!mod->lib && mod->info->backup_globals && mod->info->backup_globals()) {
+ if (!mod->lib && mod->info->backup_globals()) {
ast_log(LOG_WARNING, "Module '%s' was unable to backup its global data.\n", resource_name);
return required ? AST_MODULE_LOAD_FAILURE : AST_MODULE_LOAD_DECLINE;
}