Simple module check function. More...
#include "asterisk.h"#include "asterisk/module.h"#include "asterisk/pbx.h"
Go to the source code of this file.
Functions | |
| AST_MODULE_INFO_STANDARD (ASTERISK_GPL_KEY,"Checks if Asterisk module is loaded in memory") | |
| static int | ifmodule_read (struct ast_channel *chan, const char *cmd, char *data, char *buf, size_t len) |
| static int | load_module (void) |
| static int | unload_module (void) |
Variables | |
| static struct ast_custom_function | ifmodule_function |
Simple module check function.
Definition in file func_module.c.
| AST_MODULE_INFO_STANDARD | ( | ASTERISK_GPL_KEY | , | |
| "Checks if Asterisk module is loaded in memory" | ||||
| ) |
| static int ifmodule_read | ( | struct ast_channel * | chan, | |
| const char * | cmd, | |||
| char * | data, | |||
| char * | buf, | |||
| size_t | len | |||
| ) | [static] |
Definition at line 49 of file func_module.c.
References ast_copy_string(), and ast_module_check().
00051 { 00052 char *ret = "0"; 00053 00054 *buf = '\0'; 00055 00056 if (data) 00057 if (ast_module_check(data)) 00058 ret = "1"; 00059 00060 ast_copy_string(buf, ret, len); 00061 00062 return 0; 00063 }
| static int load_module | ( | void | ) | [static] |
Definition at line 76 of file func_module.c.
References ast_custom_function_register.
00077 { 00078 return ast_custom_function_register(&ifmodule_function); 00079 }
| static int unload_module | ( | void | ) | [static] |
Definition at line 71 of file func_module.c.
References ast_custom_function_unregister().
00072 { 00073 return ast_custom_function_unregister(&ifmodule_function); 00074 }
struct ast_custom_function ifmodule_function [static] |
{
.name = "IFMODULE",
.read = ifmodule_read,
}
Definition at line 65 of file func_module.c.
1.6.1