#include <asterisk.h>#include <stdio.h>#include <stdlib.h>#include <unistd.h>#include <string.h>#include <asterisk/lock.h>#include <asterisk/file.h>#include <asterisk/logger.h>#include <asterisk/channel.h>#include <asterisk/pbx.h>#include <asterisk/module.h>Include dependency graph for app_segfault.c:

Go to the source code of this file.
Functions | |
| AST_MODULE_INFO_STANDARD (ASTERISK_GPL_KEY,"Application for crashing Asterisk with a segmentation fault") | |
| int | load_module (void) |
| static int | segfault_exec (struct ast_channel *chan, void *data) |
| int | unload_module (void) |
Variables | |
| static char * | app = "Segfault" |
| static char * | descrip = " Segfault(): Crash with a segfault. Never returns nufin.\n" |
| static char * | synopsis = "This application will crash Asterisk with a segmentation fault." |
| AST_MODULE_INFO_STANDARD | ( | ASTERISK_GPL_KEY | , | |
| "Application for crashing Asterisk with a segmentation fault" | ||||
| ) |
| int load_module | ( | void | ) |
Definition at line 52 of file app_segfault.c.
References app, ast_register_application(), descrip, segfault_exec(), and synopsis.
00053 { 00054 return ast_register_application(app, segfault_exec, synopsis, descrip); 00055 }
| static int segfault_exec | ( | struct ast_channel * | chan, | |
| void * | data | |||
| ) | [static] |
Definition at line 37 of file app_segfault.c.
References ast_module_user_add, ast_module_user_remove, and ast_module_user::chan.
Referenced by load_module().
00038 { 00039 struct ast_module_user *u; 00040 u = ast_module_user_add(chan); 00041 ((char *) 0)[0] = 0; 00042 ast_module_user_remove(u); 00043 return 0; 00044 }
| int unload_module | ( | void | ) |
Definition at line 46 of file app_segfault.c.
References app, ast_module_user_hangup_all, and ast_unregister_application().
00047 { 00048 ast_module_user_hangup_all(); 00049 return ast_unregister_application(app); 00050 }
char* app = "Segfault" [static] |
Definition at line 31 of file app_segfault.c.
char* descrip = " Segfault(): Crash with a segfault. Never returns nufin.\n" [static] |
Definition at line 35 of file app_segfault.c.
char* synopsis = "This application will crash Asterisk with a segmentation fault." [static] |
Definition at line 33 of file app_segfault.c.
1.5.1