]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
(re)added support of dynamical enabling hdlc on bchannels
authorChristian Richter <christian.richter@beronet.com>
Tue, 10 Oct 2006 13:34:33 +0000 (13:34 +0000)
committerChristian Richter <christian.richter@beronet.com>
Tue, 10 Oct 2006 13:34:33 +0000 (13:34 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@44785 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_misdn.c
channels/misdn/isdn_lib.c

index b6280ce0b47645e5dda08d6326eb04ed00046426..2fddfe3d57433262133270562e89e8be98e66864 100644 (file)
@@ -4463,7 +4463,10 @@ static int misdn_set_opt_exec(struct ast_channel *chan, void *data)
                        
                        if (strlen(tok) > 1 && tok[1]=='1') {
                                chan_misdn_log(1, ch->bc->port, "SETOPT: HDLC \n");
-                               ch->bc->hdlc=1;
+                               if (!ch->bc->hdlc) {
+                                       ch->bc->hdlc=1;
+                                       misdn_lib_setup_bc(ch->bc);
+                               }
                        }  
                        ch->bc->capability=INFO_CAPABILITY_DIGITAL_UNRESTRICTED;
                        break;
index c0fdf31d8d37e39595f84e86223256f7cde0fb87..ce25791a4fdea9561b7afc30a5a2b8489b7667c1 100644 (file)
@@ -882,6 +882,7 @@ static int create_process (int midev, struct misdn_bchannel *bc) {
 
 void misdn_lib_setup_bc(struct misdn_bchannel *bc)
 {
+       clean_up_bc(bc);
        setup_bc(bc);
 }