[asterisk-commits] wedhorn: trunk r378011 - in /trunk: ./ channels/chan_skinny.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Dec 13 19:55:46 CST 2012


Author: wedhorn
Date: Thu Dec 13 19:55:43 2012
New Revision: 378011

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=378011
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)
........

Merged revisions 378010 from http://svn.asterisk.org/svn/asterisk/branches/11

Modified:
    trunk/   (props changed)
    trunk/channels/chan_skinny.c

Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-11-merged' - no diff available.

Modified: trunk/channels/chan_skinny.c
URL: http://svnview.digium.com/svn/asterisk/trunk/channels/chan_skinny.c?view=diff&rev=378011&r1=378010&r2=378011
==============================================================================
--- trunk/channels/chan_skinny.c (original)
+++ trunk/channels/chan_skinny.c Thu Dec 13 19:55:43 2012
@@ -202,7 +202,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";
@@ -4170,7 +4170,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)) {
@@ -7211,6 +7211,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));
@@ -7653,6 +7656,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 asterisk-commits mailing list