summaryrefslogtreecommitdiff
path: root/addons/ooh323c/src/oochannels.c
diff options
context:
space:
mode:
Diffstat (limited to 'addons/ooh323c/src/oochannels.c')
-rw-r--r--addons/ooh323c/src/oochannels.c376
1 files changed, 188 insertions, 188 deletions
diff --git a/addons/ooh323c/src/oochannels.c b/addons/ooh323c/src/oochannels.c
index 0b0acd2a2..f7dd7c5e6 100644
--- a/addons/ooh323c/src/oochannels.c
+++ b/addons/ooh323c/src/oochannels.c
@@ -1,15 +1,15 @@
/*
* Copyright (C) 2004-2005 by Objective Systems, Inc.
*
- * This software is furnished under an open source license and may be
- * used and copied only in accordance with the terms of this license.
- * The text of the license may generally be found in the root
- * directory of this installation in the COPYING file. It
+ * This software is furnished under an open source license and may be
+ * used and copied only in accordance with the terms of this license.
+ * The text of the license may generally be found in the root
+ * directory of this installation in the COPYING file. It
* can also be viewed online at the following URL:
*
* http://www.obj-sys.com/open/license.html
*
- * Any redistributions of this file including modified versions must
+ * Any redistributions of this file including modified versions must
* maintain this copyright notice.
*
*****************************************************************************/
@@ -19,7 +19,7 @@
#include "asterisk/config.h"
#include "asterisk/netsock2.h"
-#include "ooports.h"
+#include "ooports.h"
#include "oochannels.h"
#include "ootrace.h"
#include "ooq931.h"
@@ -69,7 +69,7 @@ int ooCreateH245Listener(OOH323CallData *call)
"(%s, %s)\n", call->callType, call->callToken);
return OO_FAILED;
}
- ret = ooBindPort (OOTCP, channelSocket, call->localIP);
+ ret = ooBindPort (OOTCP, channelSocket, call->localIP);
if(ret == OO_FAILED)
{
OOTRACEERR3("Error:Unable to bind to a TCP port - H245 listener creation"
@@ -83,12 +83,12 @@ int ooCreateH245Listener(OOH323CallData *call)
ret = ooSocketListen(*(call->h245listener), 4096);
if(ret != ASN_OK)
{
- OOTRACEERR3("Error:Unable to listen on H.245 socket (%s, %s)\n",
+ OOTRACEERR3("Error:Unable to listen on H.245 socket (%s, %s)\n",
call->callType, call->callToken);
return OO_FAILED;
}
-
- OOTRACEINFO4("H245 listener creation - successful(port %d) (%s, %s)\n",
+
+ OOTRACEINFO4("H245 listener creation - successful(port %d) (%s, %s)\n",
*(call->h245listenport),call->callType, call->callToken);
return OO_OK;
}
@@ -109,7 +109,7 @@ int ooCreateH245Connection(OOH323CallData *call)
else
{
if (0 == call->pH245Channel) {
- call->pH245Channel =
+ call->pH245Channel =
(OOH323Channel*) memAllocZ (call->pctxt, sizeof(OOH323Channel));
}
@@ -117,7 +117,7 @@ int ooCreateH245Connection(OOH323CallData *call)
bind socket to a port before connecting. Thus avoiding
implicit bind done by a connect call.
*/
- ret = ooBindPort(OOTCP, channelSocket, call->localIP);
+ ret = ooBindPort(OOTCP, channelSocket, call->localIP);
if(ret == OO_FAILED)
{
OOTRACEERR3("Error:Unable to bind to a TCP port - h245 connection "
@@ -125,13 +125,13 @@ int ooCreateH245Connection(OOH323CallData *call)
return OO_FAILED;
}
call->pH245Channel->port = ret;
- OOTRACEDBGC4("Local H.245 port is %d (%s, %s)\n",
+ OOTRACEDBGC4("Local H.245 port is %d (%s, %s)\n",
call->pH245Channel->port,
call->callType, call->callToken);
OOTRACEINFO5("Trying to connect to remote endpoint to setup H245 "
- "connection %s:%d(%s, %s)\n", call->remoteIP,
+ "connection %s:%d(%s, %s)\n", call->remoteIP,
call->remoteH245Port, call->callType, call->callToken);
-
+
if((ret=ooSocketConnect(channelSocket, call->remoteIP,
call->remoteH245Port))==ASN_OK)
{
@@ -155,7 +155,7 @@ int ooCreateH245Connection(OOH323CallData *call)
if(call->h245ConnectionAttempts >= 3)
{
OOTRACEERR3("Error:Failed to setup an H245 connection with remote "
- "destination. (%s, %s)\n", call->callType,
+ "destination. (%s, %s)\n", call->callType,
call->callToken);
if(call->callState < OO_CALL_CLEAR)
{
@@ -170,20 +170,20 @@ int ooCreateH245Connection(OOH323CallData *call)
"(%s, %s)\n", DEFAULT_H245CONNECTION_RETRYTIMEOUT,
call->callType, call->callToken);
- cbData = (ooTimerCallback*) memAlloc(call->pctxt,
+ cbData = (ooTimerCallback*) memAlloc(call->pctxt,
sizeof(ooTimerCallback));
if(!cbData)
{
OOTRACEERR3("Error:Unable to allocate memory for timer "
- "callback.(%s, %s)\n", call->callType,
+ "callback.(%s, %s)\n", call->callType,
call->callToken);
return OO_FAILED;
}
cbData->call = call;
cbData->timerType = OO_H245CONNECT_TIMER;
- if(!ooTimerCreate(call->pctxt, &call->timerList,
- &ooCallH245ConnectionRetryTimerExpired,
- DEFAULT_H245CONNECTION_RETRYTIMEOUT, cbData,
+ if(!ooTimerCreate(call->pctxt, &call->timerList,
+ &ooCallH245ConnectionRetryTimerExpired,
+ DEFAULT_H245CONNECTION_RETRYTIMEOUT, cbData,
FALSE))
{
OOTRACEERR3("Error:Unable to create H245 connection retry timer"
@@ -215,14 +215,14 @@ int ooSendH225Msg(OOH323CallData *call, Q931Message *msg)
iRet = ooEncodeH225Message(call, msg, (char *)encodebuf, MAXMSGLEN);
if(iRet != OO_OK)
{
- OOTRACEERR3("Error:Failed to encode H225 message. (%s, %s)\n",
+ OOTRACEERR3("Error:Failed to encode H225 message. (%s, %s)\n",
call->callType, call->callToken);
memFreePtr (call->pctxt, encodebuf);
return OO_FAILED;
}
/* If high priority messages, send immediately.*/
- if(encodebuf[0] == OOReleaseComplete ||
+ if(encodebuf[0] == OOReleaseComplete ||
(encodebuf[0]==OOFacility && encodebuf[1]==OOEndSessionCommand))
{
dListFreeAll(call->pctxt, &call->pH225Channel->outQueue);
@@ -231,10 +231,10 @@ int ooSendH225Msg(OOH323CallData *call, Q931Message *msg)
}
else{
dListAppend (call->pctxt, &call->pH225Channel->outQueue, encodebuf);
-
- OOTRACEDBGC4("Queued H225 messages %d. (%s, %s)\n",
- call->pH225Channel->outQueue.count,
- call->callType, call->callToken);
+
+ OOTRACEDBGC4("Queued H225 messages %d. (%s, %s)\n",
+ call->pH225Channel->outQueue.count,
+ call->callType, call->callToken);
}
return OO_OK;
}
@@ -259,20 +259,20 @@ int ooCreateH225Connection(OOH323CallData *call)
{
/*
bind socket to a port before connecting. Thus avoiding
- implicit bind done by a connect call. Avoided on windows as
+ implicit bind done by a connect call. Avoided on windows as
windows sockets have problem in reusing the addresses even after
setting SO_REUSEADDR, hence in windows we just allow os to bind
to any random port.
*/
#ifndef _WIN32
- ret = ooBindPort(OOTCP,channelSocket, call->localIP);
+ ret = ooBindPort(OOTCP,channelSocket, call->localIP);
#else
ret = ooBindOSAllocatedPort(channelSocket, call->localIP);
#endif
-
+
if(ret == OO_FAILED)
{
- OOTRACEERR3("Error:Unable to bind to a TCP port (%s, %s)\n",
+ OOTRACEERR3("Error:Unable to bind to a TCP port (%s, %s)\n",
call->callType, call->callToken);
if(call->callState < OO_CALL_CLEAR)
{
@@ -283,13 +283,13 @@ int ooCreateH225Connection(OOH323CallData *call)
}
if (0 == call->pH225Channel) {
- call->pH225Channel =
+ call->pH225Channel =
(OOH323Channel*) memAllocZ (call->pctxt, sizeof(OOH323Channel));
}
call->pH225Channel->port = ret;
OOTRACEINFO6("Trying to connect to remote endpoint(%s:%d) (IPv%d) to setup "
- "H2250 channel (%s, %s)\n", call->remoteIP,
+ "H2250 channel (%s, %s)\n", call->remoteIP,
call->remotePort, call->versionIP, call->callType, call->callToken);
if((ret=ooSocketConnect(channelSocket, call->remoteIP,
@@ -304,14 +304,14 @@ int ooCreateH225Connection(OOH323CallData *call)
if(!strcmp(call->localIP, "0.0.0.0") || !strcmp(call->localIP, "::"))
{
OOTRACEDBGA3("Determining IP address for outgoing call in "
- "multihomed mode. (%s, %s)\n", call->callType,
+ "multihomed mode. (%s, %s)\n", call->callType,
call->callToken);
- ret = ooSocketGetIpAndPort(channelSocket, call->localIP, 2+8*4+7,
+ ret = ooSocketGetIpAndPort(channelSocket, call->localIP, 2+8*4+7,
&call->pH225Channel->port, NULL);
if(ret != ASN_OK)
{
OOTRACEERR3("ERROR:Failed to retrieve local ip and port from "
- "socket for multihomed mode.(%s, %s)\n",
+ "socket for multihomed mode.(%s, %s)\n",
call->callType, call->callToken);
if(call->callState < OO_CALL_CLEAR)
{ /* transport failure */
@@ -321,7 +321,7 @@ int ooCreateH225Connection(OOH323CallData *call)
return OO_FAILED;
}
OOTRACEDBGA4("Using local ip %s for outgoing call(multihomedMode)."
- " (%s, %s)\n", call->localIP, call->callType,
+ " (%s, %s)\n", call->localIP, call->callType,
call->callToken);
}
return OO_OK;
@@ -377,12 +377,12 @@ int ooCreateH323Listener()
OOTRACEERR1("Failed to create socket for H323 Listener\n");
return OO_FAILED;
}
- if((ret=ooSocketBind (channelSocket, ipaddrs,
- gH323ep.listenPort))==ASN_OK)
+ if((ret=ooSocketBind (channelSocket, ipaddrs,
+ gH323ep.listenPort))==ASN_OK)
{
gH323ep.listener = (OOSOCKET*)memAlloc(&gH323ep.ctxt,sizeof(OOSOCKET));
*(gH323ep.listener) = channelSocket;
-
+
ooSocketListen(channelSocket,2048); /*listen on socket*/
OOTRACEINFO1("H323 listener creation - successful\n");
return OO_OK;
@@ -396,7 +396,7 @@ int ooCreateH323Listener()
-int ooAcceptH225Connection()
+int ooAcceptH225Connection()
{
OOH323CallData * call;
int ret;
@@ -405,7 +405,7 @@ int ooAcceptH225Connection()
OOSOCKET h225Channel=0;
memset(remoteIP, 0, sizeof(remoteIP));
- ret = ooSocketAccept (*(gH323ep.listener), &h225Channel,
+ ret = ooSocketAccept (*(gH323ep.listener), &h225Channel,
remoteIP, NULL);
if(ret != ASN_OK)
{
@@ -422,7 +422,7 @@ int ooAcceptH225Connection()
}
ast_mutex_lock(&call->Lock);
- call->pH225Channel = (OOH323Channel*)
+ call->pH225Channel = (OOH323Channel*)
memAllocZ (call->pctxt, sizeof(OOH323Channel));
call->pH225Channel->sock = h225Channel;
@@ -434,12 +434,12 @@ int ooAcceptH225Connection()
"mode (%s, %s)\n", call->callType, call->callToken);
}
- ret = ooSocketGetIpAndPort(h225Channel, call->localIP, 2+8*4+7,
+ ret = ooSocketGetIpAndPort(h225Channel, call->localIP, 2+8*4+7,
&call->pH225Channel->port, &call->versionIP);
if(ret != ASN_OK)
{
OOTRACEERR3("Error:Failed to retrieve local ip and port from "
- "socket for multihomed mode.(%s, %s)\n",
+ "socket for multihomed mode.(%s, %s)\n",
call->callType, call->callToken);
if(call->callState < OO_CALL_CLEAR)
{ /* transport failure */
@@ -450,13 +450,13 @@ int ooAcceptH225Connection()
return OO_FAILED;
}
OOTRACEDBGA5("Using Local IP address %s (IPv%d) for incoming call "
- "(%s, %s)\n", call->localIP, call->versionIP, call->callType,
+ "(%s, %s)\n", call->localIP, call->versionIP, call->callType,
call->callToken);
if (remoteIP[0]) {
strncpy(call->remoteIP, remoteIP, strlen(remoteIP));
}
-
+
ast_mutex_unlock(&call->Lock);
return OO_OK;
}
@@ -465,7 +465,7 @@ int ooAcceptH245Connection(OOH323CallData *call)
{
int ret;
OOSOCKET h245Channel=0;
- ret = ooSocketAccept (*(call->h245listener), &h245Channel,
+ ret = ooSocketAccept (*(call->h245listener), &h245Channel,
NULL, NULL);
if(ret != ASN_OK)
{
@@ -474,14 +474,14 @@ int ooAcceptH245Connection(OOH323CallData *call)
}
if (0 == call->pH245Channel) {
- call->pH245Channel =
+ call->pH245Channel =
(OOH323Channel*) memAllocZ (call->pctxt, sizeof(OOH323Channel));
}
- call->pH245Channel->sock = h245Channel;
+ call->pH245Channel->sock = h245Channel;
call->h245SessionState = OO_H245SESSION_ACTIVE;
- OOTRACEINFO3("H.245 connection established (%s, %s)\n",
+ OOTRACEINFO3("H.245 connection established (%s, %s)\n",
call->callType, call->callToken);
return OO_OK;
@@ -553,14 +553,14 @@ int ooSetCallFDSETs(OOH323CallData* call, struct pollfd* pfds, int *nfds)
pfds[*nfds].events = POLLIN;
if (call->pH225Channel->outQueue.count > 0 ||
- (OO_TESTFLAG (call->flags, OO_M_TUNNELING) &&
- 0 != call->pH245Channel &&
+ (OO_TESTFLAG (call->flags, OO_M_TUNNELING) &&
+ 0 != call->pH245Channel &&
call->pH245Channel->outQueue.count>0))
pfds[*nfds].events |= POLLOUT;
(*nfds)++;
}
-
+
if (0 != call->pH245Channel && call->pH245Channel->sock != 0) {
pfds[*nfds].fd = call->pH245Channel->sock;
pfds[*nfds].events = POLLIN;
@@ -581,7 +581,7 @@ int ooSetCallFDSETs(OOH323CallData* call, struct pollfd* pfds, int *nfds)
return OO_OK;
}
-
+
int ooProcessFDSETsAndTimers
(struct pollfd* pfds, int nfds, struct timeval *pToMin)
{
@@ -589,8 +589,8 @@ int ooProcessFDSETsAndTimers
/* Process gatekeeper client timers */
if(gH323ep.gkClient)
- {
- ooTimerFireExpired(&gH323ep.gkClient->ctxt,
+ {
+ ooTimerFireExpired(&gH323ep.gkClient->ctxt,
&gH323ep.gkClient->timerList);
if(ooTimerNextTimeout(&gH323ep.gkClient->timerList, &toNext))
{
@@ -627,10 +627,10 @@ int ooProcessFDSETsAndTimers
{
OOTRACEDBGA1("New connection at H225 receiver\n");
ooAcceptH225Connection();
- }
+ }
}
-
-
+
+
return OO_OK;
}
@@ -692,7 +692,7 @@ int ooProcessCallFDSETsAndTimers
OOTRACEDBGC3("Incoming H.245 connection (%s, %s)\n",
call->callType, call->callToken);
ooAcceptH245Connection(call);
- }
+ }
}
if (0 != call->pH225Channel && 0 != call->pH225Channel->sock)
@@ -701,21 +701,21 @@ int ooProcessCallFDSETsAndTimers
{
if (call->pH225Channel->outQueue.count>0)
{
- OOTRACEDBGC3("Sending H225 message (%s, %s)\n",
+ OOTRACEDBGC3("Sending H225 message (%s, %s)\n",
call->callType, call->callToken);
if (ooSendMsg(call, OOQ931MSG) != OO_OK)
OOTRACEERR1("Error in sending h225 message\n");
}
- if(call->pH245Channel &&
- call->pH245Channel->outQueue.count>0 &&
+ if(call->pH245Channel &&
+ call->pH245Channel->outQueue.count>0 &&
OO_TESTFLAG (call->flags, OO_M_TUNNELING)) {
OOTRACEDBGC3("H245 message needs to be tunneled. "
- "(%s, %s)\n", call->callType,
+ "(%s, %s)\n", call->callType,
call->callToken);
if (ooSendMsg(call, OOH245MSG) != OO_OK)
OOTRACEERR1("Error in sending h245 message\n");
}
- }
+ }
}
if(ooTimerNextTimeout(&call->timerList, &toNext))
@@ -743,7 +743,7 @@ int ooProcessCallFDSETsAndTimers
return OO_OK;
}
-
+
int ooMonitorCmdChannels()
{
int ret=0, nfds=0;
@@ -754,7 +754,7 @@ int ooMonitorCmdChannels()
toMin.tv_sec = 3;
toMin.tv_usec = 0;
-
+
while(1)
{
nfds = 0;
@@ -765,7 +765,7 @@ int ooMonitorCmdChannels()
break;
}
-
+
if(nfds == 0)
#ifdef _WIN32
Sleep(10);
@@ -778,12 +778,12 @@ int ooMonitorCmdChannels()
#endif
else
ret = ooSocketPoll(pfds, nfds, toMin.tv_sec * 1000 + toMin.tv_usec / 1000);
-
+
if(ret == -1)
{
-
+
OOTRACEERR1("Error in poll ...exiting\n");
- exit(-1);
+ exit(-1);
continue;
}
@@ -814,7 +814,7 @@ int ooMonitorChannels()
toMin.tv_sec = 3;
toMin.tv_usec = 0;
ooH323EpPrintConfig();
-
+
if(gH323ep.gkClient) {
ooGkClientPrintConfig(gH323ep.gkClient);
if(OO_OK != ooGkClientStart(gH323ep.gkClient))
@@ -824,7 +824,7 @@ int ooMonitorChannels()
// ooGkClientDestroy();
}
}
-
+
while(1)
{
nfds = 0;
@@ -835,7 +835,7 @@ int ooMonitorChannels()
break;
}
-
+
if(nfds == 0)
#ifdef _WIN32
Sleep(10);
@@ -848,10 +848,10 @@ int ooMonitorChannels()
#endif
else
ret = ooSocketPoll(pfds, nfds, toMin.tv_sec * 1000 + toMin.tv_usec / 1000);
-
+
if(ret == -1)
{
-
+
OOTRACEERR1("Error in poll ...exiting\n");
exit(-1);
}
@@ -859,7 +859,7 @@ int ooMonitorChannels()
toMin.tv_sec = 2; /* 2 sec */
toMin.tv_usec = 100000; /* 100ms*/
/*This is for test application. Not part of actual stack */
-
+
ast_mutex_lock(&monitorLock);
ooTimerFireExpired(&gH323ep.ctxt, &g_TimerList);
if(ooTimerNextTimeout(&g_TimerList, &toNext))
@@ -895,7 +895,7 @@ int ooMonitorCallChannels(OOH323CallData *call)
toMin.tv_sec = 3;
toMin.tv_usec = 0;
-
+
while(1)
{
if(!call->Monitor) {
@@ -906,7 +906,7 @@ int ooMonitorCallChannels(OOH323CallData *call)
nfds = 0;
ooSetCallFDSETs(call, pfds, &nfds);
-
+
if(nfds == 0)
#ifdef _WIN32
Sleep(10);
@@ -924,10 +924,10 @@ int ooMonitorCallChannels(OOH323CallData *call)
#endif
else
ret = ooSocketPoll(pfds, nfds, toMin.tv_sec * 1000 + toMin.tv_usec / 1000);
-
+
if(ret == -1)
{
-
+
OOTRACEERR2("Error in poll %d ...exiting\n", errno);
call->callEndReason = OO_REASON_INVALIDMESSAGE;
call->callState = OO_CALL_CLEARED;
@@ -940,7 +940,7 @@ int ooMonitorCallChannels(OOH323CallData *call)
toMin.tv_sec = 2; /* 2 sec */
toMin.tv_usec = 100000; /* 100ms*/
/*This is for test application. Not part of actual stack */
-
+
if(ooProcessCallFDSETsAndTimers(call, pfds, nfds, &toMin) != OO_OK)
{
ooStopMonitorCallChannels(call);
@@ -971,10 +971,10 @@ int ooH2250Receive(OOH323CallData *call)
int len;
Q931Message *pmsg;
OOCTXT *pctxt = call->msgctxt;
-
+
struct timeval timeout;
-
+
pmsg = (Q931Message*)memAlloc(pctxt, sizeof(Q931Message));
if(!pmsg)
{
@@ -1002,13 +1002,13 @@ int ooH2250Receive(OOH323CallData *call)
if(call->callState < OO_CALL_CLEAR)
call->callEndReason = OO_REASON_TRANSPORTFAILURE;
call->callState = OO_CALL_CLEARED;
-
+
}
ooFreeQ931Message(pctxt, pmsg);
return OO_OK;
}
OOTRACEDBGC3("Receiving H.2250 message (%s, %s)\n",
- call->callType, call->callToken);
+ call->callType, call->callToken);
/* Since we are working with TCP, need to determine the
message boundary. Has to be done at channel level, as channels
know the message formats and can determine boundaries
@@ -1016,7 +1016,7 @@ int ooH2250Receive(OOH323CallData *call)
if(recvLen != 4)
{
OOTRACEERR4("Error: Reading TPKT header for H225 message "
- "recvLen= %d (%s, %s)\n", recvLen, call->callType,
+ "recvLen= %d (%s, %s)\n", recvLen, call->callType,
call->callToken);
ooFreeQ931Message(pctxt, pmsg);
if(call->callState < OO_CALL_CLEAR)
@@ -1027,7 +1027,7 @@ int ooH2250Receive(OOH323CallData *call)
return OO_FAILED;
}
-
+
len = message[2];
len = len<<8;
len = len | message[3];
@@ -1037,7 +1037,7 @@ int ooH2250Receive(OOH323CallData *call)
if(len > MAXMSGLEN - 4)
{
OOTRACEERR4("Error: Invalid TPKT header for H225 message "
- "Len = %d (%s, %s)\n", len, call->callType,
+ "Len = %d (%s, %s)\n", len, call->callType,
call->callToken);
ooCloseH225Connection(call);
ooFreeQ931Message(pctxt, pmsg);
@@ -1050,7 +1050,7 @@ int ooH2250Receive(OOH323CallData *call)
}
/* Now read actual Q931 message body. We should make sure that we
- receive complete message as indicated by len. If we don't then there
+ receive complete message as indicated by len. If we don't then there
is something wrong. The loop below receives message, then checks whether
complete message is received. If not received, then uses select to peek
for remaining bytes of the message. If message is not received in 3
@@ -1059,7 +1059,7 @@ int ooH2250Receive(OOH323CallData *call)
while(total < len)
{
struct pollfd pfds;
-
+
pfds.fd = call->pH225Channel->sock;
pfds.events = POLLIN;
timeout.tv_sec = 3;
@@ -1068,7 +1068,7 @@ int ooH2250Receive(OOH323CallData *call)
if(ret == -1)
{
OOTRACEERR3("Error in select while receiving H.2250 message - "
- "clearing call (%s, %s)\n", call->callType,
+ "clearing call (%s, %s)\n", call->callType,
call->callToken);
ooFreeQ931Message(pctxt, pmsg);
if(call->callState < OO_CALL_CLEAR)
@@ -1088,7 +1088,7 @@ int ooH2250Receive(OOH323CallData *call)
ooFreeQ931Message(pctxt, pmsg);
if(call->callState < OO_CALL_CLEAR)
{
- call->callEndReason = OO_REASON_INVALIDMESSAGE;
+ call->callEndReason = OO_REASON_INVALIDMESSAGE;
call->callState = OO_CALL_CLEAR;
}
return OO_FAILED;
@@ -1097,7 +1097,7 @@ int ooH2250Receive(OOH323CallData *call)
recvLen = ooSocketRecv (call->pH225Channel->sock, message1, len-total);
if (recvLen == 0) {
OOTRACEERR3("Error in read while receiving H.2250 message - "
- "clearing call (%s, %s)\n", call->callType,
+ "clearing call (%s, %s)\n", call->callType,
call->callToken);
ooFreeQ931Message(pctxt, pmsg);
if(call->callState < OO_CALL_CLEAR)
@@ -1112,7 +1112,7 @@ int ooH2250Receive(OOH323CallData *call)
}
- OOTRACEDBGC3("Received Q.931 message: (%s, %s)\n",
+ OOTRACEDBGC3("Received Q.931 message: (%s, %s)\n",
call->callType, call->callToken);
initializePrintHandler(&printHandler, "Received H.2250 Message");
@@ -1123,7 +1123,7 @@ int ooH2250Receive(OOH323CallData *call)
OOTRACEERR3("Error:Failed to decode received H.2250 message. (%s, %s)\n",
call->callType, call->callToken);
}
- OOTRACEDBGC3("Decoded Q931 message (%s, %s)\n", call->callType,
+ OOTRACEDBGC3("Decoded Q931 message (%s, %s)\n", call->callType,
call->callToken);
finishPrint();
removeEventHandler(pctxt);
@@ -1144,7 +1144,7 @@ int ooH245Receive(OOH323CallData *call)
/* OOCTXT *pctxt = &gH323ep.msgctxt; */
OOCTXT *pctxt = call->pctxt;
struct timeval timeout;
-
+
pmsg = (H245Message*)memAlloc(pctxt, sizeof(H245Message));
/* First read just TPKT header which is four bytes */
@@ -1171,7 +1171,7 @@ int ooH245Receive(OOH323CallData *call)
}
return OO_FAILED;
}
- if(call->h245SessionState == OO_H245SESSION_PAUSED)
+ if(call->h245SessionState == OO_H245SESSION_PAUSED)
{
ooLogicalChannel *temp;
@@ -1218,7 +1218,7 @@ int ooH245Receive(OOH323CallData *call)
/* Remaining message length is length - tpkt length */
len = len - 4;
/* Now read actual H245 message body. We should make sure that we
- receive complete message as indicated by len. If we don't then there
+ receive complete message as indicated by len. If we don't then there
is something wrong. The loop below receives message, then checks whether
complete message is received. If not received, then uses select to peek
for remaining bytes of the message. If message is not received in 3
@@ -1263,7 +1263,7 @@ int ooH245Receive(OOH323CallData *call)
}
return OO_FAILED;
}
- /* If remaining part of the message is not received in 3 seconds
+ /* If remaining part of the message is not received in 3 seconds
exit */
if(!ooPDRead(&pfds, 1, call->pH245Channel->sock))
{
@@ -1279,7 +1279,7 @@ int ooH245Receive(OOH323CallData *call)
}
}
- OOTRACEDBGC3("Complete H245 message received (%s, %s)\n",
+ OOTRACEDBGC3("Complete H245 message received (%s, %s)\n",
call->callType, call->callToken);
setPERBuffer(pctxt, message, recvLen, aligned);
initializePrintHandler(&printHandler, "Received H.245 Message");
@@ -1290,45 +1290,45 @@ int ooH245Receive(OOH323CallData *call)
ret = asn1PD_H245MultimediaSystemControlMessage(pctxt, &(pmsg->h245Msg));
if(ret != ASN_OK)
{
- OOTRACEERR3("Error decoding H245 message (%s, %s)\n",
+ OOTRACEERR3("Error decoding H245 message (%s, %s)\n",
call->callType, call->callToken);
ooFreeH245Message(call, pmsg);
return OO_FAILED;
}
finishPrint();
- removeEventHandler(pctxt);
+ removeEventHandler(pctxt);
ooHandleH245Message(call, pmsg);
return OO_OK;
}
/* Generic Send Message functionality. Based on type of message to be sent,
- it calls the corresponding function to retrieve the message buffer and
+ it calls the corresponding function to retrieve the message buffer and
then transmits on the associated channel
Interpreting msgptr:
Q931 messages except facility
1st octet - msgType, next 4 octets - tpkt header,
followed by encoded msg
Q931 message facility
- 1st octect - OOFacility, 2nd octet - tunneled msg
- type(in case no tunneled msg - OOFacility),
- 3rd and 4th octet - associated logical channel
- of the tunneled msg(0 when no channel is
- associated. ex. in case of MSD, TCS), next
- 4 octets - tpkt header, followed by encoded
+ 1st octect - OOFacility, 2nd octet - tunneled msg
+ type(in case no tunneled msg - OOFacility),
+ 3rd and 4th octet - associated logical channel
+ of the tunneled msg(0 when no channel is
+ associated. ex. in case of MSD, TCS), next
+ 4 octets - tpkt header, followed by encoded
message.
H.245 messages no tunneling
- 1st octet - msg type, next two octets - logical
+ 1st octet - msg type, next two octets - logical
channel number(0, when no channel is associated),
next two octets - total length of the message
(including tpkt header)
H.245 messages - tunneling.
- 1st octet - msg type, next two octets - logical
+ 1st octet - msg type, next two octets - logical
channel number(0, when no channel is associated),
- next two octets - total length of the message.
+ next two octets - total length of the message.
Note, no tpkt header is present in this case.
-
+
*/
int ooSendMsg(OOH323CallData *call, int type)
{
@@ -1336,7 +1336,7 @@ int ooSendMsg(OOH323CallData *call, int type)
int len=0, ret=0, msgType=0, tunneledMsgType=0, logicalChannelNo = 0;
DListNode * p_msgNode=NULL;
ASN1OCTET *msgptr, *msgToSend=NULL;
-
+
if(call->callState == OO_CALL_CLEARED)
@@ -1350,12 +1350,12 @@ int ooSendMsg(OOH323CallData *call, int type)
{
if(call->pH225Channel->outQueue.count == 0)
{
- OOTRACEWARN3("WARN:No H.2250 message to send. (%s, %s)\n",
+ OOTRACEWARN3("WARN:No H.2250 message to send. (%s, %s)\n",
call->callType, call->callToken);
return OO_FAILED;
}
- OOTRACEDBGA3("Sending Q931 message (%s, %s)\n", call->callType,
+ OOTRACEDBGA3("Sending Q931 message (%s, %s)\n", call->callType,
call->callToken);
p_msgNode = call->pH225Channel->outQueue.head;
msgptr = (ASN1OCTET*) p_msgNode->data;
@@ -1383,10 +1383,10 @@ int ooSendMsg(OOH323CallData *call, int type)
dListRemove(&(call->pH225Channel->outQueue), p_msgNode);
if(p_msgNode)
memFreePtr(call->pctxt, p_msgNode);
-
+
/*TODO: This is not required ideally. We will see for some time and if
we don't face any problems we will delete this code */
-#if 0
+#if 0
/* Check whether connection with remote is alright */
if(!ooChannelsIsConnectionOK(call, call->pH225Channel->sock))
{
@@ -1398,19 +1398,19 @@ int ooSendMsg(OOH323CallData *call, int type)
call->callState = OO_CALL_CLEARED;
return OO_OK;
}
-#endif
- /* Send message out via TCP */
+#endif
+ /* Send message out via TCP */
ret = ooSocketSend(call->pH225Channel->sock, msgToSend, len);
if(ret == ASN_OK)
{
memFreePtr (call->pctxt, msgptr);
- OOTRACEDBGC3("H2250/Q931 Message sent successfully (%s, %s)\n",
+ OOTRACEDBGC3("H2250/Q931 Message sent successfully (%s, %s)\n",
call->callType, call->callToken);
ooOnSendMsg(call, msgType, tunneledMsgType, logicalChannelNo);
return OO_OK;
}
else{
- OOTRACEERR3("H2250Q931 Message send failed (%s, %s)\n",
+ OOTRACEERR3("H2250Q931 Message send failed (%s, %s)\n",
call->callType, call->callToken);
memFreePtr (call->pctxt, msgptr);
if(call->callState < OO_CALL_CLEAR)
@@ -1426,11 +1426,11 @@ int ooSendMsg(OOH323CallData *call, int type)
{
if(call->pH245Channel->outQueue.count == 0)
{
- OOTRACEWARN3("WARN:No H.245 message to send. (%s, %s)\n",
+ OOTRACEWARN3("WARN:No H.245 message to send. (%s, %s)\n",
call->callType, call->callToken);
return OO_FAILED;
}
- OOTRACEDBGA3("Sending H245 message (%s, %s)\n", call->callType,
+ OOTRACEDBGA3("Sending H245 message (%s, %s)\n", call->callType,
call->callToken);
p_msgNode = call->pH245Channel->outQueue.head;
msgptr = (ASN1OCTET*) p_msgNode->data;
@@ -1462,25 +1462,25 @@ int ooSendMsg(OOH323CallData *call, int type)
}
return OO_OK;
}
-
+
if (0 != call->pH245Channel && 0 != call->pH245Channel->sock)
{
OOTRACEDBGC4("Sending %s H245 message over H.245 channel. "
- "(%s, %s)\n", ooGetMsgTypeText(msgType),
+ "(%s, %s)\n", ooGetMsgTypeText(msgType),
call->callType, call->callToken);
ret = ooSocketSend(call->pH245Channel->sock, msgptr+5, len);
if(ret == ASN_OK)
{
memFreePtr (call->pctxt, msgptr);
- OOTRACEDBGA3("H245 Message sent successfully (%s, %s)\n",
+ OOTRACEDBGA3("H245 Message sent successfully (%s, %s)\n",
call->callType, call->callToken);
ooOnSendMsg(call, msgType, tunneledMsgType, logicalChannelNo);
return OO_OK;
}
else{
memFreePtr (call->pctxt, msgptr);
- OOTRACEERR3("ERROR:H245 Message send failed (%s, %s)\n",
+ OOTRACEERR3("ERROR:H245 Message send failed (%s, %s)\n",
call->callType, call->callToken);
if(call->callState < OO_CALL_CLEAR)
{
@@ -1492,7 +1492,7 @@ int ooSendMsg(OOH323CallData *call, int type)
}
else if(OO_TESTFLAG (call->flags, OO_M_TUNNELING)) {
OOTRACEDBGC4("Sending %s H245 message as a tunneled message."
- "(%s, %s)\n", ooGetMsgTypeText(msgType),
+ "(%s, %s)\n", ooGetMsgTypeText(msgType),
call->callType, call->callToken);
ret = ooSendAsTunneledMessage
@@ -1518,11 +1518,11 @@ int ooSendMsg(OOH323CallData *call, int type)
OOTRACEWARN3("ERROR:Unknown message type - message not Sent (%s, %s)\n",
call->callType, call->callToken);
return OO_FAILED;
-}
+}
int ooCloseH245Connection(OOH323CallData *call)
{
- OOTRACEINFO3("Closing H.245 connection (%s, %s)\n", call->callType,
+ OOTRACEINFO3("Closing H.245 connection (%s, %s)\n", call->callType,
call->callToken);
if (0 != call->pH245Channel)
@@ -1533,7 +1533,7 @@ int ooCloseH245Connection(OOH323CallData *call)
dListFreeAll(call->pctxt, &(call->pH245Channel->outQueue));
memFreePtr (call->pctxt, call->pH245Channel);
call->pH245Channel = NULL;
- OOTRACEDBGC3("Closed H245 connection. (%s, %s)\n", call->callType,
+ OOTRACEDBGC3("Closed H245 connection. (%s, %s)\n", call->callType,
call->callToken);
}
call->h245SessionState = OO_H245SESSION_CLOSED;
@@ -1543,7 +1543,7 @@ int ooCloseH245Connection(OOH323CallData *call)
int ooCloseH245Listener(OOH323CallData *call)
{
- OOTRACEINFO3("Closing H.245 Listener (%s, %s)\n", call->callType,
+ OOTRACEINFO3("Closing H.245 Listener (%s, %s)\n", call->callType,
call->callToken);
if(call->h245listener)
{
@@ -1561,10 +1561,10 @@ int ooOnSendMsg
switch(msgType)
{
case OOSetup:
- OOTRACEINFO3("Sent Message - Setup (%s, %s)\n", call->callType,
+ OOTRACEINFO3("Sent Message - Setup (%s, %s)\n", call->callType,
call->callToken);
/* Start call establishment timer */
- cbData = (ooTimerCallback*) memAlloc(call->pctxt,
+ cbData = (ooTimerCallback*) memAlloc(call->pctxt,
sizeof(ooTimerCallback));
if(!cbData)
{
@@ -1614,7 +1614,7 @@ int ooOnSendMsg
call->callState = OO_CALL_CLEARED;
else{
call->callState = OO_CALL_CLEAR_RELEASESENT;
- if(gH323ep.gkClient && !OO_TESTFLAG(call->flags, OO_M_DISABLEGK) &&
+ if(gH323ep.gkClient && !OO_TESTFLAG(call->flags, OO_M_DISABLEGK) &&
gH323ep.gkClient->state == GkClientRegistered){
OOTRACEDBGA3("Sending DRQ after sending ReleaseComplete."
"(%s, %s)\n", call->callType, call->callToken);
@@ -1624,10 +1624,10 @@ int ooOnSendMsg
}
}
- if(call->callState == OO_CALL_CLEAR_RELEASESENT &&
+ if(call->callState == OO_CALL_CLEAR_RELEASESENT &&
call->h245SessionState == OO_H245SESSION_IDLE)
{
- cbData = (ooTimerCallback*) memAlloc(call->pctxt,
+ cbData = (ooTimerCallback*) memAlloc(call->pctxt,
sizeof(ooTimerCallback));
if(!cbData)
{
@@ -1638,11 +1638,11 @@ int ooOnSendMsg
cbData->call = call;
cbData->timerType = OO_SESSION_TIMER;
cbData->channelNumber = 0;
- if(!ooTimerCreate(call->pctxt, &call->timerList,
+ if(!ooTimerCreate(call->pctxt, &call->timerList,
&ooSessionTimerExpired, gH323ep.sessionTimeout, cbData, FALSE))
{
OOTRACEERR3("Error:Unable to create EndSession timer- "
- "ReleaseComplete.(%s, %s)\n", call->callType,
+ "ReleaseComplete.(%s, %s)\n", call->callType,
call->callToken);
memFreePtr(call->pctxt, cbData);
return OO_FAILED;
@@ -1658,12 +1658,12 @@ int ooOnSendMsg
case OOFacility:
if(tunneledMsgType == OOFacility)
{
- OOTRACEINFO3("Sent Message - Facility. (%s, %s)\n",
+ OOTRACEINFO3("Sent Message - Facility. (%s, %s)\n",
call->callType, call->callToken);
}
else{
- OOTRACEINFO4("Sent Message - Facility(%s) (%s, %s)\n",
- ooGetMsgTypeText(tunneledMsgType),
+ OOTRACEINFO4("Sent Message - Facility(%s) (%s, %s)\n",
+ ooGetMsgTypeText(tunneledMsgType),
call->callType, call->callToken);
ooOnSendMsg(call, tunneledMsgType, 0, associatedChan);
@@ -1672,13 +1672,13 @@ int ooOnSendMsg
case OOMasterSlaveDetermination:
if(OO_TESTFLAG (call->flags, OO_M_TUNNELING))
- OOTRACEINFO3("Tunneled Message - MasterSlaveDetermination (%s, %s)\n",
+ OOTRACEINFO3("Tunneled Message - MasterSlaveDetermination (%s, %s)\n",
call->callType, call->callToken);
else
- OOTRACEINFO3("Sent Message - MasterSlaveDetermination (%s, %s)\n",
+ OOTRACEINFO3("Sent Message - MasterSlaveDetermination (%s, %s)\n",
call->callType, call->callToken);
/* Start MSD timer */
- cbData = (ooTimerCallback*) memAlloc(call->pctxt,
+ cbData = (ooTimerCallback*) memAlloc(call->pctxt,
sizeof(ooTimerCallback));
if(!cbData)
{
@@ -1703,7 +1703,7 @@ int ooOnSendMsg
OOTRACEINFO3("Tunneled Message - MasterSlaveDeterminationAck (%s, %s)"
"\n", call->callType, call->callToken);
else
- OOTRACEINFO3("Sent Message - MasterSlaveDeterminationAck (%s, %s)\n",
+ OOTRACEINFO3("Sent Message - MasterSlaveDeterminationAck (%s, %s)\n",
call->callType, call->callToken);
break;
case OOMasterSlaveReject:
@@ -1724,21 +1724,21 @@ int ooOnSendMsg
break;
case OOTerminalCapabilitySet:
if(OO_TESTFLAG (call->flags, OO_M_TUNNELING)) {
- /* If session isn't marked active yet, do it. possible in case of
+ /* If session isn't marked active yet, do it. possible in case of
tunneling */
if(call->h245SessionState == OO_H245SESSION_IDLE ||
call->h245SessionState == OO_H245SESSION_PAUSED) {
call->h245SessionState = OO_H245SESSION_ACTIVE;
}
- OOTRACEINFO3("Tunneled Message - TerminalCapabilitySet (%s, %s)\n",
+ OOTRACEINFO3("Tunneled Message - TerminalCapabilitySet (%s, %s)\n",
call->callType, call->callToken);
}
else {
- OOTRACEINFO3("Sent Message - TerminalCapabilitySet (%s, %s)\n",
+ OOTRACEINFO3("Sent Message - TerminalCapabilitySet (%s, %s)\n",
call->callType, call->callToken);
}
/* Start TCS timer */
- cbData = (ooTimerCallback*) memAlloc(call->pctxt,
+ cbData = (ooTimerCallback*) memAlloc(call->pctxt,
sizeof(ooTimerCallback));
if(!cbData)
{
@@ -1764,7 +1764,7 @@ int ooOnSendMsg
OOTRACEINFO3("Tunneled Message - TerminalCapabilitySetAck (%s, %s)\n",
call->callType, call->callToken);
else
- OOTRACEINFO3("Sent Message - TerminalCapabilitySetAck (%s, %s)\n",
+ OOTRACEINFO3("Sent Message - TerminalCapabilitySetAck (%s, %s)\n",
call->callType, call->callToken);
break;
case OOTerminalCapabilitySetReject:
@@ -1772,18 +1772,18 @@ int ooOnSendMsg
OOTRACEINFO3("Tunneled Message - TerminalCapabilitySetReject "
"(%s, %s)\n", call->callType, call->callToken);
else
- OOTRACEINFO3("Sent Message - TerminalCapabilitySetReject (%s, %s)\n",
+ OOTRACEINFO3("Sent Message - TerminalCapabilitySetReject (%s, %s)\n",
call->callType, call->callToken);
break;
case OOOpenLogicalChannel:
if(OO_TESTFLAG (call->flags, OO_M_TUNNELING))
- OOTRACEINFO4("Tunneled Message - OpenLogicalChannel(%d). (%s, %s)\n",
+ OOTRACEINFO4("Tunneled Message - OpenLogicalChannel(%d). (%s, %s)\n",
associatedChan, call->callType, call->callToken);
else
- OOTRACEINFO4("Sent Message - OpenLogicalChannel(%d). (%s, %s)\n",
+ OOTRACEINFO4("Sent Message - OpenLogicalChannel(%d). (%s, %s)\n",
associatedChan, call->callType, call->callToken);
/* Start LogicalChannel timer */
- cbData = (ooTimerCallback*) memAlloc(call->pctxt,
+ cbData = (ooTimerCallback*) memAlloc(call->pctxt,
sizeof(ooTimerCallback));
if(!cbData)
{
@@ -1794,8 +1794,8 @@ int ooOnSendMsg
cbData->call = call;
cbData->timerType = OO_OLC_TIMER;
cbData->channelNumber = associatedChan;
- if(!ooTimerCreate(call->pctxt, &call->timerList,
- &ooOpenLogicalChannelTimerExpired, gH323ep.logicalChannelTimeout,
+ if(!ooTimerCreate(call->pctxt, &call->timerList,
+ &ooOpenLogicalChannelTimerExpired, gH323ep.logicalChannelTimeout,
cbData, FALSE))
{
OOTRACEERR3("Error:Unable to create OpenLogicalChannel timer. "
@@ -1803,20 +1803,20 @@ int ooOnSendMsg
memFreePtr(call->pctxt, cbData);
return OO_FAILED;
}
-
+
break;
case OOOpenLogicalChannelAck:
if(OO_TESTFLAG (call->flags, OO_M_TUNNELING))
OOTRACEINFO4("Tunneled Message - OpenLogicalChannelAck(%d) (%s,%s)\n",
associatedChan, call->callType, call->callToken);
else
- OOTRACEINFO4("Sent Message - OpenLogicalChannelAck(%d) (%s, %s)\n",
+ OOTRACEINFO4("Sent Message - OpenLogicalChannelAck(%d) (%s, %s)\n",
associatedChan, call->callType, call->callToken);
break;
case OOOpenLogicalChannelReject:
if(OO_TESTFLAG (call->flags, OO_M_TUNNELING))
OOTRACEINFO4("Tunneled Message - OpenLogicalChannelReject(%d)"
- "(%s, %s)\n", associatedChan, call->callType,
+ "(%s, %s)\n", associatedChan, call->callType,
call->callToken);
else
OOTRACEINFO4("Sent Message - OpenLogicalChannelReject(%d) (%s, %s)\n",
@@ -1824,16 +1824,16 @@ int ooOnSendMsg
break;
case OOEndSessionCommand:
if(OO_TESTFLAG (call->flags, OO_M_TUNNELING))
- OOTRACEINFO3("Tunneled Message - EndSessionCommand(%s, %s)\n",
+ OOTRACEINFO3("Tunneled Message - EndSessionCommand(%s, %s)\n",
call->callType, call->callToken);
else
- OOTRACEINFO3("Sent Message - EndSessionCommand (%s, %s)\n",
+ OOTRACEINFO3("Sent Message - EndSessionCommand (%s, %s)\n",
call->callType, call->callToken);
if((call->h245SessionState == OO_H245SESSION_ACTIVE))
- {
+ {
/* Start EndSession timer */
call->h245SessionState = OO_H245SESSION_ENDSENT;
- cbData = (ooTimerCallback*) memAlloc(call->pctxt,
+ cbData = (ooTimerCallback*) memAlloc(call->pctxt,
sizeof(ooTimerCallback));
if(!cbData)
{
@@ -1844,7 +1844,7 @@ int ooOnSendMsg
cbData->call = call;
cbData->timerType = OO_SESSION_TIMER;
cbData->channelNumber = 0;
- if(!ooTimerCreate(call->pctxt, &call->timerList,
+ if(!ooTimerCreate(call->pctxt, &call->timerList,
&ooSessionTimerExpired, gH323ep.sessionTimeout, cbData, FALSE))
{
OOTRACEERR3("Error:Unable to create EndSession timer. "
@@ -1861,13 +1861,13 @@ int ooOnSendMsg
break;
case OOCloseLogicalChannel:
if(OO_TESTFLAG (call->flags, OO_M_TUNNELING))
- OOTRACEINFO3("Tunneled Message - CloseLogicalChannel (%s, %s)\n",
+ OOTRACEINFO3("Tunneled Message - CloseLogicalChannel (%s, %s)\n",
call->callType, call->callToken);
else
- OOTRACEINFO3("Sent Message - CloseLogicalChannel (%s, %s)\n",
+ OOTRACEINFO3("Sent Message - CloseLogicalChannel (%s, %s)\n",
call->callType, call->callToken);
/* Start LogicalChannel timer */
- cbData = (ooTimerCallback*) memAlloc(call->pctxt,
+ cbData = (ooTimerCallback*) memAlloc(call->pctxt,
sizeof(ooTimerCallback));
if(!cbData)
{
@@ -1878,8 +1878,8 @@ int ooOnSendMsg
cbData->call = call;
cbData->timerType = OO_CLC_TIMER;
cbData->channelNumber = associatedChan;
- if(!ooTimerCreate(call->pctxt, &call->timerList,
- &ooCloseLogicalChannelTimerExpired, gH323ep.logicalChannelTimeout,
+ if(!ooTimerCreate(call->pctxt, &call->timerList,
+ &ooCloseLogicalChannelTimerExpired, gH323ep.logicalChannelTimeout,
cbData, FALSE))
{
OOTRACEERR3("Error:Unable to create CloseLogicalChannel timer. "
@@ -1887,25 +1887,25 @@ int ooOnSendMsg
memFreePtr(call->pctxt, cbData);
return OO_FAILED;
}
-
+
break;
case OOCloseLogicalChannelAck:
if(OO_TESTFLAG (call->flags, OO_M_TUNNELING))
- OOTRACEINFO3("Tunneled Message - CloseLogicalChannelAck (%s, %s)\n",
+ OOTRACEINFO3("Tunneled Message - CloseLogicalChannelAck (%s, %s)\n",
call->callType, call->callToken);
else
- OOTRACEINFO3("Sent Message - CloseLogicalChannelAck (%s, %s)\n",
+ OOTRACEINFO3("Sent Message - CloseLogicalChannelAck (%s, %s)\n",
call->callType, call->callToken);
break;
case OORequestChannelClose:
if(OO_TESTFLAG (call->flags, OO_M_TUNNELING))
- OOTRACEINFO3("Tunneled Message - RequestChannelClose (%s, %s)\n",
+ OOTRACEINFO3("Tunneled Message - RequestChannelClose (%s, %s)\n",
call->callType, call->callToken);
else
- OOTRACEINFO3("Sent Message - RequestChannelClose (%s, %s)\n",
+ OOTRACEINFO3("Sent Message - RequestChannelClose (%s, %s)\n",
call->callType, call->callToken);
/* Start RequestChannelClose timer */
- cbData = (ooTimerCallback*) memAlloc(call->pctxt,
+ cbData = (ooTimerCallback*) memAlloc(call->pctxt,
sizeof(ooTimerCallback));
if(!cbData)
{
@@ -1916,8 +1916,8 @@ int ooOnSendMsg
cbData->call = call;
cbData->timerType = OO_RCC_TIMER;
cbData->channelNumber = associatedChan;
- if(!ooTimerCreate(call->pctxt, &call->timerList,
- &ooRequestChannelCloseTimerExpired, gH323ep.logicalChannelTimeout,
+ if(!ooTimerCreate(call->pctxt, &call->timerList,
+ &ooRequestChannelCloseTimerExpired, gH323ep.logicalChannelTimeout,
cbData, FALSE))
{
OOTRACEERR3("Error:Unable to create RequestChannelClose timer. "
@@ -1928,13 +1928,13 @@ int ooOnSendMsg
break;
case OORequestChannelCloseAck:
if(OO_TESTFLAG (call->flags, OO_M_TUNNELING))
- OOTRACEINFO3("Tunneled Message - RequestChannelCloseAck (%s, %s)\n",
+ OOTRACEINFO3("Tunneled Message - RequestChannelCloseAck (%s, %s)\n",
call->callType, call->callToken);
else
- OOTRACEINFO3("Sent Message - RequestChannelCloseAck (%s, %s)\n",
+ OOTRACEINFO3("Sent Message - RequestChannelCloseAck (%s, %s)\n",
call->callType, call->callToken);
break;
-
+
default:
;
}
@@ -1965,7 +1965,7 @@ int ooStopMonitorCalls()
call = gH323ep.callList;
while(call)
{
- OOTRACEWARN3("Clearing call (%s, %s)\n", call->callType,
+ OOTRACEWARN3("Clearing call (%s, %s)\n", call->callType,
call->callToken);
call->callEndReason = OO_REASON_LOCAL_CLEARED;
ooCleanCall(call);
@@ -1974,7 +1974,7 @@ int ooStopMonitorCalls()
}
gH323ep.callList = NULL;
}
- OOTRACEINFO1("Stopping listener for incoming calls\n");
+ OOTRACEINFO1("Stopping listener for incoming calls\n");
if(gH323ep.listener)
{
ooSocketClose(*(gH323ep.listener));
@@ -2007,7 +2007,7 @@ OOBOOL ooChannelsIsConnectionOK(OOH323CallData *call, OOSOCKET sock)
char buf[2];
if(ooSocketRecvPeek(sock, (ASN1OCTET*) buf, 2) == 0)
{
- OOTRACEWARN3("Broken pipe detected. (%s, %s)", call->callType,
+ OOTRACEWARN3("Broken pipe detected. (%s, %s)", call->callType,
call->callToken);
if(call->callState < OO_CALL_CLEAR)
call->callEndReason = OO_REASON_TRANSPORTFAILURE;
@@ -2016,4 +2016,4 @@ OOBOOL ooChannelsIsConnectionOK(OOH323CallData *call, OOSOCKET sock)
}
}
return TRUE;
-}
+}