Change order of sending TCS and MSD packets
[asterisk/asterisk.git] / addons / ooh323c / src / oochannels.c
index c4ac248..7fa8509 100644 (file)
@@ -146,13 +146,6 @@ int ooCreateH245Connection(OOH323CallData *call)
                          call->callType, call->callToken);
             return ret;
          }
-         ret = ooSendMasterSlaveDetermination(call);
-         if(ret != OO_OK)
-         {
-            OOTRACEERR3("ERROR:Sending Master-slave determination message "
-                        "(%s, %s)\n", call->callType, call->callToken);
-            return ret;
-         }
       }
       else
       {
@@ -489,13 +482,6 @@ int ooAcceptH245Connection(OOH323CallData *call)
                    call->callType, call->callToken);
       return ret;
    }
-   ret = ooSendMasterSlaveDetermination(call);
-   if(ret != OO_OK)
-   {
-      OOTRACEERR3("ERROR:Sending Master-slave determination message "
-                  "(%s, %s)\n", call->callType, call->callToken);
-      return ret;
-   }   
    return OO_OK;
 }
 
@@ -982,7 +968,7 @@ int ooH2250Receive(OOH323CallData *call)
    ASN1OCTET message[MAXMSGLEN], message1[MAXMSGLEN];
    int len;
    Q931Message *pmsg;
-   OOCTXT *pctxt = call->pctxt;
+   OOCTXT *pctxt = call->msgctxt;
    
    struct timeval timeout;
 
@@ -1116,6 +1102,7 @@ int ooH2250Receive(OOH323CallData *call)
 
    initializePrintHandler(&printHandler, "Received H.2250 Message");
    setEventHandler (pctxt, &printHandler);
+   setPERBuffer (pctxt, message, len, TRUE);
    ret = ooQ931Decode (call, pmsg, len, message, 1);
    if(ret != OO_OK) {
       OOTRACEERR3("Error:Failed to decode received H.2250 message. (%s, %s)\n",