summaryrefslogtreecommitdiff
path: root/include/asterisk/agi.h
diff options
context:
space:
mode:
authorKevin P. Fleming <kpfleming@digium.com>2008-11-02 23:34:39 +0000
committerKevin P. Fleming <kpfleming@digium.com>2008-11-02 23:34:39 +0000
commita67790c6f53e4b002556eca8438dbd56994ea056 (patch)
treec51cd50dd6e0906faa8d5bd7a24965e5db876fba /include/asterisk/agi.h
parent585899dbc088d30647b482183b7821f6a14aa5aa (diff)
instead of trying to forcibly load res_agi when app_stack is loaded (even if the administrator didn't want it loaded), use GCC weak symbols to determine whether it was loaded already or not; if it was loaded, then use it.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@153709 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'include/asterisk/agi.h')
-rw-r--r--include/asterisk/agi.h16
1 files changed, 11 insertions, 5 deletions
diff --git a/include/asterisk/agi.h b/include/asterisk/agi.h
index 7c1a0aa68..609e98815 100644
--- a/include/asterisk/agi.h
+++ b/include/asterisk/agi.h
@@ -55,11 +55,17 @@ typedef struct agi_command {
AST_LIST_ENTRY(agi_command) list;
} agi_command;
-int ast_agi_fdprintf(struct ast_channel *chan, int fd, char *fmt, ...);
-int ast_agi_register(struct ast_module *mod, agi_command *cmd);
-int ast_agi_unregister(struct ast_module *mod, agi_command *cmd);
-void ast_agi_register_multiple(struct ast_module *mod, agi_command *cmd, int len);
-void ast_agi_unregister_multiple(struct ast_module *mod, agi_command *cmd, int len);
+#if defined(ASTERISK_AGI_OPTIONAL)
+#define AGI_WEAK attribute_weak
+#else
+#define AGI_WEAK
+#endif
+
+int AGI_WEAK ast_agi_fdprintf(struct ast_channel *chan, int fd, char *fmt, ...);
+int AGI_WEAK ast_agi_register(struct ast_module *mod, agi_command *cmd);
+int AGI_WEAK ast_agi_unregister(struct ast_module *mod, agi_command *cmd);
+void AGI_WEAK ast_agi_register_multiple(struct ast_module *mod, agi_command *cmd, int len);
+void AGI_WEAK ast_agi_unregister_multiple(struct ast_module *mod, agi_command *cmd, int len);
#if defined(__cplusplus) || defined(c_plusplus)
}