mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-02 02:18:31 +00:00
Merged revisions 377506,377512 via svnmerge from
file:///srv/subversion/repos/asterisk/trunk ................ r377506 | tilghman | 2012-12-09 19:29:32 -0600 (Sun, 09 Dec 2012) | 11 lines Remove some dead code and additionally handle a case that wasn't handled. ........ Merged revisions 377487 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 377504 from http://svn.asterisk.org/svn/asterisk/branches/10 ........ Merged revisions 377505 from http://svn.asterisk.org/svn/asterisk/branches/11 ................ r377512 | tilghman | 2012-12-09 19:41:50 -0600 (Sun, 09 Dec 2012) | 22 lines Improve documentation by making all of the colors used readable, no matter what the background color is. Dark blue on a black background is unreadable, as is yellow on a light background. This patch turns on the bright attribute for colors when on a dark background and turns *off* the bright attribute when the -W command line option is used (indicating a _light_ background). This ensures that text is readable in both cases. Patch by: tilghman Review: https://reviewboard.asterisk.org/r/2224 ........ Merged revisions 377509 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 377510 from http://svn.asterisk.org/svn/asterisk/branches/10 ........ Merged revisions 377511 from http://svn.asterisk.org/svn/asterisk/branches/11 ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/team/mmichelson/threadpool@377535 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -430,6 +430,9 @@ static int my_load_module(int reload)
|
|||||||
int res;
|
int res;
|
||||||
struct ast_config *cfg;
|
struct ast_config *cfg;
|
||||||
struct ast_variable *var;
|
struct ast_variable *var;
|
||||||
|
/* CONFIG_STATUS_FILEUNCHANGED is impossible when config_flags is always 0,
|
||||||
|
* and it has to be zero, so a reload can be sent to tell the driver to
|
||||||
|
* rescan the table layout. */
|
||||||
struct ast_flags config_flags = { 0 };
|
struct ast_flags config_flags = { 0 };
|
||||||
struct column *entry;
|
struct column *entry;
|
||||||
char *temp;
|
char *temp;
|
||||||
@@ -445,11 +448,13 @@ static int my_load_module(int reload)
|
|||||||
* have changed, which is not detectable by config file change detection,
|
* have changed, which is not detectable by config file change detection,
|
||||||
* but should still cause the configuration to be re-parsed. */
|
* but should still cause the configuration to be re-parsed. */
|
||||||
cfg = ast_config_load(config, config_flags);
|
cfg = ast_config_load(config, config_flags);
|
||||||
if (!cfg) {
|
if (cfg == CONFIG_STATUS_FILEMISSING) {
|
||||||
ast_log(LOG_WARNING, "Unable to load config for mysql CDR's: %s\n", config);
|
ast_log(LOG_WARNING, "Unable to load config for mysql CDR's: %s\n", config);
|
||||||
return AST_MODULE_LOAD_SUCCESS;
|
return AST_MODULE_LOAD_SUCCESS;
|
||||||
} else if (cfg == CONFIG_STATUS_FILEUNCHANGED)
|
} else if (cfg == CONFIG_STATUS_FILEINVALID) {
|
||||||
return AST_MODULE_LOAD_SUCCESS;
|
ast_log(LOG_ERROR, "Unable to load configuration file '%s'\n", config);
|
||||||
|
return AST_MODULE_LOAD_DECLINE;
|
||||||
|
}
|
||||||
|
|
||||||
if (reload) {
|
if (reload) {
|
||||||
AST_RWLIST_WRLOCK(&columns);
|
AST_RWLIST_WRLOCK(&columns);
|
||||||
|
@@ -358,7 +358,13 @@ char *ast_xmldoc_printable(const char *bwinput, int withcolors)
|
|||||||
|
|
||||||
/* Setup color */
|
/* Setup color */
|
||||||
if (withcolors) {
|
if (withcolors) {
|
||||||
ast_term_color_code(&colorized, colorized_tags[c].colorfg, 0);
|
if (ast_opt_light_background) {
|
||||||
|
/* Turn off *bright* colors */
|
||||||
|
ast_term_color_code(&colorized, colorized_tags[c].colorfg & 0x7f, 0);
|
||||||
|
} else {
|
||||||
|
/* Turn on *bright* colors */
|
||||||
|
ast_term_color_code(&colorized, colorized_tags[c].colorfg | 0x80, 0);
|
||||||
|
}
|
||||||
if (!colorized) {
|
if (!colorized) {
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user