fixed some issues, that appear at higher load
authorChristian Richter <christian.richter@beronet.com>
Mon, 10 Apr 2006 16:50:20 +0000 (16:50 +0000)
committerChristian Richter <christian.richter@beronet.com>
Mon, 10 Apr 2006 16:50:20 +0000 (16:50 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@18835 65c4cc65-6c06-0410-ace0-fbb531ad65f3

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

index 054224b..08e9d55 100644 (file)
@@ -2067,7 +2067,6 @@ static struct ast_frame  *misdn_read(struct ast_channel *ast)
 
        if (!len) {
                chan_misdn_log(4,tmp->bc->port,"misdn_read: ZERO READ\n");
-
                tmp->frame.frametype = AST_FRAME_NULL;
                tmp->frame.subclass = 0;
                return &tmp->frame;
@@ -2885,7 +2884,7 @@ static void release_chan(struct misdn_bchannel *bc) {
                        close(ch->pipe[0]);
                        close(ch->pipe[1]);
                        
-                       if (ast && MISDN_ASTERISK_PVT(ast)) {
+                       if (ast && MISDN_ASTERISK_TECH_PVT(ast)) {
                                chan_misdn_log(1, bc->port, "* RELEASING CHANNEL pid:%d ctx:%s dad:%s oad:%s state: %s\n",bc?bc->pid:-1, ast->context, ast->exten,AST_CID_P(ast),misdn_get_ch_state(ch));
                                chan_misdn_log(3, bc->port, " --> * State Down\n");
                                /* copy cause */
index 3f8dbe6..46cdba7 100644 (file)
@@ -1474,7 +1474,8 @@ int handle_cr ( struct misdn_stack *stack, iframe_t *frm)
        switch (frm->prim) {
        case CC_NEW_CR|INDICATION:
                cb_log(7, stack->port, " --> lib: NEW_CR Ind with l3id:%x on this port.\n",frm->dinfo);
-               handle_new_process(stack, frm); 
+               if (handle_new_process(stack, frm) <0) 
+                       return -1;
                return 1;
        case CC_NEW_CR|CONFIRM:
                return 1;
@@ -2306,8 +2307,13 @@ int handle_frm(msg_t *msg)
 
        {
                struct misdn_bchannel *bc;
+               int ret=handle_cr(stack, frm);
+
+               if (ret<0) {
+                       cb_log(3,stack?stack->port:0,"handle_frm: handle_cr <0 prim:%x addr:%x\n", frm->prim, frm->addr);
+               }
 
-               if(handle_cr(stack, frm)) {
+               if(ret) {
                        free_msg(msg);
                        return 1;
                }