Cleanup of res_agi, ensuring thread safety (closes issue #10288)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77787 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Tilghman Lesher
2007-07-30 19:11:28 +00:00
parent ad094d5109
commit 059a7aa862
2 changed files with 142 additions and 114 deletions

View File

@@ -30,7 +30,7 @@ extern "C" {
typedef struct agi_state {
int fd; /* FD for general output */
int audio; /* FD for audio output */
int ctrl; /* FD for input control */
int ctrl; /* FD for input control */
} AGI;
typedef struct agi_command {
@@ -45,12 +45,17 @@ typedef struct agi_command {
char *usage;
/* Does this application run dead */
int dead;
/* Pointer to module that registered the agi command */
struct ast_module *mod;
/* Linked list pointer */
AST_LIST_ENTRY(agi_command) list;
} agi_command;
int ast_agi_register(agi_command *cmd);
int ast_agi_unregister(agi_command *cmd);
void ast_agi_fdprintf(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(__cplusplus) || defined(c_plusplus)
}