aboutsummaryrefslogtreecommitdiffstats
path: root/res/res_agi.c
diff options
context:
space:
mode:
authorkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2009-06-15 16:07:23 +0000
committerkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2009-06-15 16:07:23 +0000
commit12ab0bbe1523fa2716e9e7954e27aab441ab8a34 (patch)
tree890da581f24a2e3e5d3947988627e6a294bed01d /res/res_agi.c
parent80c50f0c393f737601a6186ec84f6e963fc35b72 (diff)
Redesigned 'optional API' support.
This patch provides a new implementation of the optional API support defined in asterisk/optional_api.h; this new version provides solves compatibility issues with the use of linker version scripts for suppressing global symbols. In addition, there is now a functional (and tested!) implementation for Mac OS/X, so module writers no longer need to use special tests before calling optional API functions. All future implementations must provide these same semantics, so that module writers can rely on them. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@200519 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'res/res_agi.c')
-rw-r--r--res/res_agi.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/res/res_agi.c b/res/res_agi.c
index 6c6e88290..dff477e09 100644
--- a/res/res_agi.c
+++ b/res/res_agi.c
@@ -927,7 +927,7 @@ static agi_command *find_command(const char * const cmds[], int exact);
AST_THREADSTORAGE(agi_buf);
#define AGI_BUF_INITSIZE 256
-int ast_agi_send(int fd, struct ast_channel *chan, char *fmt, ...)
+int AST_OPTIONAL_API_NAME(ast_agi_send)(int fd, struct ast_channel *chan, char *fmt, ...)
{
int res = 0;
va_list ap;
@@ -2925,7 +2925,7 @@ static char *help_workhorse(int fd, const char * const match[])
return CLI_SUCCESS;
}
-int ast_agi_register(struct ast_module *mod, agi_command *cmd)
+int AST_OPTIONAL_API_NAME(ast_agi_register)(struct ast_module *mod, agi_command *cmd)
{
char fullcmd[MAX_CMD_LEN];
@@ -2956,7 +2956,7 @@ int ast_agi_register(struct ast_module *mod, agi_command *cmd)
}
}
-int ast_agi_unregister(struct ast_module *mod, agi_command *cmd)
+int AST_OPTIONAL_API_NAME(ast_agi_unregister)(struct ast_module *mod, agi_command *cmd)
{
struct agi_command *e;
int unregistered = 0;
@@ -2995,7 +2995,7 @@ int ast_agi_unregister(struct ast_module *mod, agi_command *cmd)
return unregistered;
}
-int ast_agi_register_multiple(struct ast_module *mod, struct agi_command *cmd, unsigned int len)
+int AST_OPTIONAL_API_NAME(ast_agi_register_multiple)(struct ast_module *mod, struct agi_command *cmd, unsigned int len)
{
unsigned int i, x = 0;
@@ -3025,7 +3025,7 @@ int ast_agi_register_multiple(struct ast_module *mod, struct agi_command *cmd, u
return 0;
}
-int ast_agi_unregister_multiple(struct ast_module *mod, struct agi_command *cmd, unsigned int len)
+int AST_OPTIONAL_API_NAME(ast_agi_unregister_multiple)(struct ast_module *mod, struct agi_command *cmd, unsigned int len)
{
unsigned int i;
int res = 0;