]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
automerge commit
authorAutomerge script <automerge@asterisk.org>
Fri, 13 Oct 2006 08:02:20 +0000 (08:02 +0000)
committerAutomerge script <automerge@asterisk.org>
Fri, 13 Oct 2006 08:02:20 +0000 (08:02 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@44999 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/misdn/isdn_msg_parser.c

index d23031ecb3ff614fd184a0d4e267e5651b5d0bae..540098d23d43c3e0bfde50d4c10725e44a146ebb 100644 (file)
@@ -734,8 +734,9 @@ void parse_disconnect (struct isdn_msg msgs[], msg_t *msg, struct misdn_bchannel
        int HEADER_LEN = nt?mISDNUSER_HEAD_SIZE:mISDN_HEADER_LEN;
        DISCONNECT_t *disconnect=(DISCONNECT_t*)((unsigned long)(msg->data+HEADER_LEN));
        int location;
-  
-       dec_ie_cause(disconnect->CAUSE, (Q931_info_t *)(disconnect), &location, &bc->cause, nt,bc);
+       int cause; 
+       dec_ie_cause(disconnect->CAUSE, (Q931_info_t *)(disconnect), &location, &cause, nt,bc);
+       if (cause>0) bc->cause=cause;
 
        dec_ie_progress(disconnect->PROGRESS, (Q931_info_t *)disconnect, &bc->progress_coding, &bc->progress_location, &bc->progress_indicator, nt, bc);
 #if DEBUG 
@@ -801,8 +802,10 @@ void parse_release (struct isdn_msg msgs[], msg_t *msg, struct misdn_bchannel *b
        int HEADER_LEN = nt?mISDNUSER_HEAD_SIZE:mISDN_HEADER_LEN;
        RELEASE_t *release=(RELEASE_t*)((unsigned long)(msg->data+HEADER_LEN));
        int location;
+       int cause;
   
-       dec_ie_cause(release->CAUSE, (Q931_info_t *)(release), &location, &bc->cause, nt,bc);
+       dec_ie_cause(release->CAUSE, (Q931_info_t *)(release), &location, &cause, nt,bc);
+       if (cause>0) bc->cause=cause;
 #if DEBUG 
        printf("Parsing RELEASE Msg\n"); 
 #endif
@@ -831,6 +834,7 @@ void parse_release_complete (struct isdn_msg msgs[], msg_t *msg, struct misdn_bc
        int HEADER_LEN = nt?mISDNUSER_HEAD_SIZE:mISDN_HEADER_LEN;
        RELEASE_COMPLETE_t *release_complete=(RELEASE_COMPLETE_t*)((unsigned long)(msg->data+HEADER_LEN));
        int location;
+       int cause;
        iframe_t *frm = (iframe_t*) msg->data;
 
        struct misdn_stack *stack=get_stack_by_bc(bc);
@@ -851,7 +855,8 @@ void parse_release_complete (struct isdn_msg msgs[], msg_t *msg, struct misdn_bc
                        return;
                }
        }
-       dec_ie_cause(release_complete->CAUSE, (Q931_info_t *)(release_complete), &location, &bc->cause, nt,bc);
+       dec_ie_cause(release_complete->CAUSE, (Q931_info_t *)(release_complete), &location, &cause, nt,bc);
+       if (cause>0) bc->cause=cause;
 
 #if DEBUG 
        printf("Parsing RELEASE_COMPLETE Msg\n"); 
@@ -1008,8 +1013,10 @@ void parse_status (struct isdn_msg msgs[], msg_t *msg, struct misdn_bchannel *bc
        int HEADER_LEN = nt?mISDNUSER_HEAD_SIZE:mISDN_HEADER_LEN;
        STATUS_t *status=(STATUS_t*)((unsigned long)(msg->data+HEADER_LEN));
        int location;
+       int cause;
   
-       dec_ie_cause(status->CAUSE, (Q931_info_t *)(status), &location, &bc->cause, nt,bc);
+       dec_ie_cause(status->CAUSE, (Q931_info_t *)(status), &location, &cause, nt,bc);
+       if (cause>0) bc->cause=cause;
        ;
 
 #if DEBUG