diff options
author | twilson <twilson@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-01-13 23:00:27 +0000 |
---|---|---|
committer | twilson <twilson@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-01-13 23:00:27 +0000 |
commit | f4c87434056e864e8ab69c797fb8b626b71871ee (patch) | |
tree | e788b74e5bda477eec1fc515ac993439c6db3423 /main/asterisk.c | |
parent | d8cfd530bc843373369e210c86e5a2b1bd8591aa (diff) |
Add option to hide console connect messages
(closes issue #14222)
Reported by: jamesgolovich
Patches:
asterisk-hideconnect.diff.txt uploaded by jamesgolovich (license 176)
Tested by: otherwiseguy
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@168585 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main/asterisk.c')
-rw-r--r-- | main/asterisk.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/main/asterisk.c b/main/asterisk.c index 9b8b3f78a..d48c15615 100644 --- a/main/asterisk.c +++ b/main/asterisk.c @@ -1212,7 +1212,9 @@ static void *netconsole(void *vconsole) break; } } - ast_verb(3, "Remote UNIX connection disconnected\n"); + if (!ast_opt_hide_connect) { + ast_verb(3, "Remote UNIX connection disconnected\n"); + } close(con->fd); close(con->p[0]); close(con->p[1]); @@ -1289,8 +1291,9 @@ static void *listener(void *unused) fdprint(s, "No more connections allowed\n"); ast_log(LOG_WARNING, "No more connections allowed\n"); close(s); - } else if (consoles[x].fd > -1) + } else if ((consoles[x].fd > -1) && (!ast_opt_hide_connect)) { ast_verb(3, "Remote UNIX connection\n"); + } } } } @@ -2953,6 +2956,8 @@ static void ast_readconfig(void) ast_set2_flag(&ast_options, ast_true(v->value), AST_OPT_FLAG_LIGHT_BACKGROUND); } else if (!strcasecmp(v->name, "forceblackbackground")) { ast_set2_flag(&ast_options, ast_true(v->value), AST_OPT_FLAG_FORCE_BLACK_BACKGROUND); + } else if (!strcasecmp(v->name, "hideconnect")) { + ast_set2_flag(&ast_options, ast_true(v->value), AST_OPT_FLAG_HIDE_CONSOLE_CONNECT); } } for (v = ast_variable_browse(cfg, "compat"); v; v = v->next) { |