]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Fix "fallthrough" behavior here, so config options in a previously configured user...
authorJason Parker <jparker@digium.com>
Wed, 16 Apr 2008 17:30:09 +0000 (17:30 +0000)
committerJason Parker <jparker@digium.com>
Wed, 16 Apr 2008 17:30:09 +0000 (17:30 +0000)
(closes issue #12458)
Reported by: tzafrir
Patches:
      chanzap_users_sections.diff uploaded by tzafrir (license 46)

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

channels/chan_zap.c

index 45ca1320e477fcb92a6a9bec5c9a593aa7430c21..a0b69af1a651ce9cc52566c121158dfe3347919b 100644 (file)
@@ -11367,11 +11367,10 @@ static int setup_zap(int reload)
                                continue;
                        chans = ast_variable_retrieve(cfg, cat, "zapchan");
                        if (!ast_strlen_zero(chans)) {
-                               /** \todo At this point we should probably 
-                                * duplicate conf, and pass a copy, to prevent 
-                                * one section from affecting another
-                                */
-                               process_zap(&conf, ast_variable_browse(cfg, cat), reload, 0);
+                               struct zt_chan_conf sect_conf;
+                               memcpy(&sect_conf, &conf, sizeof(sect_conf));
+
+                               process_zap(&sect_conf, ast_variable_browse(cfg, cat), reload, 0);
                        }
                }
                ast_config_destroy(cfg);