Merged revisions 212498 via svnmerge from
[asterisk/asterisk.git] / channels / misdn_config.c
index 7318326..7d55a17 100644 (file)
@@ -1035,6 +1035,11 @@ static void _build_port_config (struct ast_variable *v, char *cat)
        }
 
        for (i = 0; i < (max_ports + 1); ++i) {
+               if (i > 0 && cfg_for_ports[0]) {
+                       /* default category, will populate the port_cfg with additional port
+                       categories in subsequent calls to this function */
+                       memset(cfg_tmp, 0, sizeof(cfg_tmp));
+               }
                if (cfg_for_ports[i]) {
                        memcpy(port_cfg[i], cfg_tmp, sizeof(cfg_tmp));
                }