From 7d9be1f65ab4e6eb254da302d38af15b328ae2fd Mon Sep 17 00:00:00 2001
From: Michael Jerris <mike@jerris.com>
Date: Tue, 1 Jul 2008 22:34:59 +0000
Subject: [PATCH] re-set our decode buffer to get rid of the previous message.

git-svn-id: http://svn.openzap.org/svn/openzap/trunk@496 a93c3328-9c30-0410-af19-c9cd2b2d52af
---
 libs/openzap/src/isdn/Q931.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/libs/openzap/src/isdn/Q931.c b/libs/openzap/src/isdn/Q931.c
index 272d768766..0415f39512 100644
--- a/libs/openzap/src/isdn/Q931.c
+++ b/libs/openzap/src/isdn/Q931.c
@@ -340,10 +340,13 @@ L3INT Q931Rx23(Q931_TrunkInfo_t *pTrunk, L3UCHAR * buf, L3INT Size)
 
     L3INT IOff = 0;
 
-    /* Protocol Discriminator */
+	/* Reset our decode buffer */
+	memset(pTrunk->L3Buf, 0, sizeof(pTrunk->L3Buf));
+
+	/* Protocol Discriminator */
     m->ProtDisc = Mes[IOff++];
 
-    /* CRV */
+    /* CRV */add 
     m->CRVFlag = Mes[IOff + 1] & 0x80;
     m->CRV = Q931Uie_CRV(pTrunk, Mes, m->buf, &IOff, &ISize);