This graph shows which files directly or indirectly include this file:
Go to the source code of this file.
Data Structures | |
struct | agi_command |
struct | agi_state |
Typedefs | |
typedef agi_state | AGI |
Functions | |
int | ast_agi_register (agi_command *cmd) |
void | ast_agi_unregister (agi_command *cmd) |
Definition in file agi.h.
int ast_agi_register | ( | agi_command * | cmd | ) |
Definition at line 1719 of file res_agi.c.
References ast_log(), agi_command::cmda, commands, LOG_WARNING, and MAX_COMMANDS.
01720 { 01721 int x; 01722 for (x=0; x<MAX_COMMANDS - 1; x++) { 01723 if (commands[x].cmda[0] == agi->cmda[0]) { 01724 ast_log(LOG_WARNING, "Command already registered!\n"); 01725 return -1; 01726 } 01727 } 01728 for (x=0; x<MAX_COMMANDS - 1; x++) { 01729 if (!commands[x].cmda[0]) { 01730 commands[x] = *agi; 01731 return 0; 01732 } 01733 } 01734 ast_log(LOG_WARNING, "No more room for new commands!\n"); 01735 return -1; 01736 }
void ast_agi_unregister | ( | agi_command * | cmd | ) |
Definition at line 1738 of file res_agi.c.
References agi_command::cmda, and commands.
01739 { 01740 int x; 01741 for (x=0; x<MAX_COMMANDS - 1; x++) { 01742 if (commands[x].cmda[0] == agi->cmda[0]) { 01743 memset(&commands[x], 0, sizeof(agi_command)); 01744 } 01745 } 01746 }