]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
ensure that the private structure for pseudo channels is created without 'leaking...
authorKevin P. Fleming <kpfleming@digium.com>
Mon, 6 Oct 2008 15:57:49 +0000 (15:57 +0000)
committerKevin P. Fleming <kpfleming@digium.com>
Mon, 6 Oct 2008 15:57:49 +0000 (15:57 +0000)
(closes issue #13555)
Reported by: jeffg
Patches:
      issue_13555.patch uploaded by kpfleming (license 421)
Tested by: jeffg

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

channels/chan_dahdi.c

index 91160f17042d8a0ad37228e6d318bcea46d4ce19..476a24c6285aa19caf9f36bc78a5ce3f29d4b42c 100644 (file)
@@ -11650,14 +11650,13 @@ static int process_dahdi(struct dahdi_chan_conf *confp, const char *cat, struct
        /*< \todo why check for the pseudo in the per-channel section.
         * Any actual use for manual setup of the pseudo channel? */
        if (!found_pseudo && reload == 0) {
-               /* Make sure pseudo isn't a member of any groups if
-                  we're automatically making it. */    
-               
-               confp->chan.group = 0;
-               confp->chan.callgroup = 0;
-               confp->chan.pickupgroup = 0;
+               /* use the default configuration for a channel, so
+                  that any settings from real configured channels
+                  don't "leak" into the pseudo channel config
+               */
+               struct dahdi_chan_conf conf = dahdi_chan_conf_default();
 
-               tmp = mkintf(CHAN_PSEUDO, confp, NULL, reload);
+               tmp = mkintf(CHAN_PSEUDO, &conf, NULL, reload);
 
                if (tmp) {
                        if (option_verbose > 2)