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 | agi_register (agi_command *cmd) |
| void | agi_unregister (agi_command *cmd) |
Definition in file agi.h.
| int agi_register | ( | agi_command * | cmd | ) |
Definition at line 1689 of file res_agi.c.
References ast_log(), agi_command::cmda, commands, LOG_WARNING, and MAX_COMMANDS.
01690 { 01691 int x; 01692 for (x=0; x<MAX_COMMANDS - 1; x++) { 01693 if (commands[x].cmda[0] == agi->cmda[0]) { 01694 ast_log(LOG_WARNING, "Command already registered!\n"); 01695 return -1; 01696 } 01697 } 01698 for (x=0; x<MAX_COMMANDS - 1; x++) { 01699 if (!commands[x].cmda[0]) { 01700 commands[x] = *agi; 01701 return 0; 01702 } 01703 } 01704 ast_log(LOG_WARNING, "No more room for new commands!\n"); 01705 return -1; 01706 }
| void agi_unregister | ( | agi_command * | cmd | ) |
Definition at line 1708 of file res_agi.c.
References agi_command::cmda, and commands.
01709 { 01710 int x; 01711 for (x=0; x<MAX_COMMANDS - 1; x++) { 01712 if (commands[x].cmda[0] == agi->cmda[0]) { 01713 memset(&commands[x], 0, sizeof(agi_command)); 01714 } 01715 } 01716 }
1.5.1