Go to the source code of this file.
Data Structures | |
| struct | agi_command |
| struct | agi_state |
Typedefs | |
| typedef agi_state | AGI |
| typedef agi_command | agi_command |
Functions | |
| int | agi_register (agi_command *cmd) |
| void | agi_unregister (agi_command *cmd) |
Definition in file agi.h.
|
|
|
|
|
|
Definition at line 1686 of file res_agi.c. References ast_log(), agi_command::cmda, commands, LOG_WARNING, and MAX_COMMANDS. 01687 {
01688 int x;
01689 for (x=0; x<MAX_COMMANDS - 1; x++) {
01690 if (commands[x].cmda[0] == agi->cmda[0]) {
01691 ast_log(LOG_WARNING, "Command already registered!\n");
01692 return -1;
01693 }
01694 }
01695 for (x=0; x<MAX_COMMANDS - 1; x++) {
01696 if (!commands[x].cmda[0]) {
01697 commands[x] = *agi;
01698 return 0;
01699 }
01700 }
01701 ast_log(LOG_WARNING, "No more room for new commands!\n");
01702 return -1;
01703 }
|
|
|
Definition at line 1705 of file res_agi.c. References agi_command::cmda, commands, and MAX_COMMANDS. 01706 {
01707 int x;
01708 for (x=0; x<MAX_COMMANDS - 1; x++) {
01709 if (commands[x].cmda[0] == agi->cmda[0]) {
01710 memset(&commands[x], 0, sizeof(agi_command));
01711 }
01712 }
01713 }
|
1.3.9.1