[svn-commits] wedhorn: branch 11 r378010 - /branches/11/channels/chan_skinny.c
SVN commits to the Digium repositories
svn-commits at lists.digium.com
Thu Dec 13 19:49:34 CST 2012
Author: wedhorn
Date: Thu Dec 13 19:49:30 2012
New Revision: 378010
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=378010
Log:
Fix skinny to recognise vmexten in general section of conf
Fixup the vmexten so if globally set in general section will be honored by
chan_skinny. Also get rid of the 'global_' part of variable name to match
regexten.
(closes issue AST-20790)
Reported by: snuffy
Tested by: snuffy, myself
Patches:
skinny-vm.diff uploaded by snuffy (license 5024)
Modified:
branches/11/channels/chan_skinny.c
Modified: branches/11/channels/chan_skinny.c
URL: http://svnview.digium.com/svn/asterisk/branches/11/channels/chan_skinny.c?view=diff&rev=378010&r1=378009&r2=378010
==============================================================================
--- branches/11/channels/chan_skinny.c (original)
+++ branches/11/channels/chan_skinny.c Thu Dec 13 19:49:30 2012
@@ -193,7 +193,7 @@
static int auth_timeout = DEFAULT_AUTH_TIMEOUT;
static int auth_limit = DEFAULT_AUTH_LIMIT;
static int unauth_sessions = 0;
-static char global_vmexten[AST_MAX_EXTENSION]; /* Voicemail pilot number */
+static char vmexten[AST_MAX_EXTENSION]; /* Voicemail pilot number */
static char used_context[AST_MAX_EXTENSION]; /* placeholder to check if context are already used in regcontext */
static char regcontext[AST_MAX_CONTEXT]; /* Context for auto-extension */
static char date_format[6] = "D-M-Y";
@@ -4157,7 +4157,7 @@
ast_cli(a->fd, " Bindaddress: %s\n", ast_inet_ntoa(bindaddr.sin_addr));
ast_cli(a->fd, " KeepAlive: %d\n", keep_alive);
ast_cli(a->fd, " Date Format: %s\n", date_format);
- ast_cli(a->fd, " Voice Mail Extension: %s\n", S_OR(global_vmexten, "(not set)"));
+ ast_cli(a->fd, " Voice Mail Extension: %s\n", S_OR(vmexten, "(not set)"));
ast_cli(a->fd, " Reg. context: %s\n", S_OR(regcontext, "(not set)"));
ast_cli(a->fd, " Jitterbuffer enabled: %s\n", AST_CLI_YESNO(ast_test_flag(&global_jbconf, AST_JB_ENABLED)));
if (ast_test_flag(&global_jbconf, AST_JB_ENABLED)) {
@@ -7198,6 +7198,9 @@
ast_context_find_or_create(NULL, NULL, context, "Skinny");
}
ast_copy_string(regcontext, v->value, sizeof(regcontext));
+ continue;
+ } else if (!strcasecmp(v->name, "vmexten")) {
+ ast_copy_string(vmexten, v->value, sizeof(vmexten));
continue;
} else if (!strcasecmp(v->name, "dateformat")) {
memcpy(date_format, v->value, sizeof(date_format));
@@ -7640,6 +7643,10 @@
AST_EVENT_IE_NEWMSGS, AST_EVENT_IE_PLTYPE_EXISTS,
AST_EVENT_IE_END);
}
+
+ if (!ast_strlen_zero(vmexten) && ast_strlen_zero(l->vmexten)) {
+ ast_copy_string(l->vmexten, vmexten, sizeof(l->vmexten));
+ }
ast_mutex_unlock(&l->lock);
More information about the svn-commits
mailing list