Go to the source code of this file.
Defines | |
| #define | AST_CONFIG_MAX_PATH 255 |
| #define | ASTERISK_FILE_VERSION(file, version) |
| Register/unregister a source code file with the core. | |
| #define | DEFAULT_LANGUAGE "en" |
Functions | |
| void | ast_channels_init (void) |
| void | ast_register_file_version (const char *file, const char *version) |
| Register the version of a source code file with the core. | |
| int | ast_set_priority (int) |
| void | ast_unregister_file_version (const char *file) |
| Unregister a source code file from the core. | |
| int | astdb_init (void) |
| void | close_logger (void) |
| int | dnsmgr_init (void) |
| void | dnsmgr_reload (void) |
| void | dnsmgr_start_refresh (void) |
| int | init_framer (void) |
| int | init_logger (void) |
| int | load_modules (const int preload_only) |
| int | load_pbx (void) |
| int | reload_logger (int) |
| int | term_init (void) |
Variables | |
| char | ast_config_AST_AGI_DIR [AST_CONFIG_MAX_PATH] |
| char | ast_config_AST_CONFIG_DIR [AST_CONFIG_MAX_PATH] |
| char | ast_config_AST_CONFIG_FILE [AST_CONFIG_MAX_PATH] |
| char | ast_config_AST_CTL [AST_CONFIG_MAX_PATH] |
| char | ast_config_AST_CTL_GROUP [AST_CONFIG_MAX_PATH] |
| char | ast_config_AST_CTL_OWNER [AST_CONFIG_MAX_PATH] |
| char | ast_config_AST_CTL_PERMISSIONS [AST_CONFIG_MAX_PATH] |
| char | ast_config_AST_DB [AST_CONFIG_MAX_PATH] |
| char | ast_config_AST_KEY_DIR [AST_CONFIG_MAX_PATH] |
| char | ast_config_AST_LOG_DIR [AST_CONFIG_MAX_PATH] |
| char | ast_config_AST_MODULE_DIR [AST_CONFIG_MAX_PATH] |
| char | ast_config_AST_MONITOR_DIR [AST_CONFIG_MAX_PATH] |
| char | ast_config_AST_PID [AST_CONFIG_MAX_PATH] |
| char | ast_config_AST_RUN_DIR [AST_CONFIG_MAX_PATH] |
| char | ast_config_AST_SOCKET [AST_CONFIG_MAX_PATH] |
| char | ast_config_AST_SPOOL_DIR [AST_CONFIG_MAX_PATH] |
| char | ast_config_AST_VAR_DIR [AST_CONFIG_MAX_PATH] |
Definition in file asterisk.h.
|
|
Definition at line 23 of file asterisk.h. |
|
|
Register/unregister a source code file with the core.
Example:
ASTERISK_FILE_VERSION(__FILE__, "\$Revision\$")
Definition at line 112 of file asterisk.h. |
|
|
Definition at line 21 of file asterisk.h. |
|
|
Definition at line 3792 of file channel.c. References ast_cli_register(), and cli_show_channeltypes. Referenced by main(). 03793 {
03794 ast_cli_register(&cli_show_channeltypes);
03795 }
|
|
||||||||||||
|
Register the version of a source code file with the core.
Definition at line 246 of file asterisk.c. References AST_LIST_INSERT_HEAD, AST_LIST_LOCK, AST_LIST_UNLOCK, ast_strdupa, ast_strip_quoted(), and calloc. 00247 {
00248 struct file_version *new;
00249 char *work;
00250 size_t version_length;
00251
00252 work = ast_strdupa(version);
00253 work = ast_strip(ast_strip_quoted(work, "$", "$"));
00254 version_length = strlen(work) + 1;
00255
00256 new = calloc(1, sizeof(*new) + version_length);
00257 if (!new)
00258 return;
00259
00260 new->file = file;
00261 new->version = (char *) new + sizeof(*new);
00262 memcpy(new->version, work, version_length);
00263 AST_LIST_LOCK(&file_versions);
00264 AST_LIST_INSERT_HEAD(&file_versions, new, list);
00265 AST_LIST_UNLOCK(&file_versions);
00266 }
|
|
|
We set ourselves to a high priority, that we might pre-empt everything else. If your PBX has heavy activity on it, this is a good thing. Definition at line 786 of file asterisk.c. References ast_log(), ast_verbose(), and LOG_WARNING. Referenced by launch_script(), and main(). 00787 {
00788 struct sched_param sched;
00789 memset(&sched, 0, sizeof(sched));
00790 #ifdef __linux__
00791 if (pri) {
00792 sched.sched_priority = 10;
00793 if (sched_setscheduler(0, SCHED_RR, &sched)) {
00794 ast_log(LOG_WARNING, "Unable to set high priority\n");
00795 return -1;
00796 } else
00797 if (option_verbose)
00798 ast_verbose("Set to realtime thread\n");
00799 } else {
00800 sched.sched_priority = 0;
00801 if (sched_setscheduler(0, SCHED_OTHER, &sched)) {
00802 ast_log(LOG_WARNING, "Unable to set normal priority\n");
00803 return -1;
00804 }
00805 }
00806 #else
00807 if (pri) {
00808 if (setpriority(PRIO_PROCESS, 0, -10) == -1) {
00809 ast_log(LOG_WARNING, "Unable to set high priority\n");
00810 return -1;
00811 } else
00812 if (option_verbose)
00813 ast_verbose("Set to high priority\n");
00814 } else {
00815 if (setpriority(PRIO_PROCESS, 0, 0) == -1) {
00816 ast_log(LOG_WARNING, "Unable to set normal priority\n");
00817 return -1;
00818 }
00819 }
00820 #endif
00821 return 0;
00822 }
|
|
|
Unregister a source code file from the core.
Definition at line 268 of file asterisk.c. References AST_LIST_LOCK, AST_LIST_REMOVE_CURRENT, AST_LIST_TRAVERSE_SAFE_BEGIN, AST_LIST_UNLOCK, and free. 00269 {
00270 struct file_version *find;
00271
00272 AST_LIST_LOCK(&file_versions);
00273 AST_LIST_TRAVERSE_SAFE_BEGIN(&file_versions, find, list) {
00274 if (!strcasecmp(find->file, file)) {
00275 AST_LIST_REMOVE_CURRENT(&file_versions, list);
00276 break;
00277 }
00278 }
00279 AST_LIST_TRAVERSE_SAFE_END;
00280 AST_LIST_UNLOCK(&file_versions);
00281 if (find)
00282 free(find);
00283 }
|
|
|
Definition at line 585 of file db.c. References ast_cli_register(), ast_manager_register, cli_database_del, cli_database_deltree, cli_database_get, cli_database_put, cli_database_show, cli_database_showkey, dbinit(), EVENT_FLAG_SYSTEM, manager_dbget(), and manager_dbput(). Referenced by main(). 00586 {
00587 dbinit();
00588 ast_cli_register(&cli_database_show);
00589 ast_cli_register(&cli_database_showkey);
00590 ast_cli_register(&cli_database_get);
00591 ast_cli_register(&cli_database_put);
00592 ast_cli_register(&cli_database_del);
00593 ast_cli_register(&cli_database_deltree);
00594 ast_manager_register("DBGet", EVENT_FLAG_SYSTEM, manager_dbget, "Get DB Entry");
00595 ast_manager_register("DBPut", EVENT_FLAG_SYSTEM, manager_dbput, "Put DB Entry");
00596 return 0;
00597 }
|
|
|
Definition at line 638 of file logger.c. References ast_mutex_lock(), ast_mutex_unlock(), free, list, msglist::msg, msgcnt, and msglist::next. Referenced by quit_handler(). 00639 {
00640 struct msglist *m, *tmp;
00641
00642 ast_mutex_lock(&msglist_lock);
00643 m = list;
00644 while(m) {
00645 if (m->msg) {
00646 free(m->msg);
00647 }
00648 tmp = m->next;
00649 free(m);
00650 m = tmp;
00651 }
00652 list = last = NULL;
00653 msgcnt = 0;
00654 ast_mutex_unlock(&msglist_lock);
00655 return;
00656 }
|
|
|
Definition at line 285 of file dnsmgr.c. References ast_cli_register(), AST_LIST_HEAD_INIT, ast_log(), cli_reload, cli_status, do_reload(), LOG_ERROR, sched, and sched_context_create(). Referenced by main(). 00286 {
00287 sched = sched_context_create();
00288 if (!sched) {
00289 ast_log(LOG_ERROR, "Unable to create schedule context.\n");
00290 return -1;
00291 }
00292 AST_LIST_HEAD_INIT(&entry_list);
00293 ast_cli_register(&cli_reload);
00294 ast_cli_register(&cli_status);
00295 return do_reload(1);
00296 }
|
|
|
Definition at line 298 of file dnsmgr.c. References do_reload(). Referenced by ast_module_reload(). 00299 {
00300 do_reload(0);
00301 }
|
|
|
Definition at line 194 of file dnsmgr.c. References ast_sched_add_variable(), ast_sched_del(), master_refresh_info, refresh_list(), refresh_sched, and sched. Referenced by main(). 00195 {
00196 if (refresh_sched > -1) {
00197 ast_sched_del(sched, refresh_sched);
00198 refresh_sched = ast_sched_add_variable(sched, 100, refresh_list, &master_refresh_info, 1);
00199 }
00200 }
|
|
|
Definition at line 852 of file frame.c. References ast_cli_register_multiple(), and my_clis. Referenced by main(). 00853 {
00854 ast_cli_register_multiple(my_clis, sizeof(my_clis)/sizeof(my_clis[0]) );
00855 return 0;
00856 }
|
|
|
Definition at line 597 of file logger.c. References ast_cli_register(), ast_config_AST_LOG_DIR, ast_log(), ast_queue_log(), ast_verbose(), eventlog, EVENTLOG, handle_SIGXFSZ(), init_logger_chain(), LOG_ERROR, LOG_EVENT, logfiles, logger_show_channels_cli, qlog, QUEUELOG, reload_logger_cli, and rotate_logger_cli. Referenced by main(). 00598 {
00599 char tmp[256];
00600 int res = 0;
00601
00602 /* auto rotate if sig SIGXFSZ comes a-knockin */
00603 (void) signal(SIGXFSZ,(void *) handle_SIGXFSZ);
00604
00605 /* register the relaod logger cli command */
00606 ast_cli_register(&reload_logger_cli);
00607 ast_cli_register(&rotate_logger_cli);
00608 ast_cli_register(&logger_show_channels_cli);
00609
00610 mkdir((char *)ast_config_AST_LOG_DIR, 0755);
00611
00612 /* create log channels */
00613 init_logger_chain();
00614
00615 /* create the eventlog */
00616 if (logfiles.event_log) {
00617 mkdir((char *)ast_config_AST_LOG_DIR, 0755);
00618 snprintf(tmp, sizeof(tmp), "%s/%s", (char *)ast_config_AST_LOG_DIR, EVENTLOG);
00619 eventlog = fopen((char *)tmp, "a");
00620 if (eventlog) {
00621 ast_log(LOG_EVENT, "Started Asterisk Event Logger\n");
00622 if (option_verbose)
00623 ast_verbose("Asterisk Event Logger Started %s\n",(char *)tmp);
00624 } else {
00625 ast_log(LOG_ERROR, "Unable to create event log: %s\n", strerror(errno));
00626 res = -1;
00627 }
00628 }
00629
00630 if (logfiles.queue_log) {
00631 snprintf(tmp, sizeof(tmp), "%s/%s", (char *)ast_config_AST_LOG_DIR, QUEUELOG);
00632 qlog = fopen(tmp, "a");
00633 ast_queue_log("NONE", "NONE", "NONE", "QUEUESTART", "%s", "");
00634 }
00635 return res;
00636 }
|
|
|
Definition at line 465 of file loader.c. References __load_resource(), ast_config_AST_MODULE_DIR, ast_config_destroy(), ast_config_load(), ast_log(), AST_MODULE_CONFIG, ast_resource_exists(), ast_true(), ast_variable_browse(), ast_variable_retrieve(), ast_verbose(), cfg, COLOR_BRWHITE, loadorder, LOG_DEBUG, LOG_WARNING, ast_variable::name, ast_variable::next, option_debug, term_color(), ast_variable::value, and VERBOSE_PREFIX_1. Referenced by main(). 00466 {
00467 struct ast_config *cfg;
00468 struct ast_variable *v;
00469 char tmp[80];
00470
00471 if (option_verbose) {
00472 if (preload_only)
00473 ast_verbose("Asterisk Dynamic Loader loading preload modules:\n");
00474 else
00475 ast_verbose("Asterisk Dynamic Loader Starting:\n");
00476 }
00477
00478 cfg = ast_config_load(AST_MODULE_CONFIG);
00479 if (cfg) {
00480 int doload;
00481
00482 /* Load explicitly defined modules */
00483 for (v = ast_variable_browse(cfg, "modules"); v; v = v->next) {
00484 doload = 0;
00485
00486 if (preload_only)
00487 doload = !strcasecmp(v->name, "preload");
00488 else
00489 doload = !strcasecmp(v->name, "load");
00490
00491 if (doload) {
00492 if (option_debug && !option_verbose)
00493 ast_log(LOG_DEBUG, "Loading module %s\n", v->value);
00494 if (option_verbose) {
00495 ast_verbose(VERBOSE_PREFIX_1 "[%s]", term_color(tmp, v->value, COLOR_BRWHITE, 0, sizeof(tmp)));
00496 fflush(stdout);
00497 }
00498 if (__load_resource(v->value, cfg)) {
00499 ast_log(LOG_WARNING, "Loading module %s failed!\n", v->value);
00500 ast_config_destroy(cfg);
00501 return -1;
00502 }
00503 }
00504 }
00505 }
00506
00507 if (preload_only) {
00508 ast_config_destroy(cfg);
00509 return 0;
00510 }
00511
00512 if (!cfg || ast_true(ast_variable_retrieve(cfg, "modules", "autoload"))) {
00513 /* Load all modules */
00514 DIR *mods;
00515 struct dirent *d;
00516 int x;
00517
00518 /* Loop through each order */
00519 for (x=0; x<sizeof(loadorder) / sizeof(loadorder[0]); x++) {
00520 mods = opendir((char *)ast_config_AST_MODULE_DIR);
00521 if (mods) {
00522 while((d = readdir(mods))) {
00523 /* Must end in .so to load it. */
00524 if ((strlen(d->d_name) > 3) &&
00525 (!loadorder[x] || !strncasecmp(d->d_name, loadorder[x], strlen(loadorder[x]))) &&
00526 !strcasecmp(d->d_name + strlen(d->d_name) - 3, ".so") &&
00527 !ast_resource_exists(d->d_name)) {
00528 /* It's a shared library -- Just be sure we're allowed to load it -- kinda
00529 an inefficient way to do it, but oh well. */
00530 if (cfg) {
00531 v = ast_variable_browse(cfg, "modules");
00532 while(v) {
00533 if (!strcasecmp(v->name, "noload") &&
00534 !strcasecmp(v->value, d->d_name))
00535 break;
00536 v = v->next;
00537 }
00538 if (v) {
00539 if (option_verbose) {
00540 ast_verbose( VERBOSE_PREFIX_1 "[skipping %s]\n", d->d_name);
00541 fflush(stdout);
00542 }
00543 continue;
00544 }
00545
00546 }
00547 if (option_debug && !option_verbose)
00548 ast_log(LOG_DEBUG, "Loading module %s\n", d->d_name);
00549 if (option_verbose) {
00550 ast_verbose( VERBOSE_PREFIX_1 "[%s]", term_color(tmp, d->d_name, COLOR_BRWHITE, 0, sizeof(tmp)));
00551 fflush(stdout);
00552 }
00553 if (__load_resource(d->d_name, cfg)) {
00554 ast_log(LOG_WARNING, "Loading module %s failed!\n", d->d_name);
00555 if (cfg)
00556 ast_config_destroy(cfg);
00557 return -1;
00558 }
00559 }
00560 }
00561 closedir(mods);
00562 } else {
00563 if (!option_quiet)
00564 ast_log(LOG_WARNING, "Unable to open modules directory %s.\n", (char *)ast_config_AST_MODULE_DIR);
00565 }
00566 }
00567 }
00568 ast_config_destroy(cfg);
00569 return 0;
00570 }
|
|
|
Definition at line 6193 of file pbx.c. References ast_cli_register_multiple(), AST_LIST_HEAD_INIT_NOLOCK, ast_log(), ast_register_application(), ast_verbose(), builtins, description, globals, LOG_ERROR, name, pbx_cli, and VERBOSE_PREFIX_1. Referenced by main(). 06194 {
06195 int x;
06196
06197 /* Initialize the PBX */
06198 if (option_verbose) {
06199 ast_verbose( "Asterisk PBX Core Initializing\n");
06200 ast_verbose( "Registering builtin applications:\n");
06201 }
06202 AST_LIST_HEAD_INIT_NOLOCK(&globals);
06203 ast_cli_register_multiple(pbx_cli, sizeof(pbx_cli) / sizeof(pbx_cli[0]));
06204
06205 /* Register builtin applications */
06206 for (x=0; x<sizeof(builtins) / sizeof(struct pbx_builtin); x++) {
06207 if (option_verbose)
06208 ast_verbose( VERBOSE_PREFIX_1 "[%s]\n", builtins[x].name);
06209 if (ast_register_application(builtins[x].name, builtins[x].execute, builtins[x].synopsis, builtins[x].description)) {
06210 ast_log(LOG_ERROR, "Unable to register builtin application '%s'\n", builtins[x].name);
06211 return -1;
06212 }
06213 }
06214 return 0;
06215 }
|
|
|
Definition at line 378 of file logger.c. References ast_config_AST_LOG_DIR, ast_log(), ast_mutex_lock(), ast_mutex_unlock(), ast_queue_log(), ast_verbose(), logchannel::disabled, EVENT_FLAG_SYSTEM, EVENTLOG, eventlog, logchannel::filename, logchannel::fileptr, filesize_reload_needed, init_logger_chain(), LOG_ERROR, LOG_EVENT, logfiles, manager_event(), logchannel::next, qlog, and QUEUELOG. Referenced by ast_log(), handle_logger_reload(), handle_logger_rotate(), and main(). 00379 {
00380 char old[AST_CONFIG_MAX_PATH] = "";
00381 char new[AST_CONFIG_MAX_PATH];
00382 int event_rotate = rotate, queue_rotate = rotate;
00383 struct logchannel *f;
00384 FILE *myf;
00385 int x, res = 0;
00386
00387 ast_mutex_lock(&loglock);
00388 if (eventlog)
00389 fclose(eventlog);
00390 else
00391 event_rotate = 0;
00392 eventlog = NULL;
00393
00394 if (qlog)
00395 fclose(qlog);
00396 else
00397 queue_rotate = 0;
00398 qlog = NULL;
00399
00400 mkdir((char *)ast_config_AST_LOG_DIR, 0755);
00401
00402 f = logchannels;
00403 while(f) {
00404 if (f->disabled) {
00405 f->disabled = 0; /* Re-enable logging at reload */
00406 manager_event(EVENT_FLAG_SYSTEM, "LogChannel", "Channel: %s\r\nEnabled: Yes\r\n", f->filename);
00407 }
00408 if (f->fileptr && (f->fileptr != stdout) && (f->fileptr != stderr)) {
00409 fclose(f->fileptr); /* Close file */
00410 f->fileptr = NULL;
00411 if(rotate) {
00412 ast_copy_string(old, f->filename, sizeof(old));
00413
00414 for(x=0;;x++) {
00415 snprintf(new, sizeof(new), "%s.%d", f->filename, x);
00416 myf = fopen((char *)new, "r");
00417 if (myf) {
00418 fclose(myf);
00419 } else {
00420 break;
00421 }
00422 }
00423
00424 /* do it */
00425 if (rename(old,new))
00426 fprintf(stderr, "Unable to rename file '%s' to '%s'\n", old, new);
00427 }
00428 }
00429 f = f->next;
00430 }
00431
00432 filesize_reload_needed = 0;
00433
00434 init_logger_chain();
00435
00436 if (logfiles.event_log) {
00437 snprintf(old, sizeof(old), "%s/%s", (char *)ast_config_AST_LOG_DIR, EVENTLOG);
00438 if (event_rotate) {
00439 for (x=0;;x++) {
00440 snprintf(new, sizeof(new), "%s/%s.%d", (char *)ast_config_AST_LOG_DIR, EVENTLOG,x);
00441 myf = fopen((char *)new, "r");
00442 if (myf) /* File exists */
00443 fclose(myf);
00444 else
00445 break;
00446 }
00447
00448 /* do it */
00449 if (rename(old,new))
00450 ast_log(LOG_ERROR, "Unable to rename file '%s' to '%s'\n", old, new);
00451 }
00452
00453 eventlog = fopen(old, "a");
00454 if (eventlog) {
00455 ast_log(LOG_EVENT, "Restarted Asterisk Event Logger\n");
00456 if (option_verbose)
00457 ast_verbose("Asterisk Event Logger restarted\n");
00458 } else {
00459 ast_log(LOG_ERROR, "Unable to create event log: %s\n", strerror(errno));
00460 res = -1;
00461 }
00462 }
00463
00464 if (logfiles.queue_log) {
00465 snprintf(old, sizeof(old), "%s/%s", (char *)ast_config_AST_LOG_DIR, QUEUELOG);
00466 if (queue_rotate) {
00467 for (x = 0; ; x++) {
00468 snprintf(new, sizeof(new), "%s/%s.%d", (char *)ast_config_AST_LOG_DIR, QUEUELOG, x);
00469 myf = fopen((char *)new, "r");
00470 if (myf) /* File exists */
00471 fclose(myf);
00472 else
00473 break;
00474 }
00475
00476 /* do it */
00477 if (rename(old, new))
00478 ast_log(LOG_ERROR, "Unable to rename file '%s' to '%s'\n", old, new);
00479 }
00480
00481 qlog = fopen(old, "a");
00482 if (qlog) {
00483 ast_queue_log("NONE", "NONE", "NONE", "CONFIGRELOAD", "%s", "");
00484 ast_log(LOG_EVENT, "Restarted Asterisk Queue Logger\n");
00485 if (option_verbose)
00486 ast_verbose("Asterisk Queue Logger restarted\n");
00487 } else {
00488 ast_log(LOG_ERROR, "Unable to create queue log: %s\n", strerror(errno));
00489 res = -1;
00490 }
00491 }
00492 ast_mutex_unlock(&loglock);
00493
00494 return res;
00495 }
|
|
|
Definition at line 74 of file term.c. References ATTR_BRIGHT, ATTR_RESET, COLOR_BLACK, COLOR_BROWN, COLOR_WHITE, convshort(), enddata, ESC, option_console, option_nocolor, prepdata, quitdata, termpath, and vt100compat. Referenced by main(). 00075 {
00076 char *term = getenv("TERM");
00077 char termfile[256] = "";
00078 char buffer[512] = "";
00079 int termfd = -1, parseokay = 0, i;
00080
00081 if (!term)
00082 return 0;
00083 if (!option_console || option_nocolor || !option_nofork)
00084 return 0;
00085
00086 for (i=0 ;; i++) {
00087 if (termpath[i] == NULL) {
00088 break;
00089 }
00090 snprintf(termfile, sizeof(termfile), "%s/%c/%s", termpath[i], *term, term);
00091 termfd = open(termfile, O_RDONLY);
00092 if (termfd > -1) {
00093 break;
00094 }
00095 }
00096 if (termfd > -1) {
00097 int actsize = read(termfd, buffer, sizeof(buffer) - 1);
00098 short sz_names = convshort(buffer + 2);
00099 short sz_bools = convshort(buffer + 4);
00100 short n_nums = convshort(buffer + 6);
00101
00102 /* if ((sz_names + sz_bools) & 1)
00103 sz_bools++; */
00104
00105 if (sz_names + sz_bools + n_nums < actsize) {
00106 /* Offset 13 is defined in /usr/include/term.h, though we do not
00107 * include it here, as it conflicts with include/asterisk/term.h */
00108 short max_colors = convshort(buffer + 12 + sz_names + sz_bools + 13 * 2);
00109 if (max_colors > 0) {
00110 vt100compat = 1;
00111 }
00112 parseokay = 1;
00113 }
00114 close(termfd);
00115 }
00116
00117 if (!parseokay) {
00118 /* These comparisons should not be substrings nor case-insensitive, as
00119 * terminal types are very particular about how they treat suffixes and
00120 * capitalization. For example, terminal type 'linux-m' does NOT
00121 * support color, while 'linux' does. Not even all vt100* terminals
00122 * support color, either (e.g. 'vt100+fnkeys'). */
00123 if (!strcmp(term, "linux")) {
00124 vt100compat = 1;
00125 } else if (!strcmp(term, "xterm")) {
00126 vt100compat = 1;
00127 } else if (!strcmp(term, "xterm-color")) {
00128 vt100compat = 1;
00129 } else if (!strncmp(term, "Eterm", 5)) {
00130 /* Both entries which start with Eterm support color */
00131 vt100compat = 1;
00132 } else if (!strcmp(term, "vt100")) {
00133 vt100compat = 1;
00134 } else if (!strncmp(term, "crt", 3)) {
00135 /* Both crt terminals support color */
00136 vt100compat = 1;
00137 }
00138 }
00139
00140 if (vt100compat) {
00141 /* Make commands show up in nice colors */
00142 snprintf(prepdata, sizeof(prepdata), "%c[%d;%d;%dm", ESC, ATTR_BRIGHT, COLOR_BROWN, COLOR_BLACK + 10);
00143 snprintf(enddata, sizeof(enddata), "%c[%d;%d;%dm", ESC, ATTR_RESET, COLOR_WHITE, COLOR_BLACK + 10);
00144 snprintf(quitdata, sizeof(quitdata), "%c[0m", ESC);
00145 }
00146 return 0;
00147 }
|
|
|
Definition at line 219 of file asterisk.c. Referenced by ast_readconfig(), and launch_script(). |
|
|
Definition at line 212 of file asterisk.c. Referenced by ast_ael_compile(), ast_readconfig(), compile_script(), config_text_file_load(), config_text_file_save(), handle_save_dialplan(), ices_exec(), and vm_change_password(). |
|
|
Definition at line 213 of file asterisk.c. Referenced by ast_readconfig(), and main(). |
|
|
Definition at line 230 of file asterisk.c. Referenced by ast_readconfig(). |
|
|
Definition at line 229 of file asterisk.c. Referenced by ast_makesocket(), and ast_readconfig(). |
|
|
Definition at line 228 of file asterisk.c. Referenced by ast_makesocket(), and ast_readconfig(). |
|
|
Definition at line 227 of file asterisk.c. Referenced by ast_makesocket(), and ast_readconfig(). |
|
|
Definition at line 220 of file asterisk.c. Referenced by ast_readconfig(), and dbinit(). |
|
|
Definition at line 221 of file asterisk.c. |
|
|
Definition at line 218 of file asterisk.c. Referenced by ast_readconfig(), csv_log(), init_logger(), load_config(), load_module(), make_logchannel(), reload_logger(), testclient_exec(), testserver_exec(), and writefile(). |
|
|
Definition at line 214 of file asterisk.c. Referenced by __load_resource(), add_module(), ast_readconfig(), complete_fn(), file_ok_sel(), and load_modules(). |
|
|
Definition at line 216 of file asterisk.c. Referenced by ast_monitor_change_fname(), ast_monitor_start(), ast_readconfig(), chanspy_exec(), and mixmonitor_exec(). |
|
|
Definition at line 222 of file asterisk.c. Referenced by ast_readconfig(), main(), and quit_handler(). |
|
|
Definition at line 224 of file asterisk.c. Referenced by ast_readconfig(). |
|
|
Definition at line 223 of file asterisk.c. Referenced by ast_makesocket(), ast_readconfig(), ast_tryconnect(), main(), and quit_handler(). |
|
|
Definition at line 215 of file asterisk.c. Referenced by ast_readconfig(), conf_run(), dictate_exec(), hasvoicemail_internal(), load_module(), and play_mailbox_owner(). |
|
|
Definition at line 217 of file asterisk.c. Referenced by ast_linear_stream(), ast_readconfig(), build_filename(), make_filename(), and reload_firmware(). |
1.3.9.1