]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Don't create [general] voicemail context when using users.conf
authorLeif Madsen <leif@leifmadsen.com>
Tue, 17 May 2011 12:53:50 +0000 (12:53 +0000)
committerLeif Madsen <leif@leifmadsen.com>
Tue, 17 May 2011 12:53:50 +0000 (12:53 +0000)
Prior to this patch, app_voicemail would create a [general] context when parsing users.conf.

(closes issue #18891)
Reported by: pdugas
Patches:
      app_voicemail-ignore-general.patch uploaded by pdugas (license 1222)
      app_voicemail-ignore-general-style-guidelines.patch uploaded by seanbright (license 71)
Tested by: pdugas

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@319367 65c4cc65-6c06-0410-ace0-fbb531ad65f3

apps/app_voicemail.c

index d6d3c16c55619c0a7fe39f56c1af6dcf0d6f87b2..474aaf3fc4b425d898d19a1a0b257a2c57ab56d8 100644 (file)
@@ -12140,6 +12140,9 @@ static int load_config(int reload)
 
                if (ucfg) {     
                        for (cat = ast_category_browse(ucfg, NULL); cat ; cat = ast_category_browse(ucfg, cat)) {
+                               if (!strcasecmp(cat, "general")) {
+                                       continue;
+                               }
                                if (!ast_true(ast_config_option(ucfg, cat, "hasvoicemail")))
                                        continue;
                                if ((current = find_or_create(userscontext, cat))) {