[asterisk-addons-commits] may: branch 1.6.0 r1092 - /branches/1.6.0/channels/ooh323c/src/

SVN commits to the Asterisk addons project asterisk-addons-commits at lists.digium.com
Sat Mar 6 18:32:22 CST 2010


Author: may
Date: Sat Mar  6 18:32:15 2010
New Revision: 1092

URL: http://svnview.digium.com/svn/asterisk-addons?view=rev&rev=1092
Log:
added docallbacks flag in q931decode

backport from trunk rev 239037
add docallbacks flag in q931decode function because
we must do callbacks when we decode received q931 packet and
we must don't when we print sended q931.

(closes issue #16664)
Reported by: vmikhelson
Patches:
      ooh323-dtmf-duplicate-3.patch uploaded by may213 (license 454)
Tested by: vmikhelson


Modified:
    branches/1.6.0/channels/ooh323c/src/oochannels.c
    branches/1.6.0/channels/ooh323c/src/ooq931.c
    branches/1.6.0/channels/ooh323c/src/ooq931.h

Modified: branches/1.6.0/channels/ooh323c/src/oochannels.c
URL: http://svnview.digium.com/svn/asterisk-addons/branches/1.6.0/channels/ooh323c/src/oochannels.c?view=diff&rev=1092&r1=1091&r2=1092
==============================================================================
--- branches/1.6.0/channels/ooh323c/src/oochannels.c (original)
+++ branches/1.6.0/channels/ooh323c/src/oochannels.c Sat Mar  6 18:32:15 2010
@@ -903,7 +903,7 @@
 
    initializePrintHandler(&printHandler, "Received H.2250 Message");
    setEventHandler (pctxt, &printHandler);
-   ret = ooQ931Decode (call, pmsg, len, message);
+   ret = ooQ931Decode (call, pmsg, len, message, 1);
    if(ret != OO_OK) {
       OOTRACEERR3("Error:Failed to decode received H.2250 message. (%s, %s)\n",
                    call->callType, call->callToken);

Modified: branches/1.6.0/channels/ooh323c/src/ooq931.c
URL: http://svnview.digium.com/svn/asterisk-addons/branches/1.6.0/channels/ooh323c/src/ooq931.c?view=diff&rev=1092&r1=1091&r2=1092
==============================================================================
--- branches/1.6.0/channels/ooh323c/src/ooq931.c (original)
+++ branches/1.6.0/channels/ooh323c/src/ooq931.c Sat Mar  6 18:32:15 2010
@@ -39,7 +39,7 @@
 };
 
 EXTERN int ooQ931Decode 
-   (OOH323CallData *call, Q931Message* msg, int length, ASN1OCTET *data) 
+   (OOH323CallData *call, Q931Message* msg, int length, ASN1OCTET *data, int docallbacks)
 {
    int offset, x;
    int rv = ASN_OK;
@@ -162,9 +162,9 @@
       if(ie->discriminator == Q931KeypadIE)
       {
          OOTRACEDBGB1("   Keypad IE = {\n");
-         OOTRACEDBGB2("      %s\n", ie->data);
+         OOTRACEDBGB2("      %c\n", ((char *)ie->data)[0]);
          OOTRACEDBGB1("   }\n");
-         if(gH323ep.h323Callbacks.onReceivedDTMF)
+         if(docallbacks && gH323ep.h323Callbacks.onReceivedDTMF)
          {
             gH323ep.h323Callbacks.onReceivedDTMF(call, ie->data);
          }
@@ -613,7 +613,7 @@
 
    setPERBuffer (pctxt, msgbuf, msglen, TRUE);
 
-   ret = ooQ931Decode (call, &q931Msg, msglen, msgbuf);
+   ret = ooQ931Decode (call, &q931Msg, msglen, msgbuf, 0);
    if(ret != OO_OK)
    {
       OOTRACEERR3("Error:Failed decoding Q931 message. (%s, %s)\n", 

Modified: branches/1.6.0/channels/ooh323c/src/ooq931.h
URL: http://svnview.digium.com/svn/asterisk-addons/branches/1.6.0/channels/ooh323c/src/ooq931.h?view=diff&rev=1092&r1=1091&r2=1092
==============================================================================
--- branches/1.6.0/channels/ooh323c/src/ooq931.h (original)
+++ branches/1.6.0/channels/ooh323c/src/ooq931.h Sat Mar  6 18:32:15 2010
@@ -335,7 +335,7 @@
  * @return         Completion status - 0 on success, -1 on failure
  */
 EXTERN int ooQ931Decode 
-(struct OOH323CallData *call, Q931Message* msg, int length, ASN1OCTET *data);
+(struct OOH323CallData *call, Q931Message* msg, int length, ASN1OCTET *data, int docallbacks);
 
 /**
  * This function is used to decode the UUIE of the message from the list of




More information about the asterisk-addons-commits mailing list