summaryrefslogtreecommitdiff
path: root/addons
diff options
context:
space:
mode:
authorSean Bright <sean.bright@gmail.com>2017-12-22 09:23:22 -0500
committerSean Bright <sean.bright@gmail.com>2017-12-22 09:23:22 -0500
commitfd0ca1c3f9b972a52d48a82b492fd6bac772dc78 (patch)
tree42d2a87726d196f4db1c68489007520a4c597062 /addons
parent9ef97b5a9191e51f1edc66bb17728fd9fe552c35 (diff)
Remove as much trailing whitespace as possible.
Change-Id: I873c1c6d00f447269bd841494459efccdd2c19c0
Diffstat (limited to 'addons')
-rw-r--r--addons/app_mysql.c9
-rw-r--r--addons/cdr_mysql.c1
-rw-r--r--addons/chan_mobile.c6
-rw-r--r--addons/chan_ooh323.c216
-rw-r--r--addons/chan_ooh323.h14
-rw-r--r--addons/format_mp3.c1
-rw-r--r--addons/ooh323c/README35
-rw-r--r--addons/ooh323c/src/Makefile.in4
-rw-r--r--addons/ooh323c/src/context.c24
-rw-r--r--addons/ooh323c/src/decode.c118
-rw-r--r--addons/ooh323c/src/dlist.c27
-rw-r--r--addons/ooh323c/src/dlist.h62
-rw-r--r--addons/ooh323c/src/encode.c104
-rw-r--r--addons/ooh323c/src/errmgmt.c50
-rw-r--r--addons/ooh323c/src/eventHandler.c18
-rw-r--r--addons/ooh323c/src/eventHandler.h88
-rw-r--r--addons/ooh323c/src/h323/H235-SECURITY-MESSAGES.h10
-rw-r--r--addons/ooh323c/src/h323/H235-SECURITY-MESSAGESDec.c11
-rw-r--r--addons/ooh323c/src/h323/H235-SECURITY-MESSAGESEnc.c11
-rw-r--r--addons/ooh323c/src/h323/H323-MESSAGES.c11
-rw-r--r--addons/ooh323c/src/h323/H323-MESSAGES.h10
-rw-r--r--addons/ooh323c/src/h323/H323-MESSAGESDec.c11
-rw-r--r--addons/ooh323c/src/h323/H323-MESSAGESEnc.c11
-rw-r--r--addons/ooh323c/src/h323/MULTIMEDIA-SYSTEM-CONTROL.c11
-rw-r--r--addons/ooh323c/src/h323/MULTIMEDIA-SYSTEM-CONTROL.h10
-rw-r--r--addons/ooh323c/src/h323/MULTIMEDIA-SYSTEM-CONTROLDec.c11
-rw-r--r--addons/ooh323c/src/h323/MULTIMEDIA-SYSTEM-CONTROLEnc.c11
-rw-r--r--addons/ooh323c/src/memheap.c335
-rw-r--r--addons/ooh323c/src/memheap.h10
-rw-r--r--addons/ooh323c/src/ooCalls.c153
-rw-r--r--addons/ooh323c/src/ooCalls.h222
-rw-r--r--addons/ooh323c/src/ooCapability.c646
-rw-r--r--addons/ooh323c/src/ooCapability.h230
-rw-r--r--addons/ooh323c/src/ooCmdChannel.c59
-rw-r--r--addons/ooh323c/src/ooCmdChannel.h30
-rw-r--r--addons/ooh323c/src/ooCommon.h20
-rw-r--r--addons/ooh323c/src/ooDateTime.c17
-rw-r--r--addons/ooh323c/src/ooDateTime.h18
-rw-r--r--addons/ooh323c/src/ooGkClient.c452
-rw-r--r--addons/ooh323c/src/ooGkClient.h90
-rw-r--r--addons/ooh323c/src/ooLogChan.c79
-rw-r--r--addons/ooh323c/src/ooLogChan.h60
-rw-r--r--addons/ooh323c/src/ooSocket.c148
-rw-r--r--addons/ooh323c/src/ooSocket.h65
-rw-r--r--addons/ooh323c/src/ooStackCmds.c45
-rw-r--r--addons/ooh323c/src/ooStackCmds.h32
-rw-r--r--addons/ooh323c/src/ooTimer.c24
-rw-r--r--addons/ooh323c/src/ooTimer.h26
-rw-r--r--addons/ooh323c/src/ooUtils.c12
-rw-r--r--addons/ooh323c/src/ooUtils.h20
-rw-r--r--addons/ooh323c/src/ooasn1.h194
-rw-r--r--addons/ooh323c/src/oochannels.c376
-rw-r--r--addons/ooh323c/src/oochannels.h59
-rw-r--r--addons/ooh323c/src/ooh245.c993
-rw-r--r--addons/ooh323c/src/ooh245.h164
-rw-r--r--addons/ooh323c/src/ooh323.c476
-rw-r--r--addons/ooh323c/src/ooh323.h35
-rw-r--r--addons/ooh323c/src/ooh323ep.c127
-rw-r--r--addons/ooh323c/src/ooh323ep.h126
-rw-r--r--addons/ooh323c/src/oohdr.h10
-rw-r--r--addons/ooh323c/src/ooper.h11
-rw-r--r--addons/ooh323c/src/ooports.c16
-rw-r--r--addons/ooh323c/src/ooports.h20
-rw-r--r--addons/ooh323c/src/ooq931.c819
-rw-r--r--addons/ooh323c/src/ooq931.h158
-rw-r--r--addons/ooh323c/src/ootrace.c35
-rw-r--r--addons/ooh323c/src/ootrace.h24
-rw-r--r--addons/ooh323c/src/ootypes.h79
-rw-r--r--addons/ooh323c/src/perutil.c51
-rw-r--r--addons/ooh323c/src/printHandler.c22
-rw-r--r--addons/ooh323c/src/printHandler.h16
-rw-r--r--addons/ooh323c/src/rtctype.c10
-rw-r--r--addons/ooh323c/src/rtctype.h15
-rw-r--r--addons/ooh323cDriver.c122
-rw-r--r--addons/ooh323cDriver.h10
-rw-r--r--addons/res_config_mysql.c7
76 files changed, 3813 insertions, 3850 deletions
diff --git a/addons/app_mysql.c b/addons/app_mysql.c
index 6901daf05..1a79afebd 100644
--- a/addons/app_mysql.c
+++ b/addons/app_mysql.c
@@ -27,7 +27,7 @@
* \addtogroup configuration_file Configuration Files
*/
-/*!
+/*!
* \page app_mysql.conf app_mysql.conf
* \verbinclude app_mysql.conf.sample
*/
@@ -335,7 +335,7 @@ static int aMYSQL_connect(struct ast_channel *chan, const char *data)
unsigned int port = 0;
char *port_str;
char *parse = ast_strdupa(data);
-
+
AST_NONSTANDARD_APP_ARGS(args, parse, ' ');
if (args.argc < 6) {
@@ -626,8 +626,8 @@ static int unload_module(void)
* Module loading including tests for configuration or dependencies.
* This function can return AST_MODULE_LOAD_FAILURE, AST_MODULE_LOAD_DECLINE,
* or AST_MODULE_LOAD_SUCCESS. If a dependency or environment variable fails
- * tests return AST_MODULE_LOAD_FAILURE. If the module can not load the
- * configuration file or other non-critical problem return
+ * tests return AST_MODULE_LOAD_FAILURE. If the module can not load the
+ * configuration file or other non-critical problem return
* AST_MODULE_LOAD_DECLINE. On success return AST_MODULE_LOAD_SUCCESS.
*/
static int load_module(void)
@@ -665,4 +665,3 @@ static int load_module(void)
}
AST_MODULE_INFO_STANDARD_DEPRECATED(ASTERISK_GPL_KEY, "Simple Mysql Interface");
-
diff --git a/addons/cdr_mysql.c b/addons/cdr_mysql.c
index 1f9736251..b2e0a4c67 100644
--- a/addons/cdr_mysql.c
+++ b/addons/cdr_mysql.c
@@ -718,4 +718,3 @@ AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_DEFAULT, "MySQL CDR Backend",
.unload = unload_module,
.reload = reload,
);
-
diff --git a/addons/chan_mobile.c b/addons/chan_mobile.c
index 8f04af753..7d92f8df3 100644
--- a/addons/chan_mobile.c
+++ b/addons/chan_mobile.c
@@ -16,7 +16,7 @@
* at the top of the source tree.
*/
-/*!
+/*!
* \file
* \brief Bluetooth Mobile Device channel driver
*
@@ -1772,7 +1772,7 @@ static int rfcomm_read_command(int rsock, char **buf, size_t count, size_t *in_c
* \verbatim
* \r\n<result code>\r\n
* <at command>\r
- * \r\n>
+ * \r\n>
* \endverbatim
*
* These formats correspond to AT result codes, AT commands, and the AT SMS
@@ -2254,7 +2254,7 @@ static int hfp_parse_cmti(struct hfp_pvt *hfp, char *buf)
int index = -1;
/* parse cmti info in the following format:
- * +CMTI: <mem>,<index>
+ * +CMTI: <mem>,<index>
*/
if (!sscanf(buf, "+CMTI: %*[^,],%d", &index)) {
ast_debug(2, "[%s] error parsing CMTI event '%s'\n", hfp->owner->id, buf);
diff --git a/addons/chan_ooh323.c b/addons/chan_ooh323.c
index 0d5a588b7..c25c130d4 100644
--- a/addons/chan_ooh323.c
+++ b/addons/chan_ooh323.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.
*
*****************************************************************************/
@@ -135,7 +135,7 @@ static int function_ooh323_write(struct ast_channel *chan, const char *cmd, char
static enum ast_rtp_glue_result ooh323_get_rtp_peer(struct ast_channel *chan, struct ast_rtp_instance **rtp);
static enum ast_rtp_glue_result ooh323_get_vrtp_peer(struct ast_channel *chan, struct ast_rtp_instance **rtp);
-static int ooh323_set_rtp_peer(struct ast_channel *chan, struct ast_rtp_instance *rtp,
+static int ooh323_set_rtp_peer(struct ast_channel *chan, struct ast_rtp_instance *rtp,
struct ast_rtp_instance *vrtp, struct ast_rtp_instance *trtp, const struct ast_format_cap *codecs, int nat_active);
static void ooh323_get_codec(struct ast_channel *chan, struct ast_format_cap *result);
void setup_rtp_remote(ooCallData *call, const char *remoteIp, int remotePort);
@@ -218,7 +218,7 @@ static struct ooh323_pvt {
char callee_dialedDigits[AST_MAX_EXTENSION];
char callee_email[AST_MAX_EXTENSION];
char callee_url[AST_MAX_EXTENSION];
-
+
int port;
struct ast_format *readformat; /* negotiated read format */
struct ast_format *writeformat; /* negotiated write format */
@@ -394,7 +394,7 @@ static struct ooh323_config
static struct ast_sched_context *sched;
static struct io_context *io;
-/* Protect the monitoring thread, so only one process can kill or start it,
+/* Protect the monitoring thread, so only one process can kill or start it,
and not when it's doing something critical. */
AST_MUTEX_DEFINE_STATIC(monlock);
@@ -405,7 +405,7 @@ static pthread_t monitor_thread = AST_PTHREADT_NULL;
static struct ast_channel *ooh323_new(struct ooh323_pvt *i, int state,
- const char *host, struct ast_format_cap *cap,
+ const char *host, struct ast_format_cap *cap,
const struct ast_assigned_ids *assignedids, const struct ast_channel *requestor)
{
struct ast_format_cap *caps = NULL;
@@ -422,12 +422,12 @@ static struct ast_channel *ooh323_new(struct ooh323_pvt *i, int state,
/* Don't hold a h323 pvt lock while we allocate a channel */
ast_mutex_unlock(&i->lock);
ast_mutex_lock(&ooh323c_cn_lock);
- ch = ast_channel_alloc(1, state, i->callerid_num, i->callerid_name,
+ ch = ast_channel_alloc(1, state, i->callerid_num, i->callerid_name,
i->accountcode, i->exten, i->context, assignedids, requestor, i->amaflags,
"OOH323/%s-%ld", host, callnumber);
callnumber++;
ast_mutex_unlock(&ooh323c_cn_lock);
-
+
ast_mutex_lock(&i->lock);
if (ch && caps) {
@@ -497,17 +497,17 @@ static struct ast_channel *ooh323_new(struct ooh323_pvt *i, int state,
ast_channel_priority_set(ch, 1);
if(!ast_test_flag(i, H323_OUTGOING)) {
-
+
if (!ast_strlen_zero(i->caller_h323id)) {
pbx_builtin_setvar_helper(ch, "_CALLER_H323ID", i->caller_h323id);
}
if (!ast_strlen_zero(i->caller_dialedDigits)) {
- pbx_builtin_setvar_helper(ch, "_CALLER_H323DIALEDDIGITS",
+ pbx_builtin_setvar_helper(ch, "_CALLER_H323DIALEDDIGITS",
i->caller_dialedDigits);
}
if (!ast_strlen_zero(i->caller_email)) {
- pbx_builtin_setvar_helper(ch, "_CALLER_H323EMAIL",
+ pbx_builtin_setvar_helper(ch, "_CALLER_H323EMAIL",
i->caller_email);
}
if (!ast_strlen_zero(i->caller_url)) {
@@ -517,7 +517,7 @@ static struct ast_channel *ooh323_new(struct ooh323_pvt *i, int state,
if (!ast_strlen_zero(i->accountcode))
ast_channel_accountcode_set(ch, i->accountcode);
-
+
if (i->amaflags)
ast_channel_amaflags_set(ch, i->amaflags);
@@ -528,7 +528,7 @@ static struct ast_channel *ooh323_new(struct ooh323_pvt *i, int state,
ast_channel_unlock(ch);
ast_hangup(ch);
ch = NULL;
- }
+ }
}
if (ch) {
@@ -552,7 +552,7 @@ static struct ast_channel *ooh323_new(struct ooh323_pvt *i, int state,
-static struct ooh323_pvt *ooh323_alloc(int callref, char *callToken)
+static struct ooh323_pvt *ooh323_alloc(int callref, char *callToken)
{
struct ooh323_pvt *pvt = NULL;
@@ -602,7 +602,7 @@ static struct ooh323_pvt *ooh323_alloc(int callref, char *callToken)
pvt->aniasdni = gANIasDNI;
- ast_mutex_unlock(&pvt->lock);
+ ast_mutex_unlock(&pvt->lock);
/* Add to interface list */
ast_mutex_lock(&iflock);
pvt->next = iflist;
@@ -628,7 +628,7 @@ static struct ast_channel *ooh323_request(const char *type, struct ast_format_ca
struct ast_channel *chan = NULL;
struct ooh323_pvt *p = NULL;
struct ooh323_peer *peer = NULL;
- char *dest = NULL;
+ char *dest = NULL;
char *ext = NULL;
char tmp[256];
int port = 0;
@@ -658,7 +658,7 @@ static struct ast_channel *ooh323_request(const char *type, struct ast_format_ca
dest = strchr(tmp, '/');
- if (dest) {
+ if (dest) {
*dest = '\0';
dest++;
ext = dest;
@@ -769,7 +769,7 @@ static struct ast_channel *ooh323_request(const char *type, struct ast_format_ca
chan = ooh323_new(p, AST_STATE_DOWN, p->username, cap,
assignedids, requestor);
-
+
ast_mutex_unlock(&p->lock);
if (!chan) {
@@ -856,7 +856,7 @@ struct ooh323_user *find_user(const char * name, const char* ip)
struct ooh323_peer *find_friend(const char *name, int port)
{
- struct ooh323_peer *peer;
+ struct ooh323_peer *peer;
if (gH323Debug)
ast_verb(0, "--- find_friend \"%s\"\n", name);
@@ -882,7 +882,7 @@ struct ooh323_peer *find_friend(const char *name, int port)
ast_verb(0, "+++ find_friend \"%s\"\n", name);
}
- return peer;
+ return peer;
}
@@ -921,7 +921,7 @@ struct ooh323_peer *find_peer(const char * name, int port)
ast_verb(0, "+++ find_peer \"%s\"\n", name);
}
- return peer;
+ return peer;
}
static int ooh323_digit_begin(struct ast_channel *chan, char digit)
@@ -929,7 +929,7 @@ static int ooh323_digit_begin(struct ast_channel *chan, char digit)
char dtmf[2];
struct ooh323_pvt *p = (struct ooh323_pvt *) ast_channel_tech_pvt(chan);
int res = 0;
-
+
if (gH323Debug)
ast_verb(0, "--- ooh323_digit_begin\n");
@@ -1036,7 +1036,7 @@ static int ooh323_call(struct ast_channel *ast, const char *dest, int timeout)
if ((val = pbx_builtin_getvar_helper(ast, "CALLER_H323ID"))) {
ast_copy_string(p->caller_h323id, val, sizeof(p->caller_h323id));
}
-
+
if ((val = pbx_builtin_getvar_helper(ast, "CALLER_H323DIALEDDIGITS"))) {
ast_copy_string(p->caller_dialedDigits, val, sizeof(p->caller_dialedDigits));
if(!p->callerid_num)
@@ -1117,13 +1117,13 @@ static int ooh323_hangup(struct ast_channel *ast)
if (gH323Debug)
ast_verb(0, " hanging %s with cause: %d\n", p->username, q931cause);
- ast_channel_tech_pvt_set(ast, NULL);
+ ast_channel_tech_pvt_set(ast, NULL);
if (!ast_test_flag(p, H323_ALREADYGONE)) {
- ooHangCall(p->callToken,
+ ooHangCall(p->callToken,
ooh323_convert_hangupcause_asteriskToH323(q931cause), q931cause);
ast_set_flag(p, H323_ALREADYGONE);
/* ast_mutex_unlock(&p->lock); */
- } else
+ } else
ast_set_flag(p, H323_NEEDDESTROY);
/* detach channel here */
if (p->owner) {
@@ -1139,11 +1139,11 @@ static int ooh323_hangup(struct ast_channel *ast)
/* Notify the module monitors that use count for resource has changed */
ast_update_use_count();
-
+
} else {
ast_debug(1, "No call to hangup\n" );
}
-
+
if (gH323Debug)
ast_verb(0, "+++ ooh323_hangup\n");
@@ -1166,7 +1166,7 @@ static int ooh323_answer(struct ast_channel *ast)
ast_channel_lock(ast);
if (!p->alertsent) {
if (gH323Debug) {
- ast_debug(1, "Sending forced ringback for %s, res = %u\n",
+ ast_debug(1, "Sending forced ringback for %s, res = %u\n",
callToken, ooManualRingback(callToken));
} else {
ooManualRingback(callToken);
@@ -1228,7 +1228,7 @@ static int ooh323_write(struct ast_channel *ast, struct ast_frame *f)
return res;
}
-
+
if (f->frametype == AST_FRAME_VOICE) {
/* sending progress for first */
if (!ast_test_flag(p, H323_OUTGOING) && !p->progsent &&
@@ -1266,7 +1266,7 @@ static int ooh323_write(struct ast_channel *ast, struct ast_frame *f)
ast_mutex_unlock(&p->lock);
return 0;
} else {
- ast_log(LOG_WARNING, "Can't send %u type frames with OOH323 write\n",
+ ast_log(LOG_WARNING, "Can't send %u type frames with OOH323 write\n",
f->frametype);
ast_mutex_unlock(&p->lock);
return 0;
@@ -1303,7 +1303,7 @@ static int ooh323_indicate(struct ast_channel *ast, int condition, const void *d
if (gH323Debug) {
ast_verb(0, "----- ooh323_indicate %d on call %s\n", condition, callToken);
}
-
+
ast_mutex_lock(&p->lock);
switch (condition) {
case AST_CONTROL_INCOMPLETE:
@@ -1331,7 +1331,7 @@ static int ooh323_indicate(struct ast_channel *ast, int condition, const void *d
if (!p->progsent) {
if (gH323Debug) {
ast_debug(1, "Sending manual progress for %s, res = %u\n", callToken,
- ooManualProgress(callToken));
+ ooManualProgress(callToken));
} else {
ooManualProgress(callToken);
}
@@ -1476,7 +1476,7 @@ static int ooh323_queryoption(struct ast_channel *ast, int option, void *data, i
if (gH323Debug)
ast_verb(0, "----- ooh323_queryoption %d on channel %s\n", option, ast_channel_name(ast));
-
+
switch (option) {
case AST_OPTION_T38_STATE:
@@ -1516,7 +1516,7 @@ static int ooh323_queryoption(struct ast_channel *ast, int option, void *data, i
if (gH323Debug)
ast_verb(0, "+++++ ooh323_queryoption %d on channel %s\n", option, ast_channel_name(ast));
-
+
ast_mutex_unlock(&p->lock);
return res;
@@ -1560,9 +1560,9 @@ void ooh323_set_write_format(ooCallData *call, struct ast_format *fmt, int txfra
struct ooh323_pvt *p = NULL;
if (gH323Debug)
- ast_verb(0, "--- ooh323_update_writeformat %s/%d\n",
+ ast_verb(0, "--- ooh323_update_writeformat %s/%d\n",
ast_format_get_name(fmt), txframes);
-
+
p = find_call(call);
if (!p) {
ast_log(LOG_ERROR, "No matching call found for %s\n", call->callToken);
@@ -1594,7 +1594,7 @@ void ooh323_set_write_format(ooCallData *call, struct ast_format *fmt, int txfra
}
if (gH323Debug) {
struct ast_str *codec_buf = ast_str_alloca(AST_FORMAT_CAP_NAMES_LEN);
- ast_verb(0, "Writeformat before update %s/%s\n",
+ ast_verb(0, "Writeformat before update %s/%s\n",
ast_format_get_name(ast_channel_writeformat(p->owner)),
ast_format_cap_get_names(ast_channel_nativeformats(p->owner), &codec_buf));
}
@@ -1632,9 +1632,9 @@ void ooh323_set_read_format(ooCallData *call, struct ast_format *fmt)
struct ooh323_pvt *p = NULL;
if (gH323Debug)
- ast_verb(0, "--- ooh323_update_readformat %s\n",
+ ast_verb(0, "--- ooh323_update_readformat %s\n",
ast_format_get_name(fmt));
-
+
p = find_call(call);
if (!p) {
ast_log(LOG_ERROR, "No matching call found for %s\n", call->callToken);
@@ -1666,7 +1666,7 @@ void ooh323_set_read_format(ooCallData *call, struct ast_format *fmt)
}
if (gH323Debug) {
- ast_verb(0, "Readformat before update %s\n",
+ ast_verb(0, "Readformat before update %s\n",
ast_format_get_name(ast_channel_readformat(p->owner)));
}
ast_format_cap_append(caps, fmt, 0);
@@ -1697,7 +1697,7 @@ int onAlerting(ooCallData *call)
if(!p) {
ast_log(LOG_ERROR, "No matching call found\n");
return -1;
- }
+ }
ast_mutex_lock(&p->lock);
if (!p->owner) {
ast_mutex_unlock(&p->lock);
@@ -1753,7 +1753,7 @@ int onProgress(ooCallData *call)
if(!p) {
ast_log(LOG_ERROR, "No matching call found\n");
return -1;
- }
+ }
ast_mutex_lock(&p->lock);
if (!p->owner) {
ast_mutex_unlock(&p->lock);
@@ -1861,7 +1861,7 @@ int ooh323_onReceivedSetup(ooCallData *call, Q931Message *pmsg)
}
ast_mutex_lock(&p->lock);
ast_clear_flag(p, H323_OUTGOING);
-
+
if (call->remoteDisplayName) {
p->callerid_name = ast_strdup(call->remoteDisplayName);
@@ -1883,7 +1883,7 @@ int ooh323_onReceivedSetup(ooCallData *call, Q931Message *pmsg)
{
if(!p->callerid_num)
p->callerid_num = ast_strdup(alias->value);
- ast_copy_string(p->caller_dialedDigits, alias->value,
+ ast_copy_string(p->caller_dialedDigits, alias->value,
sizeof(p->caller_dialedDigits));
}
else if(alias->type == T_H225AliasAddress_email_ID)
@@ -1955,7 +1955,7 @@ int ooh323_onReceivedSetup(ooCallData *call, Q931Message *pmsg)
if (user->rtpmask && user->rtpmaskstr[0]) {
p->rtpmask = user->rtpmask;
- ast_copy_string(p->rtpmaskstr, user->rtpmaskstr,
+ ast_copy_string(p->rtpmaskstr, user->rtpmaskstr,
sizeof(p->rtpmaskstr));
}
if (user->rtdrcount > 0 && user->rtdrinterval > 0) {
@@ -2050,7 +2050,7 @@ int onOutgoingCall(ooCallData *call)
ooCallSetCallerId(call, p->callerid_num);
}
}
-
+
if (!ast_strlen_zero(p->caller_h323id))
ooCallAddAliasH323ID(call, p->caller_h323id);
@@ -2131,7 +2131,7 @@ int onNewCallCreated(ooCallData *call)
ooCallSetCallerId(call, p->callerid_num);
}
}
-
+
if (!ast_strlen_zero(p->caller_h323id))
ooCallAddAliasH323ID(call, p->caller_h323id);
@@ -2150,7 +2150,7 @@ int onNewCallCreated(ooCallData *call)
ooCallAddAliasH323ID(call, p->callerid_num);
}
}
-
+
if (!ast_strlen_zero(p->exten)) {
if (ooIsDailedDigit(p->exten)) {
@@ -2164,7 +2164,7 @@ int onNewCallCreated(ooCallData *call)
if (gH323Debug) {
struct ast_str *codec_buf = ast_str_alloca(AST_FORMAT_CAP_NAMES_LEN);
- ast_verb(0, " Outgoing call %s(%s) - Codec prefs - %s\n",
+ ast_verb(0, " Outgoing call %s(%s) - Codec prefs - %s\n",
p->username?p->username:"NULL", call->callToken,
ast_format_cap_get_names(p->cap, &codec_buf));
}
@@ -2203,7 +2203,7 @@ int onCallEstablished(ooCallData *call)
ast_log(LOG_ERROR, "Channel has no owner\n");
return -1;
}
-
+
while (p->owner && ast_channel_trylock(p->owner)) {
ast_debug(1, "Failed to grab lock, trying again\n");
DEADLOCK_AVOIDANCE(&p->lock);
@@ -2249,7 +2249,7 @@ int onCallCleared(ooCallData *call)
if ((p = find_call(call))) {
ast_mutex_lock(&p->lock);
-
+
while (p->owner) {
if (ast_channel_trylock(p->owner)) {
ooTrace(OOTRCLVLINFO, "Failed to grab lock, trying again\n");
@@ -2261,7 +2261,7 @@ int onCallCleared(ooCallData *call)
}
if (ownerLock) {
- if (!ast_test_flag(p, H323_ALREADYGONE)) {
+ if (!ast_test_flag(p, H323_ALREADYGONE)) {
ast_set_flag(p, H323_ALREADYGONE);
ast_channel_hangupcause_set(p->owner, call->q931cause);
@@ -2305,7 +2305,7 @@ int onCallCleared(ooCallData *call)
if (gH323Debug)
ast_verb(0, "--- ooh323_delete_user\n");
- if (user) {
+ if (user) {
cur = userl.users;
ast_mutex_lock(&userl.lock);
while (cur) {
@@ -2323,7 +2323,7 @@ int onCallCleared(ooCallData *call)
ast_mutex_unlock(&userl.lock);
ast_free(user);
- }
+ }
if (gH323Debug)
ast_verb(0, "+++ ooh323_delete_user\n");
@@ -2337,7 +2337,7 @@ void ooh323_delete_peer(struct ooh323_peer *peer)
if (gH323Debug)
ast_verb(0, "--- ooh323_delete_peer\n");
- if (peer) {
+ if (peer) {
cur = peerl.peers;
ast_mutex_lock(&peerl.lock);
while(cur) {
@@ -2361,7 +2361,7 @@ void ooh323_delete_peer(struct ooh323_peer *peer)
ao2_cleanup(peer->cap);
ast_free(peer);
- }
+ }
if (gH323Debug)
ast_verb(0, "+++ ooh323_delete_peer\n");
@@ -2433,11 +2433,11 @@ static struct ooh323_user *build_user(const char *name, struct ast_variable *v)
user->rtptimeout = gRTPTimeout;
} else if (!strcasecmp(v->name, "rtpmask")) {
if ((user->rtpmask = ast_calloc(1, sizeof(struct OOH323Regex))) &&
- (regcomp(&user->rtpmask->regex, v->value, REG_EXTENDED)
+ (regcomp(&user->rtpmask->regex, v->value, REG_EXTENDED)
== 0)) {
ast_mutex_init(&user->rtpmask->lock);
user->rtpmask->inuse = 1;
- ast_copy_string(user->rtpmaskstr, v->value,
+ ast_copy_string(user->rtpmaskstr, v->value,
sizeof(user->rtpmaskstr));
} else user->rtpmask = NULL;
} else if (!strcasecmp(v->name, "disallow")) {
@@ -2454,7 +2454,7 @@ static struct ooh323_user *build_user(const char *name, struct ast_variable *v)
struct ast_sockaddr p;
if (!ast_parse_arg(v->value, PARSE_ADDR, &p)) {
ast_copy_string(user->mIP, ast_sockaddr_stringify_addr(&p), sizeof(user->mIP)-1);
- } else {
+ } else {
ast_copy_string(user->mIP, v->value, sizeof(user->mIP)-1);
}
user->mUseIP = 1;
@@ -2599,10 +2599,10 @@ static struct ooh323_peer *build_peer(const char *name, struct ast_variable *v,
struct ast_sockaddr p;
if (!ast_parse_arg(v->value, PARSE_ADDR, &p)) {
ast_copy_string(peer->ip, ast_sockaddr_stringify_host(&p), sizeof(peer->ip));
- } else {
+ } else {
ast_copy_string(peer->ip, v->value, sizeof(peer->ip));
}
-
+
} else if (!strcasecmp(v->name, "outgoinglimit")) {
peer->outgoinglimit = atoi(v->value);
if (peer->outgoinglimit < 0)
@@ -2628,11 +2628,11 @@ static struct ooh323_peer *build_peer(const char *name, struct ast_variable *v,
peer->rtptimeout = gRTPTimeout;
} else if (!strcasecmp(v->name, "rtpmask")) {
if ((peer->rtpmask = ast_calloc(1, sizeof(struct OOH323Regex))) &&
- (regcomp(&peer->rtpmask->regex, v->value, REG_EXTENDED)
+ (regcomp(&peer->rtpmask->regex, v->value, REG_EXTENDED)
== 0)) {
ast_mutex_init(&peer->rtpmask->lock);
peer->rtpmask->inuse = 1;
- ast_copy_string(peer->rtpmaskstr, v->value,
+ ast_copy_string(peer->rtpmaskstr, v->value,
sizeof(peer->rtpmaskstr));
} else peer->rtpmask = NULL;
} else if (!strcasecmp(v->name, "disallow")) {
@@ -2721,9 +2721,9 @@ static int ooh323_do_reload(void)
reload_config(1);
/* Gatekeeper */
- if (gRasGkMode == RasUseSpecificGatekeeper ||
+ if (gRasGkMode == RasUseSpecificGatekeeper ||
gRasGkMode == RasDiscoverGatekeeper) {
- ooGkClientInit(gRasGkMode, (gRasGkMode == RasUseSpecificGatekeeper) ?
+ ooGkClientInit(gRasGkMode, (gRasGkMode == RasUseSpecificGatekeeper) ?
gGatekeeper : 0, 0);
ooGkClientStart(gH323ep.gkClient);
}
@@ -2738,10 +2738,10 @@ static int ooh323_do_reload(void)
case T_H225AliasAddress_h323_ID:
ooH323EpAddAliasH323ID(pNewAlias->value);
break;
- case T_H225AliasAddress_dialedDigits:
+ case T_H225AliasAddress_dialedDigits:
ooH323EpAddAliasDialedDigits(pNewAlias->value);
break;
- case T_H225AliasAddress_email_ID:
+ case T_H225AliasAddress_email_ID:
ooH323EpAddAliasEmailID(pNewAlias->value);
break;
default:
@@ -2889,7 +2889,7 @@ int reload_config(int reload)
v = v->next;
continue;
}
-
+
if (!strcasecmp(v->name, "port")) {
gPort = (int)strtol(v->value, NULL, 10);
} else if (!strcasecmp(v->name, "bindaddr")) {
@@ -2928,7 +2928,7 @@ int reload_config(int reload)
gMediaWaitForConnect = ast_true(v->value);
if (gMediaWaitForConnect)
ooH323EpEnableMediaWaitForConnect();
- else
+ else
ooH323EpDisableMediaWaitForConnect();
} else if (!strcasecmp(v->name, "h245tunneling")) {
gTunneling = ast_true(v->value);
@@ -2949,7 +2949,7 @@ int reload_config(int reload)
gBeMaster = ast_true(v->value);
if (gBeMaster)
ooH323EpTryBeMaster(1);
- else
+ else
ooH323EpTryBeMaster(0);
} else if (!strcasecmp(v->name, "h323id")) {
pNewAlias = ast_calloc(1, sizeof(struct ooAliases));
@@ -3081,7 +3081,7 @@ int reload_config(int reload)
else if (!strcasecmp(v->value, "h245signal"))
gDTMFMode = H323_DTMF_H245SIGNAL;
else {
- ast_log(LOG_WARNING, "Unknown dtmf mode '%s', using rfc2833\n",
+ ast_log(LOG_WARNING, "Unknown dtmf mode '%s', using rfc2833\n",
v->value);
gDTMFMode = H323_DTMF_RFC2833;
}
@@ -3126,7 +3126,7 @@ int reload_config(int reload)
}
v = v->next;
}
-
+
for (cat = ast_category_browse(cfg, NULL); cat; cat = ast_category_browse(cfg, cat)) {
if (strcasecmp(cat, "general")) {
int friend_type = 0;
@@ -3183,7 +3183,7 @@ static char *handle_cli_ooh323_show_peer(struct ast_cli_entry *e, int cmd, struc
{
char ip_port[64];
struct ooh323_peer *prev = NULL, *peer = NULL;
-
+
switch (cmd) {
case CLI_INIT:
e->command = "ooh323 show peer";
@@ -3304,7 +3304,7 @@ static char *handle_cli_ooh323_show_peers(struct ast_cli_entry *e, int cmd, stru
while (peer) {
ast_mutex_lock(&peer->lock);
snprintf(ip_port, sizeof(ip_port), "%s:%hu", peer->ip, peer->port);
- ast_cli(a->fd, FORMAT, peer->name,
+ ast_cli(a->fd, FORMAT, peer->name,
peer->accountcode,
ip_port,
ast_format_cap_get_names(peer->cap, &codec_buf));
@@ -3443,7 +3443,7 @@ static char *handle_cli_ooh323_show_users(struct ast_cli_entry *e, int cmd, stru
while(user)
{
ast_mutex_lock(&user->lock);
- ast_cli(a->fd, FORMAT1, user->name,
+ ast_cli(a->fd, FORMAT1, user->name,
user->accountcode, user->context,
ast_format_cap_get_names(user->cap, &codec_buf));
prev = user;
@@ -3798,7 +3798,7 @@ static int load_module(void)
.onMediaChanged = (cb_OnMediaChanged) setup_rtp_remote,
};
if (!(gCap = ast_format_cap_alloc(AST_FORMAT_CAP_FLAG_DEFAULT))) {
- return AST_MODULE_LOAD_DECLINE;
+ return AST_MODULE_LOAD_DECLINE;
}
if (!(ooh323_tech.capabilities = ast_format_cap_alloc(AST_FORMAT_CAP_FLAG_DEFAULT))) {
ao2_ref(gCap, -1);
@@ -3816,8 +3816,8 @@ static int load_module(void)
ast_mutex_init(&userl.lock);
peerl.peers = NULL;
ast_mutex_init(&peerl.lock);
-
-#if 0
+
+#if 0
ast_register_atexit(&ast_ooh323c_exit);
#endif
@@ -3831,7 +3831,7 @@ static int load_module(void)
if (!reload_config(0)) {
- /* fire up the H.323 Endpoint */
+ /* fire up the H.323 Endpoint */
if (OO_OK != ooH323EpInitialize(OO_CALLMODE_AUDIOCALL, gLogFile)) {
ast_log(LOG_ERROR, "Failed to initialize OOH323 endpoint-"
"OOH323 Disabled\n");
@@ -3867,7 +3867,7 @@ static int load_module(void)
ast_debug(1, "OOH323 channel is in IP6 mode\n");
}
ooH323EpSetCallerID(gCallerID);
-
+
if(ooH323EpSetTCPPortRange(ooconfig.mTCPPortStart, ooconfig.mTCPPortEnd) == OO_FAILED) {
ast_log(LOG_ERROR, "h225portrange: Failed to set range\n");
}
@@ -3878,10 +3878,10 @@ static int load_module(void)
case T_H225AliasAddress_h323_ID:
ooH323EpAddAliasH323ID(pNewAlias->value);
break;
- case T_H225AliasAddress_dialedDigits:
+ case T_H225AliasAddress_dialedDigits:
ooH323EpAddAliasDialedDigits(pNewAlias->value);
break;
- case T_H225AliasAddress_email_ID:
+ case T_H225AliasAddress_email_ID:
ooH323EpAddAliasEmailID(pNewAlias->value);
break;
default:
@@ -3899,11 +3899,11 @@ static int load_module(void)
peer = peer->next;
}
ast_mutex_unlock(&peerl.lock);
-
+
if (gMediaWaitForConnect)
ooH323EpEnableMediaWaitForConnect();
- else
+ else
ooH323EpDisableMediaWaitForConnect();
/* Fast start and tunneling options */
@@ -3938,12 +3938,12 @@ static int load_module(void)
ooh323_tech.capabilities = NULL;
return 1;
}
-
+
/* Create H.323 listener */
if (ooCreateH323Listener() != OO_OK) {
ast_log(LOG_ERROR, "OOH323 Listener Creation failure. "
"OOH323 DISABLED\n");
-
+
ooH323EpDestroy();
ao2_ref(gCap, -1);
gCap = NULL;
@@ -4010,7 +4010,7 @@ static void *do_monitor(void *data)
if (gH323ep.gkClient && gH323ep.gkClient->state == GkClientStopped) {
ooGkClientDestroy();
ast_verb(0, "Restart stopped gatekeeper client\n");
- ooGkClientInit(gRasGkMode, (gRasGkMode == RasUseSpecificGatekeeper) ?
+ ooGkClientInit(gRasGkMode, (gRasGkMode == RasUseSpecificGatekeeper) ?
gGatekeeper : 0, 0);
ooGkClientStart(gH323ep.gkClient);
}
@@ -4036,7 +4036,7 @@ static void *do_monitor(void *data)
ast_log(LOG_NOTICE, "Disconnecting call '%s' for lack of RTP activity in %ld seconds\n", ast_channel_name(h323->owner), (long) (t - h323->lastrtprx));
ast_channel_unlock(h323->owner);
}
-
+
}
if (ast_test_flag(h323, H323_NEEDDESTROY)) {
@@ -4136,7 +4136,7 @@ int ooh323_destroy(struct ooh323_pvt *p)
iflist = cur->next;
if (cur->callToken) {
- if (gH323Debug)
+ if (gH323Debug)
ast_verb(0, " Destroying %s\n", cur->callToken);
ast_free(cur->callToken);
cur->callToken = 0;
@@ -4156,7 +4156,7 @@ int ooh323_destroy(struct ooh323_pvt *p)
ast_free(cur->callerid_name);
cur->callerid_name = 0;
}
-
+
if (cur->callerid_num) {
ast_free(cur->callerid_num);
cur->callerid_num = 0;
@@ -4172,20 +4172,20 @@ int ooh323_destroy(struct ooh323_pvt *p)
ast_udptl_destroy(cur->udptl);
cur->udptl = NULL;
}
-
+
/* Unlink us from the owner if we have one */
if (cur->owner) {
while(ast_channel_trylock(cur->owner)) {
ast_debug(1, "Failed to grab lock, trying again\n");
DEADLOCK_AVOIDANCE(&cur->lock);
- }
+ }
ast_debug(1, "Detaching from %s\n", ast_channel_name(cur->owner));
ast_channel_tech_pvt_set(cur->owner, NULL);
ast_channel_unlock(cur->owner);
cur->owner = NULL;
ast_module_unref(myself);
}
-
+
if (cur->vad) {
ast_dsp_free(cur->vad);
cur->vad = NULL;
@@ -4325,7 +4325,7 @@ static int unload_module(void)
if (gH323Debug) {
ast_verb(0, " unload_module - stopping monitor thread\n");
- }
+ }
if (monitor_thread != AST_PTHREADT_NULL) {
if (!ast_mutex_lock(&monlock)) {
if (monitor_thread && (monitor_thread != AST_PTHREADT_STOP)) {
@@ -4368,7 +4368,7 @@ static int unload_module(void)
ast_log(LOG_WARNING, "Unable to lock the interface list\n");
return -1;
}
-
+
if (gH323Debug) {
ast_verb(0, " unload_module - deleting users\n");
@@ -4668,7 +4668,7 @@ int configure_local_rtp(struct ooh323_pvt *p, ooCallData *call)
ast_rtp_instance_set_timeout(p->rtp, p->rtptimeout);
}
ast_rtp_instance_set_prop(p->rtp, AST_RTP_PROPERTY_RTCP, 1);
-
+
}
if (p->rtdrcount) {
@@ -4830,7 +4830,7 @@ void close_rtp_connection(ooCallData *call)
udptl handling functions
*/
-void setup_udptl_connection(ooCallData *call, const char *remoteIp,
+void setup_udptl_connection(ooCallData *call, const char *remoteIp,
int remotePort)
{
struct ooh323_pvt *p = NULL;
@@ -4840,7 +4840,7 @@ void setup_udptl_connection(ooCallData *call, const char *remoteIp,
ast_verb(0, "--- setup_udptl_connection\n");
/* Find the call or allocate a private structure if call not found */
- p = find_call(call);
+ p = find_call(call);
if (!p) {
ast_log(LOG_ERROR, "Something is wrong: rtp\n");
@@ -4944,7 +4944,7 @@ int update_our_aliases(ooCallData *call, struct ooh323_pvt *p)
{
int updated = -1;
ooAliases *psAlias = NULL;
-
+
if (!call->ourAliases)
return updated;
for (psAlias = call->ourAliases; psAlias; psAlias = psAlias->next) {
@@ -4953,7 +4953,7 @@ int update_our_aliases(ooCallData *call, struct ooh323_pvt *p)
updated = 1;
}
if (psAlias->type == T_H225AliasAddress_dialedDigits) {
- ast_copy_string(p->callee_dialedDigits, psAlias->value,
+ ast_copy_string(p->callee_dialedDigits, psAlias->value,
sizeof(p->callee_dialedDigits));
updated = 1;
}
@@ -5145,7 +5145,7 @@ void onModeChanged(ooCallData *call, int t38mode) {
}
parameters.max_ifp = ast_udptl_get_far_max_ifp(p->udptl);
parameters.rate = AST_T38_RATE_14400;
- ast_queue_control_data(p->owner, AST_CONTROL_T38_PARAMETERS,
+ ast_queue_control_data(p->owner, AST_CONTROL_T38_PARAMETERS,
&parameters, sizeof(parameters));
p->faxmode = 1;
@@ -5157,7 +5157,7 @@ void onModeChanged(ooCallData *call, int t38mode) {
parameters.request_response = AST_T38_REQUEST_TERMINATE;
parameters.max_ifp = ast_udptl_get_far_max_ifp(p->udptl);
parameters.rate = AST_T38_RATE_14400;
- ast_queue_control_data(p->owner, AST_CONTROL_T38_PARAMETERS,
+ ast_queue_control_data(p->owner, AST_CONTROL_T38_PARAMETERS,
&parameters, sizeof(parameters));
}
p->faxmode = 0;
@@ -5204,7 +5204,7 @@ int ooh323_convert_hangupcause_h323ToAsterisk(int cause)
switch (cause) {
case OO_REASON_REMOTE_REJECTED:
return AST_CAUSE_CALL_REJECTED;
- case OO_REASON_NOUSER:
+ case OO_REASON_NOUSER:
return AST_CAUSE_UNALLOCATED;
case OO_REASON_REMOTE_BUSY:
case OO_REASON_LOCAL_BUSY:
@@ -5216,7 +5216,7 @@ int ooh323_convert_hangupcause_h323ToAsterisk(int cause)
return AST_CAUSE_CONGESTION;
case OO_REASON_REMOTE_NOANSWER:
return AST_CAUSE_NO_ANSWER;
- case OO_REASON_UNKNOWN:
+ case OO_REASON_UNKNOWN:
case OO_REASON_INVALIDMESSAGE:
case OO_REASON_TRANSPORTFAILURE:
return AST_CAUSE_FAILURE;
diff --git a/addons/chan_ooh323.h b/addons/chan_ooh323.h
index 1279a2246..e4d285e37 100644
--- a/addons/chan_ooh323.h
+++ b/addons/chan_ooh323.h
@@ -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.
*
*****************************************************************************/
@@ -85,7 +85,7 @@ struct ooh323_peer;
/* Helper functions */
struct ooh323_user *find_user(const char * name, const char *ip);
struct ooh323_peer *find_peer(const char * name, int port);
-void ooh323_delete_peer(struct ooh323_peer *peer);
+void ooh323_delete_peer(struct ooh323_peer *peer);
int delete_users(void);
int delete_peers(void);
@@ -95,7 +95,7 @@ int reload_config(int reload);
int restart_monitor(void);
int configure_local_rtp(struct ooh323_pvt *p, ooCallData* call);
-void setup_rtp_connection(ooCallData *call, const char *remoteIp,
+void setup_rtp_connection(ooCallData *call, const char *remoteIp,
int remotePort);
void close_rtp_connection(ooCallData *call);
struct ast_frame *ooh323_rtp_read
diff --git a/addons/format_mp3.c b/addons/format_mp3.c
index bb0b20850..f4b0a2ac0 100644
--- a/addons/format_mp3.c
+++ b/addons/format_mp3.c
@@ -327,4 +327,3 @@ static int unload_module(void)
}
AST_MODULE_INFO_STANDARD_EXTENDED(ASTERISK_GPL_KEY, "MP3 format [Any rate but 8000hz mono is optimal]");
-
diff --git a/addons/ooh323c/README b/addons/ooh323c/README
index e1a5b20e4..323174709 100644
--- a/addons/ooh323c/README
+++ b/addons/ooh323c/README
@@ -6,22 +6,22 @@ Introduction
Objective Open H.323 stack is a simple H.323 implementation in C. This
package contains the core stack code. For complete H.323 stack package with
examples or for more information visit www.obj-sys.com/open
- The ASN.1 messaging code was developed using the Objective Systems ASN1C
-compiler to implement the core H.323 specifications (H.225, H.235,
-and H.245). Additional code was then developed which makes use of
-the compiler generated code for presenting a comparatively high level
+ The ASN.1 messaging code was developed using the Objective Systems ASN1C
+compiler to implement the core H.323 specifications (H.225, H.235,
+and H.245). Additional code was then developed which makes use of
+the compiler generated code for presenting a comparatively high level
stack API.
Features
Features supported in this package include the following:
-* H.225/Q.931 - the following message types are supported (including
- support for FastStart and H.245 tunneling):
- - Setup
+* H.225/Q.931 - the following message types are supported (including
+ support for FastStart and H.245 tunneling):
+ - Setup
- Connect
- Call Proceeding
- - Alerting
+ - Alerting
- Facility
- ReleaseComplete
@@ -54,8 +54,8 @@ Features supported in this package include the following:
To run the stack test application chansetup
chansetup - This is a sample program developed for testing multiple calls.
This program allows stack testing by placing multiple calls. The number of
- calls, duration of each call and interval between successive calls are
- configurable.
+ calls, duration of each call and interval between successive calls are
+ configurable.
1. Two instances of this program have to be run. Can be run on same machine or
different machines.
@@ -64,19 +64,19 @@ To run the stack test application chansetup
cd tests/chansetup
-2. For running listener instance,
+2. For running listener instance,
./h323peer [--use-ip ip] [--use-port port]
- where local ip address and port can be specified for listening to incoming
+ where local ip address and port can be specified for listening to incoming
calls. By default, application determines ip address and uses default H323
port number 1720.
3. For running calling instance
-
+
./h323peer [--use-ip ip] -n <number of calls> -duration <call duration>
-interval <inetrval between successive calls> destination
-
+
where all times are in seconds. Interval of 0 means next call will be placed
after current call finishes. "destination" is the dotted ip address of the
endpoint running listener instance.
@@ -86,10 +86,9 @@ To run the stack test application chansetup
Reporting Problems:
-Report problems you encounter by sending E-mail to support@obj-sys.com.
+Report problems you encounter by sending E-mail to support@obj-sys.com.
If you have any further questions or comments on what you would like to
-see in the product or what is difficult to use or understand, please
+see in the product or what is difficult to use or understand, please
communicate them to us. Your feedback is important to us. Please let us
-know how it works out for you - either good or bad.
-
+know how it works out for you - either good or bad.
diff --git a/addons/ooh323c/src/Makefile.in b/addons/ooh323c/src/Makefile.in
index 15b14f7df..8e170dc6a 100644
--- a/addons/ooh323c/src/Makefile.in
+++ b/addons/ooh323c/src/Makefile.in
@@ -96,7 +96,7 @@ libooh323c_a_SOURCES = ooLogChan.h ooLogChan.c ooUtils.c ooUtils.h ooGkClient.h
INCLUDES = -Ih323
-#include_HEADERS = ooUtils.h memheap.h ooCommon.h ooDateTime.h ooGkClient.h ooasn1.h oochannels.h ootrace.h ooh245.h ooports.h ooq931.h oohdr.h ooper.h ooSocket.h ooTimer.h ootypes.h eventHandler.h ooCapability.h ooCalls.h ooStackCmds.h ooh323.h ooh323ep.h printHandler.h rtctype.h h323/H235-SECURITY-MESSAGES.h h323/H323-MESSAGES.h h323/MULTIMEDIA-SYSTEM-CONTROL.h
+#include_HEADERS = ooUtils.h memheap.h ooCommon.h ooDateTime.h ooGkClient.h ooasn1.h oochannels.h ootrace.h ooh245.h ooports.h ooq931.h oohdr.h ooper.h ooSocket.h ooTimer.h ootypes.h eventHandler.h ooCapability.h ooCalls.h ooStackCmds.h ooh323.h ooh323ep.h printHandler.h rtctype.h h323/H235-SECURITY-MESSAGES.h h323/H323-MESSAGES.h h323/MULTIMEDIA-SYSTEM-CONTROL.h
EXTRA_DIST = oostk.dsp
subdir = ooh323c/src
mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
@@ -187,7 +187,7 @@ MULTIMEDIA-SYSTEM-CONTROLDec.$(OBJEXT): \
h323/MULTIMEDIA-SYSTEM-CONTROLDec.c
MULTIMEDIA-SYSTEM-CONTROLEnc.$(OBJEXT): \
h323/MULTIMEDIA-SYSTEM-CONTROLEnc.c
-libooh323c.a: $(libooh323c_a_OBJECTS) $(libooh323c_a_DEPENDENCIES)
+libooh323c.a: $(libooh323c_a_OBJECTS) $(libooh323c_a_DEPENDENCIES)
-rm -f libooh323c.a
$(libooh323c_a_AR) libooh323c.a $(libooh323c_a_OBJECTS) $(libooh323c_a_LIBADD)
$(RANLIB) libooh323c.a
diff --git a/addons/ooh323c/src/context.c b/addons/ooh323c/src/context.c
index fe6c180ac..bc3db4387 100644
--- a/addons/ooh323c/src/context.c
+++ b/addons/ooh323c/src/context.c
@@ -1,15 +1,15 @@
/*
* Copyright (C) 1997-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.
*
*****************************************************************************/
@@ -35,13 +35,13 @@ int initContext (OOCTXT* pctxt)
return ASN_OK;
}
-int initContextBuffer
+int initContextBuffer
(OOCTXT* pctxt, const ASN1OCTET* bufaddr, ASN1UINT bufsiz)
{
if (bufaddr == 0) {
/* dynamic buffer */
if (bufsiz == 0) bufsiz = ASN_K_ENCBUFSIZ;
- pctxt->buffer.data = (ASN1OCTET*)
+ pctxt->buffer.data = (ASN1OCTET*)
memHeapAlloc (&pctxt->pMsgMemHeap, bufsiz);
if (!pctxt->buffer.data) return ASN_E_NOMEM;
pctxt->buffer.size = bufsiz;
@@ -60,7 +60,7 @@ int initContextBuffer
return ASN_OK;
}
-int initSubContext (OOCTXT* pctxt, OOCTXT* psrc)
+int initSubContext (OOCTXT* pctxt, OOCTXT* psrc)
{
/* ast_mutex_lock(&pctxt->pLock); */
int stat = ASN_OK;
@@ -85,7 +85,7 @@ void freeContext (OOCTXT* pctxt)
ASN1BOOL saveBuf;
ast_mutex_lock(&pctxt->pLock);
saveBuf = (pctxt->flags & ASN1SAVEBUF) != 0;
-
+
if (pctxt->buffer.dynamic && pctxt->buffer.data) {
if (saveBuf) {
memHeapMarkSaved (&pctxt->pMsgMemHeap, pctxt->buffer.data, TRUE);
@@ -130,7 +130,7 @@ int setPERBufferUsingCtxt (OOCTXT* pTarget, OOCTXT* pSource)
{
int stat;
ast_mutex_lock(&pTarget->pLock); ast_mutex_lock(&pSource->pLock);
- stat = initContextBuffer
+ stat = initContextBuffer
(pTarget, pSource->buffer.data, pSource->buffer.size);
if (ASN_OK == stat) {
@@ -151,11 +151,11 @@ int setPERBuffer (OOCTXT* pctxt,
ast_mutex_unlock(&pctxt->pLock);
if(stat != ASN_OK) return stat;
-
+
return ASN_OK;
}
-OOCTXT* newContext ()
+OOCTXT* newContext ()
{
/* OOCTXT* pctxt = (OOCTXT*) ASN1CRTMALLOC0 (sizeof(OOCTXT)); */
OOCTXT* pctxt = ast_malloc(sizeof(OOCTXT));
diff --git a/addons/ooh323c/src/decode.c b/addons/ooh323c/src/decode.c
index 3d7fc04c8..3ce74bfb8 100644
--- a/addons/ooh323c/src/decode.c
+++ b/addons/ooh323c/src/decode.c
@@ -1,15 +1,15 @@
/*
* Copyright (C) 1997-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,16 +19,16 @@
#include "ooasn1.h"
-static int decode16BitConstrainedString
+static int decode16BitConstrainedString
(OOCTXT* pctxt, Asn116BitCharString* pString, Asn116BitCharSet* pCharSet);
-static int decodeOctets
+static int decodeOctets
(OOCTXT* pctxt, ASN1OCTET* pbuffer, ASN1UINT bufsiz, ASN1UINT nbits);
static int getComponentLength (OOCTXT* pctxt, ASN1UINT itemBits);
int decodeBits (OOCTXT* pctxt, ASN1UINT* pvalue, ASN1UINT nbits)
-{
+{
unsigned char mask;
if (nbits == 0) {
@@ -47,7 +47,7 @@ int decodeBits (OOCTXT* pctxt, ASN1UINT* pvalue, ASN1UINT nbits)
pctxt->buffer.bitOffset -= nbits;
- *pvalue = ((pctxt->buffer.data[pctxt->buffer.byteIndex]) >>
+ *pvalue = ((pctxt->buffer.data[pctxt->buffer.byteIndex]) >>
pctxt->buffer.bitOffset) & ((1 << nbits) - 1);
return ASN_OK;
@@ -62,7 +62,7 @@ int decodeBits (OOCTXT* pctxt, ASN1UINT* pvalue, ASN1UINT nbits)
/* Check if buffer contains number of bits requested */
int nbytes = (((nbits - pctxt->buffer.bitOffset) + 7) / 8);
-
+
if ((pctxt->buffer.byteIndex + nbytes) >= pctxt->buffer.size) {
return LOG_ASN1ERR (pctxt, ASN_E_ENDOFBUF);
}
@@ -78,7 +78,7 @@ int decodeBits (OOCTXT* pctxt, ASN1UINT* pvalue, ASN1UINT nbits)
/* second read bytes from next byteIndex */
while (nbits >= 8) {
- *pvalue = (*pvalue << 8) |
+ *pvalue = (*pvalue << 8) |
(pctxt->buffer.data[pctxt->buffer.byteIndex]);
pctxt->buffer.byteIndex++;
nbits -= 8;
@@ -87,8 +87,8 @@ int decodeBits (OOCTXT* pctxt, ASN1UINT* pvalue, ASN1UINT nbits)
/* third read bits & set bitoffset of the byteIndex */
if (nbits > 0) {
pctxt->buffer.bitOffset = 8 - nbits;
- *pvalue = (*pvalue << nbits) |
- ((pctxt->buffer.data[pctxt->buffer.byteIndex]) >>
+ *pvalue = (*pvalue << nbits) |
+ ((pctxt->buffer.data[pctxt->buffer.byteIndex]) >>
pctxt->buffer.bitOffset);
}
@@ -96,7 +96,7 @@ int decodeBits (OOCTXT* pctxt, ASN1UINT* pvalue, ASN1UINT nbits)
}
}
-int decodeBitString
+int decodeBitString
(OOCTXT* pctxt, ASN1UINT* numbits_p, ASN1OCTET* buffer, ASN1UINT bufsiz)
{
ASN1UINT bitcnt;
@@ -111,7 +111,7 @@ int decodeBitString
if (bitcnt > 0) {
*numbits_p += bitcnt;
- stat = bitAndOctetStringAlignmentTest
+ stat = bitAndOctetStringAlignmentTest
(pSizeList, bitcnt, TRUE, &doAlign);
if (stat != ASN_OK) return LOG_ASN1ERR (pctxt, stat);
@@ -133,7 +133,7 @@ int decodeBitString
return ASN_OK;
}
-int decodeBMPString
+int decodeBMPString
(OOCTXT* pctxt, ASN1BMPString* pvalue, Asn116BitCharSet* permCharSet)
{
Asn116BitCharSet charSet;
@@ -164,7 +164,7 @@ int decodeByteAlign (OOCTXT* pctxt)
return ASN_OK;
}
-int decodeConstrainedStringEx
+int decodeConstrainedStringEx
(OOCTXT* pctxt, const char** string, const char* charSet,
ASN1UINT abits, ASN1UINT ubits, ASN1UINT canSetBits)
{
@@ -227,9 +227,9 @@ int decodeConstrainedStringEx
return ASN_OK;
}
-int decodeConsInteger
+int decodeConsInteger
(OOCTXT* pctxt, ASN1INT* pvalue, ASN1INT lower, ASN1INT upper)
-{
+{
ASN1UINT range_value = upper - lower;
ASN1UINT adjusted_value;
int stat = ASN_OK;
@@ -254,9 +254,9 @@ int decodeConsInteger
return stat;
}
-int decodeConsUInt8
+int decodeConsUInt8
(OOCTXT* pctxt, ASN1UINT8* pvalue, ASN1UINT lower, ASN1UINT upper)
-{
+{
ASN1UINT range_value, value;
ASN1UINT adjusted_value;
int stat = ASN_OK;
@@ -299,9 +299,9 @@ int decodeConsUInt8
return stat;
}
-int decodeConsUInt16
+int decodeConsUInt16
(OOCTXT* pctxt, ASN1USINT* pvalue, ASN1UINT lower, ASN1UINT upper)
-{
+{
ASN1UINT range_value, value;
ASN1UINT adjusted_value;
int stat = ASN_OK;
@@ -328,9 +328,9 @@ int decodeConsUInt16
return stat;
}
-int decodeConsUnsigned
+int decodeConsUnsigned
(OOCTXT* pctxt, ASN1UINT* pvalue, ASN1UINT lower, ASN1UINT upper)
-{
+{
ASN1UINT range_value;
ASN1UINT adjusted_value;
int stat = ASN_OK;
@@ -354,9 +354,9 @@ int decodeConsUnsigned
return stat;
}
-int decodeConsWholeNumber
+int decodeConsWholeNumber
(OOCTXT* pctxt, ASN1UINT* padjusted_value, ASN1UINT range_value)
-{
+{
ASN1UINT nocts, range_bitcnt;
int stat;
@@ -419,9 +419,9 @@ int decodeDynBitString (OOCTXT* pctxt, ASN1DynBitStr* pBitStr)
/* If "fast copy" option is not set (ASN1FATSCOPY) or if constructed,
* copy the bit string value into a dynamic memory buffer;
- * otherwise, store the pointer to the value in the decode
+ * otherwise, store the pointer to the value in the decode
* buffer in the data pointer argument. */
-
+
if (pctxt->flags & ASN1FASTCOPY) {
/* check is it possible to do optimized decoding */
@@ -433,7 +433,7 @@ int decodeDynBitString (OOCTXT* pctxt, ASN1DynBitStr* pBitStr)
if (stat != ASN_OK) return LOG_ASN1ERR (pctxt, stat);
stat = DECODEBIT (pctxt, &bit); /* read first bit of length determinant */
- if (bit == 1 && stat == ASN_OK)
+ if (bit == 1 && stat == ASN_OK)
stat = DECODEBIT (pctxt, &bit); /* read second bit */
pctxt->buffer.byteIndex = byteIndex; /* restore byte index */
@@ -441,9 +441,9 @@ int decodeDynBitString (OOCTXT* pctxt, ASN1DynBitStr* pBitStr)
/* if either first or second bit != 0 - not fragmented */
- if (bit == 0 && stat == ASN_OK) {
+ if (bit == 0 && stat == ASN_OK) {
ASN1UINT bitcnt;
-
+
stat = decodeLength (pctxt, &bitcnt);
if (stat != 0) return LOG_ASN1ERR (pctxt, stat);
@@ -454,9 +454,9 @@ int decodeDynBitString (OOCTXT* pctxt, ASN1DynBitStr* pBitStr)
stat = moveBitCursor (pctxt, bitcnt);
if (stat != ASN_OK) return LOG_ASN1ERR (pctxt, stat);
}
- else
+ else
pBitStr->data = 0;
-
+
return stat;
}
}
@@ -470,13 +470,13 @@ int decodeDynBitString (OOCTXT* pctxt, ASN1DynBitStr* pBitStr)
}
nocts = (nbits + 7) / 8;
-
+
/* Allocate memory for the target string */
if (nocts > 0) {
ptmp = (ASN1OCTET*) ASN1MALLOC (pctxt, nocts);
if (0 == ptmp) return LOG_ASN1ERR (pctxt, ASN_E_NOMEM);
-
+
/* Call static bit string decode function */
stat = decodeBitString (pctxt, &pBitStr->numbits, ptmp, nocts);
@@ -493,7 +493,7 @@ int decodeDynOctetString (OOCTXT* pctxt, ASN1DynOctStr* pOctStr)
/* If "fast copy" option is not set (ASN1FASTCOPY) or if constructed,
* copy the octet string value into a dynamic memory buffer;
- * otherwise, store the pointer to the value in the decode
+ * otherwise, store the pointer to the value in the decode
* buffer in the data pointer argument. */
if (pctxt->flags & ASN1FASTCOPY) {
@@ -507,7 +507,7 @@ int decodeDynOctetString (OOCTXT* pctxt, ASN1DynOctStr* pOctStr)
if (stat != ASN_OK) return LOG_ASN1ERR (pctxt, stat);
stat = DECODEBIT (pctxt, &bit); /* read first bit of length determinant */
- if (bit == 1 && stat == ASN_OK)
+ if (bit == 1 && stat == ASN_OK)
stat = DECODEBIT (pctxt, &bit); /* read second bit */
pctxt->buffer.byteIndex = byteIndex; /* restore byte index */
@@ -515,9 +515,9 @@ int decodeDynOctetString (OOCTXT* pctxt, ASN1DynOctStr* pOctStr)
/* if either first or second bit != 0 - not fragmented */
- if (bit == 0 && stat == ASN_OK) {
+ if (bit == 0 && stat == ASN_OK) {
ASN1UINT octcnt;
-
+
stat = decodeLength (pctxt, &octcnt);
if (stat != 0) return LOG_ASN1ERR (pctxt, stat);
@@ -528,13 +528,13 @@ int decodeDynOctetString (OOCTXT* pctxt, ASN1DynOctStr* pOctStr)
stat = moveBitCursor (pctxt, octcnt * 8);
if (stat != ASN_OK) return LOG_ASN1ERR (pctxt, stat);
}
- else
+ else
pOctStr->data = 0;
-
+
return stat;
}
}
-
+
nocts = getComponentLength (pctxt, 8);
if (nocts < 0) return LOG_ASN1ERR (pctxt, nocts);
@@ -671,14 +671,14 @@ int decodeObjectIdentifier (OOCTXT* pctxt, ASN1OBJID* pvalue)
if (j == 0) {
subid = pvalue->subid[0];
pvalue->subid[0] = ((subid / 40) >= 2) ? 2 : subid / 40;
- pvalue->subid[1] = (pvalue->subid[0] == 2) ?
+ pvalue->subid[1] = (pvalue->subid[0] == 2) ?
subid - 80 : subid % 40;
j = 2;
}
else j++;
}
else
- stat = ASN_E_INVOBJID;
+ stat = ASN_E_INVOBJID;
}
pvalue->numids = j;
@@ -687,9 +687,9 @@ int decodeObjectIdentifier (OOCTXT* pctxt, ASN1OBJID* pvalue)
return (stat);
}
-static int decodeOctets
+static int decodeOctets
(OOCTXT* pctxt, ASN1OCTET* pbuffer, ASN1UINT bufsiz, ASN1UINT nbits)
-{
+{
ASN1UINT nbytes = (nbits + 7) / 8 ;
ASN1UINT i = 0, j;
ASN1UINT rshift = pctxt->buffer.bitOffset;
@@ -740,20 +740,20 @@ static int decodeOctets
/* Copy last partial byte */
if (nbits >= rshift) {
- pbuffer[i] =
+ pbuffer[i] =
pctxt->buffer.data[pctxt->buffer.byteIndex++] << lshift;
nbitsInLastOctet = nbits - rshift;
if (nbitsInLastOctet > 0) {
- pbuffer[i] |=
+ pbuffer[i] |=
pctxt->buffer.data[pctxt->buffer.byteIndex] >> rshift;
}
pctxt->buffer.bitOffset = 8 - nbitsInLastOctet;
}
else if (nbits > 0) { /* nbits < rshift */
- pbuffer[i] =
+ pbuffer[i] =
pctxt->buffer.data[pctxt->buffer.byteIndex] << lshift;
pctxt->buffer.bitOffset = rshift - nbits;
}
@@ -773,7 +773,7 @@ static int decodeOctets
return ASN_OK;
}
-int decodeOctetString
+int decodeOctetString
(OOCTXT* pctxt, ASN1UINT* numocts_p, ASN1OCTET* buffer, ASN1UINT bufsiz)
{
ASN1UINT octcnt;
@@ -790,7 +790,7 @@ int decodeOctetString
if (TRUE) {
ASN1BOOL doAlign;
- stat = bitAndOctetStringAlignmentTest
+ stat = bitAndOctetStringAlignmentTest
(pSizeList, octcnt, FALSE, &doAlign);
if (stat != ASN_OK) return LOG_ASN1ERR (pctxt, stat);
@@ -800,7 +800,7 @@ int decodeOctetString
}
}
- stat = decodeOctets (pctxt, &buffer[octidx],
+ stat = decodeOctets (pctxt, &buffer[octidx],
bufsiz - octidx, (octcnt * 8));
if (stat != ASN_OK) return LOG_ASN1ERR (pctxt, stat);
@@ -815,7 +815,7 @@ int decodeOctetString
return ASN_OK;
}
-int decodeOpenType
+int decodeOpenType
(OOCTXT* pctxt, const ASN1OCTET** object_p2, ASN1UINT* numocts_p)
{
ASN1DynOctStr octStr;
@@ -883,7 +883,7 @@ int decodeSemiConsUnsigned (OOCTXT* pctxt, ASN1UINT* pvalue, ASN1UINT lower)
stat = decodeLength (pctxt, &nbytes);
if (stat < 0) return LOG_ASN1ERR (pctxt, stat);
-
+
if (nbytes > 0) {
stat = decodeByteAlign (pctxt);
if (stat != ASN_OK) return LOG_ASN1ERR (pctxt, stat);
@@ -898,7 +898,7 @@ int decodeSemiConsUnsigned (OOCTXT* pctxt, ASN1UINT* pvalue, ASN1UINT lower)
}
int decodeSmallNonNegWholeNumber (OOCTXT* pctxt, ASN1UINT* pvalue)
-{
+{
ASN1BOOL bitValue;
ASN1UINT len;
int ret;
@@ -959,7 +959,7 @@ int decodeVarWidthCharString (OOCTXT* pctxt, const char** pvalue)
return ASN_OK;
}
-static int decode16BitConstrainedString
+static int decode16BitConstrainedString
(OOCTXT* pctxt, Asn116BitCharString* pString, Asn116BitCharSet* pCharSet)
{
ASN1UINT i, idx, nbits = pCharSet->alignedBits;
@@ -985,7 +985,7 @@ static int decode16BitConstrainedString
stat = decodeBits (pctxt, &idx, nbits);
if (stat != ASN_OK) return LOG_ASN1ERR (pctxt, stat);
- pString->data[i] = (pCharSet->charSet.data == 0) ?
+ pString->data[i] = (pCharSet->charSet.data == 0) ?
idx + pCharSet->firstChar : pCharSet->charSet.data[idx];
}
}
@@ -1048,6 +1048,6 @@ int moveBitCursor (OOCTXT* pctxt, int bitOffset)
if (pctxt->buffer.byteIndex > pctxt->buffer.size) {
return (ASN_E_ENDOFBUF);
}
-
+
return ASN_OK;
}
diff --git a/addons/ooh323c/src/dlist.c b/addons/ooh323c/src/dlist.c
index 71dd9ee11..12b15b152 100644
--- a/addons/ooh323c/src/dlist.c
+++ b/addons/ooh323c/src/dlist.c
@@ -1,15 +1,15 @@
/*
* Copyright (C) 1997-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.
*
*****************************************************************************/
@@ -30,7 +30,7 @@ void dListInit (DList* pList)
DListNode* dListAppend (OOCTXT* pctxt, DList* pList, void* pData)
{
- DListNode* pListNode = (DListNode*)
+ DListNode* pListNode = (DListNode*)
memAlloc (pctxt, sizeof(DListNode));
if (0 != pListNode) {
@@ -53,7 +53,7 @@ DListNode* dListAppend (OOCTXT* pctxt, DList* pList, void* pData)
DListNode* dListAppendNode (OOCTXT* pctxt, DList* pList, void* pData)
{
- DListNode* pListNode =
+ DListNode* pListNode =
(DListNode*) (((char*)pData) - sizeof(DListNode));
if (0 != pListNode) {
@@ -109,7 +109,7 @@ void dListFreeAll (OOCTXT* pctxt, DList* pList)
for (pNode = pList->head; pNode != 0; pNode = pNextNode) {
pNextNode = pNode->next;
-
+
memFreePtr (pctxt, pNode->data);
memFreePtr (pctxt, pNode);
}
@@ -148,8 +148,8 @@ void dListFindAndRemove(struct OOCTXT* pctxt, DList* pList, void *data)
memFreePtr(pctxt, pNode);
}
}
-
-DListNode* dListFindByIndex (DList* pList, int index)
+
+DListNode* dListFindByIndex (DList* pList, int index)
{
DListNode* curNode;
int i;
@@ -163,11 +163,11 @@ DListNode* dListFindByIndex (DList* pList, int index)
/* Insert item before given node */
-DListNode* dListInsertBefore
+DListNode* dListInsertBefore
(OOCTXT* pctxt, DList* pList, DListNode* node, const void* pData)
{
DListNode* pListNode = (DListNode*) memAlloc (pctxt, sizeof(DListNode));
-
+
if (0 != pListNode) {
pListNode->data = (void*)pData;
@@ -212,7 +212,7 @@ DListNode* dListInsertBefore
/* Insert item after given node */
-DListNode* dListInsertAfter
+DListNode* dListInsertAfter
(OOCTXT* pctxt, DList* pList, DListNode* node, const void* pData)
{
DListNode* pListNode = (DListNode*) memAlloc (pctxt, sizeof(DListNode));
@@ -258,4 +258,3 @@ DListNode* dListInsertAfter
return pListNode;
}
-
diff --git a/addons/ooh323c/src/dlist.h b/addons/ooh323c/src/dlist.h
index 34a73c80d..9f735574e 100644
--- a/addons/ooh323c/src/dlist.h
+++ b/addons/ooh323c/src/dlist.h
@@ -1,20 +1,20 @@
/*
* Copyright (C) 1997-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.
*
*****************************************************************************/
-/**
- * @file dlist.h
+/**
+ * @file dlist.h
* Doubly-linked list structures and utility functions.
*/
#ifndef _OODLIST_H_
@@ -74,26 +74,26 @@ extern "C" {
* @param pData A pointer to a data item to be appended to the list.
* @return A pointer to an allocated node structure used to link
* the given data value into the list.
- */
-EXTERN DListNode* dListAppend
+ */
+EXTERN DListNode* dListAppend
(struct OOCTXT* pctxt, DList* pList, void* pData);
-EXTERN DListNode* dListAppendNode
+EXTERN DListNode* dListAppendNode
(struct OOCTXT* pctxt, DList* pList, void* pData);
/**
- * This function delete the head item from the list and returns a pointer
- * the data item stored in that node. The memory for the node structure
+ * This function delete the head item from the list and returns a pointer
+ * the data item stored in that node. The memory for the node structure
* is released.
*
* @param pctxt A pointer to a context structure. This provides a
* storage area for the function to store all working
* variables that must be maintained between function
* calls.
- * @param pList A pointer to the linked list structure from which
+ * @param pList A pointer to the linked list structure from which
* the node will be deleted.
* @return A pointer to the data item stored in the deleted node.
- */
+ */
EXTERN void* dListDeleteHead (struct OOCTXT* pctxt, DList* pList);
EXTERN DListNode* dListFindByIndex (DList* pList, int index);
@@ -101,7 +101,7 @@ EXTERN DListNode* dListFindByIndex (DList* pList, int index);
/**
* This function initializes a doubly linked list structure. It sets the number
* of elements to zero and sets all internal pointer values to NULL. A doubly
- * linked-list structure is described by the DList type. Nodes of the list
+ * linked-list structure is described by the DList type. Nodes of the list
* are of type DListNode.
*
* Memory for the structures is allocated using the memAlloc run-time
@@ -130,7 +130,7 @@ EXTERN void dListInit (DList* pList);
*/
EXTERN void dListFreeNodes (struct OOCTXT* pctxt, DList* pList);
-/**
+/**
* This function removes all nodes from the linked list structure and releases
* the memory that was allocated for storing the node structures
* (DListNode) and for data. The memory for data in each node must have
@@ -146,37 +146,37 @@ EXTERN void dListFreeNodes (struct OOCTXT* pctxt, DList* pList);
EXTERN void dListFreeAll (struct OOCTXT* pctxt, DList* pList);
/**
- * This function inserts an item into the linked list structure before the
+ * This function inserts an item into the linked list structure before the
* specified element.
- *
+ *
* @param pctxt Pointer to a context structure.
- * @param pList A pointer to a linked list structure into which the
+ * @param pList A pointer to a linked list structure into which the
* data item is to be inserted.
- * @param node The position in the list where the item is to be
- * inserted. The item will be inserted before this
+ * @param node The position in the list where the item is to be
+ * inserted. The item will be inserted before this
* node or appended to the list if node is null.
* @param pData A pointer to the data item to be inserted to the list.
- * @return A pointer to an allocated node structure used to
+ * @return A pointer to an allocated node structure used to
* link the given data value into the list.
*/
-EXTERN DListNode* dListInsertBefore
+EXTERN DListNode* dListInsertBefore
(struct OOCTXT* pctxt, DList* pList, DListNode* node, const void* pData);
/**
- * This function inserts an item into the linked list structure after the
+ * This function inserts an item into the linked list structure after the
* specified element.
- *
+ *
* @param pctxt Pointer to a context structure.
- * @param pList A pointer to a linked list structure into which the
+ * @param pList A pointer to a linked list structure into which the
* data item is to be inserted.
- * @param node The position in the list where the item is to be
- * inserted. The item will be inserted after this
+ * @param node The position in the list where the item is to be
+ * inserted. The item will be inserted after this
* node or added as the head element if node is null.
* @param pData A pointer to the data item to be inserted to the list.
- * @return A pointer to an allocated node structure used to
+ * @return A pointer to an allocated node structure used to
* link the given data value into the list.
*/
-EXTERN DListNode* dListInsertAfter
+EXTERN DListNode* dListInsertAfter
(struct OOCTXT* pctxt, DList* pList, DListNode* node, const void* pData);
/**
@@ -194,7 +194,7 @@ EXTERN DListNode* dListInsertAfter
EXTERN void dListRemove (DList* pList, DListNode* node);
EXTERN void dListFindAndRemove(struct OOCTXT* pctxt, DList* pList, void* data);
-/**
+/**
* @}
*/
#ifdef __cplusplus
diff --git a/addons/ooh323c/src/encode.c b/addons/ooh323c/src/encode.c
index 22fc1f31d..b48733be8 100644
--- a/addons/ooh323c/src/encode.c
+++ b/addons/ooh323c/src/encode.c
@@ -1,15 +1,15 @@
/*
* Copyright (C) 1997-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.
*
*****************************************************************************/
@@ -20,7 +20,7 @@
#include "ooasn1.h"
-static int encode16BitConstrainedString
+static int encode16BitConstrainedString
(OOCTXT* pctxt, Asn116BitCharString value, Asn116BitCharSet* pCharSet);
static int encode2sCompBinInt (OOCTXT* pctxt, ASN1INT value);
@@ -34,7 +34,7 @@ int encodeIdent (OOCTXT* pctxt, ASN1UINT ident);
int encodeBit (OOCTXT* pctxt, ASN1BOOL value)
-{
+{
int stat = ASN_OK;
/* If start of new byte, init to zero */
@@ -58,7 +58,7 @@ int encodeBit (OOCTXT* pctxt, ASN1BOOL value)
/* Set single-bit value */
if (value) {
- pctxt->buffer.data[pctxt->buffer.byteIndex] |=
+ pctxt->buffer.data[pctxt->buffer.byteIndex] |=
( 1 << pctxt->buffer.bitOffset );
}
@@ -74,7 +74,7 @@ int encodeBit (OOCTXT* pctxt, ASN1BOOL value)
}
int encodeBits (OOCTXT* pctxt, ASN1UINT value, ASN1UINT nbits)
-{
+{
int nbytes = (nbits + 7)/ 8, stat = ASN_OK;
if (nbits == 0) return stat;
@@ -94,7 +94,7 @@ int encodeBits (OOCTXT* pctxt, ASN1UINT value, ASN1UINT nbits)
if (nbits < (unsigned)pctxt->buffer.bitOffset) {
pctxt->buffer.bitOffset -= nbits;
- pctxt->buffer.data[pctxt->buffer.byteIndex] |=
+ pctxt->buffer.data[pctxt->buffer.byteIndex] |=
( value << pctxt->buffer.bitOffset );
return stat;
}
@@ -108,22 +108,22 @@ int encodeBits (OOCTXT* pctxt, ASN1UINT value, ASN1UINT nbits)
/* to set bits in subsequent bytes.. */
nbits -= pctxt->buffer.bitOffset;
- pctxt->buffer.data[pctxt->buffer.byteIndex++] |=
+ pctxt->buffer.data[pctxt->buffer.byteIndex++] |=
(ASN1OCTET)( value >> nbits );
- pctxt->buffer.data[pctxt->buffer.byteIndex] = 0;
+ pctxt->buffer.data[pctxt->buffer.byteIndex] = 0;
while (nbits >= 8) {
nbits -= 8;
- pctxt->buffer.data[pctxt->buffer.byteIndex++] =
+ pctxt->buffer.data[pctxt->buffer.byteIndex++] =
(ASN1OCTET)( value >> nbits );
- pctxt->buffer.data[pctxt->buffer.byteIndex] = 0;
+ pctxt->buffer.data[pctxt->buffer.byteIndex] = 0;
}
/* copy final partial byte */
pctxt->buffer.bitOffset = 8 - nbits;
if (nbits > 0) {
- pctxt->buffer.data[pctxt->buffer.byteIndex] =
+ pctxt->buffer.data[pctxt->buffer.byteIndex] =
(ASN1OCTET)((value & ((1 << nbits)-1)) << pctxt->buffer.bitOffset);
}
else
@@ -133,11 +133,11 @@ int encodeBits (OOCTXT* pctxt, ASN1UINT value, ASN1UINT nbits)
}
int encodeBitsFromOctet (OOCTXT* pctxt, ASN1OCTET value, ASN1UINT nbits)
-{
+{
int lshift = pctxt->buffer.bitOffset;
int rshift = 8 - pctxt->buffer.bitOffset;
int stat = ASN_OK;
- ASN1OCTET mask = 0x0;
+ ASN1OCTET mask = 0x0;
if (nbits == 0) return ASN_OK;
@@ -173,14 +173,14 @@ int encodeBitsFromOctet (OOCTXT* pctxt, ASN1OCTET value, ASN1UINT nbits)
/* possibly some bits in the following octet.. */
else {
- pctxt->buffer.data[pctxt->buffer.byteIndex] |=
+ pctxt->buffer.data[pctxt->buffer.byteIndex] |=
(ASN1OCTET)(value >> rshift);
pctxt->buffer.bitOffset -= nbits;
if (pctxt->buffer.bitOffset < 0) {
pctxt->buffer.byteIndex++;
- pctxt->buffer.data[pctxt->buffer.byteIndex] =
+ pctxt->buffer.data[pctxt->buffer.byteIndex] =
(ASN1OCTET)(value << lshift);
pctxt->buffer.bitOffset += 8;
}
@@ -202,7 +202,7 @@ int encodeBitString (OOCTXT* pctxt, ASN1UINT numbits, const ASN1OCTET* data)
if (enclen > 0) {
ASN1BOOL doAlign;
- stat = bitAndOctetStringAlignmentTest
+ stat = bitAndOctetStringAlignmentTest
(pSizeList, numbits, TRUE, &doAlign);
if (stat != ASN_OK) return LOG_ASN1ERR (pctxt, stat);
@@ -225,7 +225,7 @@ int encodeBitString (OOCTXT* pctxt, ASN1UINT numbits, const ASN1OCTET* data)
return ASN_OK;
}
-int encodeBMPString
+int encodeBMPString
(OOCTXT* pctxt, ASN1BMPString value, Asn116BitCharSet* permCharSet)
{
Asn116BitCharSet charSet;
@@ -278,9 +278,9 @@ int encodeCheckBuffer (OOCTXT* pctxt, ASN1UINT nbytes)
return (stat);
}
-int encodeConsInteger
+int encodeConsInteger
(OOCTXT* pctxt, ASN1INT value, ASN1INT lower, ASN1INT upper)
-{
+{
ASN1UINT range_value;
ASN1UINT adjusted_value;
int stat;
@@ -301,7 +301,7 @@ int encodeConsInteger
else {
range_value = upper + abs(lower);
adjusted_value = value + abs(lower);
- }
+ }
if (range_value != ASN1UINT_MAX) { range_value += 1; }
@@ -316,9 +316,9 @@ int encodeConsInteger
return stat;
}
-int encodeConsUnsigned
+int encodeConsUnsigned
(OOCTXT* pctxt, ASN1UINT value, ASN1UINT lower, ASN1UINT upper)
-{
+{
ASN1UINT range_value;
ASN1UINT adjusted_value;
int stat;
@@ -340,9 +340,9 @@ int encodeConsUnsigned
return stat;
}
-int encodeConsWholeNumber
+int encodeConsWholeNumber
(OOCTXT* pctxt, ASN1UINT adjusted_value, ASN1UINT range_value)
-{
+{
ASN1UINT nocts, range_bitcnt = getUIntBitCount (range_value - 1);
int stat;
@@ -396,8 +396,8 @@ int encodeConsWholeNumber
}
}
-int encodeConstrainedStringEx (OOCTXT* pctxt,
- const char* string,
+int encodeConstrainedStringEx (OOCTXT* pctxt,
+ const char* string,
const char* charSet,
ASN1UINT abits, /* aligned char bits */
ASN1UINT ubits, /* unaligned char bits */
@@ -460,7 +460,7 @@ int encodeExpandBuffer (OOCTXT* pctxt, ASN1UINT nbytes)
pctxt->buffer.data = (ASN1OCTET*) memHeapRealloc
(&pctxt->pMsgMemHeap, pctxt->buffer.data, pctxt->buffer.size);
-
+
if (!pctxt->buffer.data) return (ASN_E_NOMEM);
return (ASN_OK);
@@ -481,7 +481,7 @@ ASN1OCTET* encodeGetMsgPtr (OOCTXT* pctxt, int* pLength)
return pctxt->buffer.data;
}
-int encodeIdent (OOCTXT* pctxt, ASN1UINT ident)
+int encodeIdent (OOCTXT* pctxt, ASN1UINT ident)
{
ASN1UINT mask;
int nshifts = 0, stat;
@@ -508,9 +508,9 @@ int encodeIdent (OOCTXT* pctxt, ASN1UINT ident)
}
int encodeLength (OOCTXT* pctxt, ASN1UINT value)
-{
+{
ASN1BOOL extendable;
- Asn1SizeCnst* pSize =
+ Asn1SizeCnst* pSize =
checkSize (pctxt->pSizeConstraint, value, &extendable);
ASN1UINT lower = (pSize) ? pSize->lower : 0;
ASN1UINT upper = (pSize) ? pSize->upper : ASN1UINT_MAX;
@@ -520,7 +520,7 @@ int encodeLength (OOCTXT* pctxt, ASN1UINT value)
/* within the range of any of them, signal constraint violation */
/* error.. */
- if (pctxt->pSizeConstraint && !pSize)
+ if (pctxt->pSizeConstraint && !pSize)
return LOG_ASN1ERR (pctxt, ASN_E_CONSVIO);
/* Reset the size constraint in the context block structure */
@@ -578,11 +578,11 @@ int encodeObjectIdentifier (OOCTXT* pctxt, ASN1OBJID* pvalue)
if (0 == pvalue) return LOG_ASN1ERR (pctxt, ASN_E_INVOBJID);
if (numids < 2) return LOG_ASN1ERR (pctxt, ASN_E_INVOBJID);
if (pvalue->subid[0] > 2) return LOG_ASN1ERR (pctxt, ASN_E_INVOBJID);
- if (pvalue->subid[0] != 2 && pvalue->subid[1] > 39)
+ if (pvalue->subid[0] != 2 && pvalue->subid[1] > 39)
return LOG_ASN1ERR (pctxt, ASN_E_INVOBJID);
/* Passed checks, encode object identifier */
-
+
/* Munge first two sub ID's and encode */
temp = ((pvalue->subid[0] * 40) + pvalue->subid[1]);
@@ -600,7 +600,7 @@ int encodeObjectIdentifier (OOCTXT* pctxt, ASN1OBJID* pvalue)
}
int encodebitsFromOctet (OOCTXT* pctxt, ASN1OCTET value, ASN1UINT nbits)
-{
+{
int lshift = pctxt->buffer.bitOffset;
int rshift = 8 - pctxt->buffer.bitOffset;
int stat = ASN_OK;
@@ -640,14 +640,14 @@ int encodebitsFromOctet (OOCTXT* pctxt, ASN1OCTET value, ASN1UINT nbits)
/* possibly some bits in the following octet.. */
else {
- pctxt->buffer.data[pctxt->buffer.byteIndex] |=
+ pctxt->buffer.data[pctxt->buffer.byteIndex] |=
(ASN1OCTET)(value >> rshift);
pctxt->buffer.bitOffset -= nbits;
if (pctxt->buffer.bitOffset < 0) {
pctxt->buffer.byteIndex++;
- pctxt->buffer.data[pctxt->buffer.byteIndex] =
+ pctxt->buffer.data[pctxt->buffer.byteIndex] =
(ASN1OCTET)(value << lshift);
pctxt->buffer.bitOffset += 8;
}
@@ -657,7 +657,7 @@ int encodebitsFromOctet (OOCTXT* pctxt, ASN1OCTET value, ASN1UINT nbits)
}
int encodeOctets (OOCTXT* pctxt, const ASN1OCTET* pvalue, ASN1UINT nbits)
-{
+{
int i = 0, stat;
int numFullOcts = nbits / 8;
@@ -675,7 +675,7 @@ int encodeOctets (OOCTXT* pctxt, const ASN1OCTET* pvalue, ASN1UINT nbits)
/* encode buffer.. */
if (pctxt->buffer.bitOffset == 8) {
- memcpy (&pctxt->buffer.data[pctxt->buffer.byteIndex], pvalue,
+ memcpy (&pctxt->buffer.data[pctxt->buffer.byteIndex], pvalue,
numFullOcts);
pctxt->buffer.byteIndex += numFullOcts;
pctxt->buffer.data[pctxt->buffer.byteIndex] = 0;
@@ -714,7 +714,7 @@ int encodeOctetString (OOCTXT* pctxt, ASN1UINT numocts, const ASN1OCTET* data)
if (enclen > 0) {
ASN1BOOL doAlign;
- stat = bitAndOctetStringAlignmentTest
+ stat = bitAndOctetStringAlignmentTest
(pSizeList, numocts, FALSE, &doAlign);
if (stat != ASN_OK) return LOG_ASN1ERR (pctxt, stat);
@@ -793,7 +793,7 @@ int encodeOpenTypeExt (OOCTXT* pctxt, DList* pElemList)
stat = encodeByteAlign (pctxt);
if (stat != ASN_OK) return LOG_ASN1ERR (pctxt, stat);
- stat = encodeOpenType
+ stat = encodeOpenType
(pctxt, pOpenType->numocts, pOpenType->data);
if (stat != ASN_OK) return LOG_ASN1ERR (pctxt, stat);
@@ -833,7 +833,7 @@ int encodeSemiConsInteger (OOCTXT* pctxt, ASN1INT value, ASN1INT lower)
if (lower > ASN1INT_MIN)
value -= lower;
-
+
/* Calculate signed number value length */
for ( ; shift > 0; shift -= 8) {
@@ -889,10 +889,10 @@ int encodeSemiConsUnsigned (OOCTXT* pctxt, ASN1UINT value, ASN1UINT lower)
if ((stat = encodeLength (pctxt, nbytes)) < 0) {
return stat;
}
-
+
if ((stat = encodeByteAlign (pctxt)) != ASN_OK)
return stat;
-
+
/* Encode additional zero byte if necessary */
if (nbytes > sizeof(value)) {
@@ -908,7 +908,7 @@ int encodeSemiConsUnsigned (OOCTXT* pctxt, ASN1UINT value, ASN1UINT lower)
}
int encodeSmallNonNegWholeNumber (OOCTXT* pctxt, ASN1UINT value)
-{
+{
int stat;
if (value < 64) {
@@ -964,7 +964,7 @@ int encodeVarWidthCharString (OOCTXT* pctxt, const char* value)
return ASN_OK;
}
-static int encode16BitConstrainedString
+static int encode16BitConstrainedString
(OOCTXT* pctxt, Asn116BitCharString value, Asn116BitCharSet* pCharSet)
{
ASN1UINT i, pos;
@@ -985,7 +985,7 @@ static int encode16BitConstrainedString
for (i = 0; i < value.nchars; i++) {
if (pCharSet->charSet.data == 0) {
- stat = encodeBits
+ stat = encodeBits
(pctxt, value.data[i] - pCharSet->firstChar, nbits);
if (stat != ASN_OK) return LOG_ASN1ERR (pctxt, stat);
}
@@ -1051,7 +1051,7 @@ static int encodeNonNegBinInt (OOCTXT* pctxt, ASN1UINT value)
/* multiple of 8 bits and also satisifies the condition that the */
/* leading eight bits of the field shall not be zero unless the */
/* field is precisely 8 bits long. */
-
+
ASN1UINT bitcnt = (value == 0) ? 1 : getUIntBitCount (value);
/* round-up to nearest 8-bit boundary */
@@ -1093,7 +1093,7 @@ static int encodeUnconsLength (OOCTXT* pctxt, ASN1UINT value)
return enclen;
}
-static int getIdentByteCount (ASN1UINT ident)
+static int getIdentByteCount (ASN1UINT ident)
{
if (ident < (1u << 7)) { /* 7 */
return 1;
diff --git a/addons/ooh323c/src/errmgmt.c b/addons/ooh323c/src/errmgmt.c
index 6aef0f480..81e4cc3f0 100644
--- a/addons/ooh323c/src/errmgmt.c
+++ b/addons/ooh323c/src/errmgmt.c
@@ -1,15 +1,15 @@
/*
* Copyright (C) 1997-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.
*
*****************************************************************************/
@@ -49,21 +49,21 @@ static const char* g_status_text[] = {
"Value constraint violation: field %s, value %s",
"Value range error: lower bound is greater than upper",
"Unexpected end of file detected",
- "Invalid UTF-8 character at index %d",
- "List error: concurrent modification attempt while iterating",
+ "Invalid UTF-8 character at index %d",
+ "List error: concurrent modification attempt while iterating",
"List error: illegal state for attempted operation",
"Array index out of bounds",
"Invalid parameter passed to function or method",
"Invalid time string format",
- "Context is not initialized",
- "ASN.1 value will not fit in target variable",
- "Character is not within the defined character set",
- "Invalid XML state for attempted operation",
- "Error condition returned from XML parser:\n%s",
+ "Context is not initialized",
+ "ASN.1 value will not fit in target variable",
+ "Character is not within the defined character set",
+ "Invalid XML state for attempted operation",
+ "Error condition returned from XML parser:\n%s",
"SEQUENCE elements not in correct order",
"Invalid index for table constraint identifier",
- "Invalid value for relational table constraint fixed type field",
- "File not found",
+ "Invalid value for relational table constraint fixed type field",
+ "File not found",
"File read error",
"File write error",
"Invalid Base64 string",
@@ -153,7 +153,7 @@ char* errFmtMsg (ASN1ErrInfo* pErrInfo, char* bufp)
j = pcnt = 0;
tp = g_status_text[i];
- while (*tp)
+ while (*tp)
{
if (*tp == '%' && *(tp+1) == 's')
{
@@ -177,14 +177,14 @@ char* errFmtMsg (ASN1ErrInfo* pErrInfo, char* bufp)
}
else
strcpy (bufp, "unrecognized completion status");
- }
+ }
else strcpy (bufp, "normal completion status");
return (bufp);
}
/* Get error text in a dynamic memory buffer. This allocates memory */
-/* using the 'memAlloc' function. This memory is automatically freed */
+/* using the 'memAlloc' function. This memory is automatically freed */
/* at the time the 'memFree' function is called. */
char* errGetText (OOCTXT* pctxt)
@@ -199,7 +199,7 @@ char* errGetText (OOCTXT* pctxt)
while (pctxt->errInfo.stkx > 0) {
pctxt->errInfo.stkx--;
- sprintf (lbuf, " Module: %s, Line %d\n",
+ sprintf (lbuf, " Module: %s, Line %d\n",
pctxt->errInfo.stack[pctxt->errInfo.stkx].module,
pctxt->errInfo.stack[pctxt->errInfo.stkx].lineno);
strcat(pBuf, lbuf);
@@ -220,7 +220,7 @@ void errPrint (ASN1ErrInfo* pErrInfo)
printf ("Stack trace:");
while (pErrInfo->stkx > 0) {
pErrInfo->stkx--;
- printf (" Module: %s, Line %d\n",
+ printf (" Module: %s, Line %d\n",
pErrInfo->stack[pErrInfo->stkx].module,
pErrInfo->stack[pErrInfo->stkx].lineno);
}
@@ -244,9 +244,9 @@ int errCopyData (ASN1ErrInfo* pSrcErrInfo, ASN1ErrInfo* pDestErrInfo)
for (i = 0; i < pSrcErrInfo->stkx; i++) {
if (pDestErrInfo->stkx < ASN_K_MAXERRSTK) {
- pDestErrInfo->stack[pDestErrInfo->stkx].module =
+ pDestErrInfo->stack[pDestErrInfo->stkx].module =
pSrcErrInfo->stack[i].module;
- pDestErrInfo->stack[pDestErrInfo->stkx++].lineno =
+ pDestErrInfo->stack[pDestErrInfo->stkx++].lineno =
pSrcErrInfo->stack[i].lineno;
}
}
@@ -255,12 +255,12 @@ int errCopyData (ASN1ErrInfo* pSrcErrInfo, ASN1ErrInfo* pDestErrInfo)
}
-int errSetData (ASN1ErrInfo* pErrInfo, int status,
- const char* module, int lno)
-{
+int errSetData (ASN1ErrInfo* pErrInfo, int status,
+ const char* module, int lno)
+{
if (pErrInfo->status == 0) {
pErrInfo->status = status;
}
ooLogAsn1Error(status, module, lno);
- return status;
+ return status;
}
diff --git a/addons/ooh323c/src/eventHandler.c b/addons/ooh323c/src/eventHandler.c
index 82e1eb435..ba25d0bef 100644
--- a/addons/ooh323c/src/eventHandler.c
+++ b/addons/ooh323c/src/eventHandler.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.
*
*****************************************************************************/
@@ -64,7 +64,7 @@ void invokeUIntValue (OOCTXT* pctxt, ASN1UINT value)
}
}
-void invokeBitStrValue (OOCTXT* pctxt, ASN1UINT numbits,
+void invokeBitStrValue (OOCTXT* pctxt, ASN1UINT numbits,
const ASN1OCTET* data)
{
if (0 != pctxt->pEventHandler) {
@@ -72,7 +72,7 @@ void invokeBitStrValue (OOCTXT* pctxt, ASN1UINT numbits,
}
}
-void invokeOctStrValue (OOCTXT* pctxt, ASN1UINT numocts,
+void invokeOctStrValue (OOCTXT* pctxt, ASN1UINT numocts,
const ASN1OCTET* data)
{
if (0 != pctxt->pEventHandler) {
@@ -87,7 +87,7 @@ void invokeCharStrValue (OOCTXT* pctxt, const char* value)
}
}
-void invokeCharStr16BitValue (OOCTXT* pctxt, ASN1UINT nchars,
+void invokeCharStr16BitValue (OOCTXT* pctxt, ASN1UINT nchars,
ASN116BITCHAR* data)
{
if (0 != pctxt->pEventHandler) {
@@ -116,7 +116,7 @@ void invokeEnumValue (OOCTXT* pctxt, ASN1UINT value)
}
}
-void invokeOpenTypeValue (OOCTXT* pctxt, ASN1UINT numocts,
+void invokeOpenTypeValue (OOCTXT* pctxt, ASN1UINT numocts,
const ASN1OCTET* data)
{
if (0 != pctxt->pEventHandler) {
diff --git a/addons/ooh323c/src/eventHandler.h b/addons/ooh323c/src/eventHandler.h
index e5eff605b..32719c58a 100644
--- a/addons/ooh323c/src/eventHandler.h
+++ b/addons/ooh323c/src/eventHandler.h
@@ -1,21 +1,21 @@
/*
* 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.
*
*****************************************************************************/
/**
- * @file eventHandler.h
- * C event handler structure. This structure holds event handler function
+ * @file eventHandler.h
+ * C event handler structure. This structure holds event handler function
* callbacks for use by the generated code.
*/
/**
@@ -44,8 +44,8 @@ extern "C" {
/**
- * This is a function pointer for a callback function which is invoked
- * from within a decode function when an element of a SEQUENCE, SET,
+ * This is a function pointer for a callback function which is invoked
+ * from within a decode function when an element of a SEQUENCE, SET,
* SEQUENCE OF, SET OF, or CHOICE construct is parsed.
*
* @param name For SEQUENCE, SET, or CHOICE, this is the name of the
@@ -63,8 +63,8 @@ typedef void (*StartElement) (const char* name, int index) ;
/**
- * This is a function pointer for a callback function which is invoked from
- * within a decode function when parsing is complete on an element of a
+ * This is a function pointer for a callback function which is invoked from
+ * within a decode function when parsing is complete on an element of a
* SEQUENCE, SET, SEQUENCE OF, SET OF, or CHOICE construct.
*
* @param name For SEQUENCE, SET, or CHOICE, this is the name of the
@@ -82,7 +82,7 @@ typedef void (*EndElement) (const char* name, int index) ;
/**
- * This is a function pointer for a callback function which is invoked from
+ * This is a function pointer for a callback function which is invoked from
* within a decode function when a value of the BOOLEAN ASN.1 type is parsed.
*
* @param value Parsed value.
@@ -91,7 +91,7 @@ typedef void (*EndElement) (const char* name, int index) ;
typedef void (*BoolValue) (ASN1BOOL value);
/**
- * This is a function pointer for a callback function which is invoked from
+ * This is a function pointer for a callback function which is invoked from
* within a decode function when a value of the INTERGER ASN.1 type is parsed.
*
* @param value Parsed value.
@@ -100,9 +100,9 @@ typedef void (*BoolValue) (ASN1BOOL value);
typedef void (*IntValue) (ASN1INT value);
/**
- * This is a function pointer for a callback function which is invoked
- * from within a decode function when a value of the INTEGER ASN.1 type
- * is parsed. In this case, constraints on the integer value forced the
+ * This is a function pointer for a callback function which is invoked
+ * from within a decode function when a value of the INTEGER ASN.1 type
+ * is parsed. In this case, constraints on the integer value forced the
* use of unsigned integer C type to represent the value.
*
* @param value Parsed value.
@@ -111,19 +111,19 @@ typedef void (*IntValue) (ASN1INT value);
typedef void (*UIntValue) (ASN1UINT value);
/**
- * This is a function pointer for a callback function which is invoked from
- * within a decode function when a value of the BIT STRING ASN.1 type is
+ * This is a function pointer for a callback function which is invoked from
+ * within a decode function when a value of the BIT STRING ASN.1 type is
* parsed.
*
- * @param numbits - Number of bits in the parsed value.
- * @param data - Pointer to a byte array that contains the bit
+ * @param numbits - Number of bits in the parsed value.
+ * @param data - Pointer to a byte array that contains the bit
* string data.
* @return - none
- */
+ */
typedef void (*BitStrValue) (ASN1UINT numbits, const ASN1OCTET* data);
/**
- * This is a function pointer for a callback function which is invoked from
+ * This is a function pointer for a callback function which is invoked from
* within a decode function when a value of one of the OCTET STRING ASN.1 type
* is parsed.
*
@@ -135,8 +135,8 @@ typedef void (*BitStrValue) (ASN1UINT numbits, const ASN1OCTET* data);
typedef void (*OctStrValue) (ASN1UINT numocts, const ASN1OCTET* data) ;
/**
- * This is a function pointer for a callback function which is invoked from
- * within a decode function when a value of one of the 8-bit ASN.1 character
+ * This is a function pointer for a callback function which is invoked from
+ * within a decode function when a value of one of the 8-bit ASN.1 character
* string types is parsed.
*
* @param value Null terminated character string value.
@@ -145,8 +145,8 @@ typedef void (*OctStrValue) (ASN1UINT numocts, const ASN1OCTET* data) ;
typedef void (*CharStrValue) (const char* value) ;
/**
- * This is a function pointer for a callback function which is invoked from
- * within a decode function when a value of one of the 16-bit ASN.1 character
+ * This is a function pointer for a callback function which is invoked from
+ * within a decode function when a value of one of the 16-bit ASN.1 character
* string types is parsed.
*
* This is used for the ASN.1 BmpString type.
@@ -160,7 +160,7 @@ typedef void (*CharStrValue) (const char* value) ;
typedef void (*CharStrValue16Bit) (ASN1UINT nchars, ASN116BITCHAR* data) ;
/**
- * This is a function pointer for a callback function which is invoked from
+ * This is a function pointer for a callback function which is invoked from
* within a decode function when a value of the NULL ASN.1 type is parsed.
*
* @param - none
@@ -169,8 +169,8 @@ typedef void (*CharStrValue16Bit) (ASN1UINT nchars, ASN116BITCHAR* data) ;
typedef void (*NullValue) (void) ;
/**
- * This is a function pointer for a callback function which is invoked from
- * within a decode function whn a value the OBJECT IDENTIFIER ASN.1 type is
+ * This is a function pointer for a callback function which is invoked from
+ * within a decode function whn a value the OBJECT IDENTIFIER ASN.1 type is
* parsed.
*
* @param numSubIds Number of subidentifiers in the object identifier.
@@ -180,8 +180,8 @@ typedef void (*NullValue) (void) ;
typedef void (*OidValue) (ASN1UINT numSubIds, ASN1UINT* pSubIds) ;
/**
- * This is a function pointer for a callback function which is invoked from
- * within a decode function when a value of the ENUMERATED ASN.1 type is
+ * This is a function pointer for a callback function which is invoked from
+ * within a decode function when a value of the ENUMERATED ASN.1 type is
* parsed.
*
* @param value - Parsed enumerated value
@@ -190,7 +190,7 @@ typedef void (*OidValue) (ASN1UINT numSubIds, ASN1UINT* pSubIds) ;
typedef void (*EnumValue) (ASN1UINT value) ;
/**
- * This is a function pointer for a callback function which is invoked from
+ * This is a function pointer for a callback function which is invoked from
* within a decode function when an ASN.1 open type is parsed.
*
* @param numocts Number of octets in the parsed value.
@@ -223,7 +223,7 @@ typedef struct EventHandler {
/**
- * This function sets the event handler object within the context. It
+ * This function sets the event handler object within the context. It
* will overwrite the definition of any handler that was set previously.
*
* @param pctxt Context to which event handler has to be added.
@@ -233,8 +233,8 @@ typedef struct EventHandler {
EXTERN void setEventHandler (OOCTXT* pctxt, EventHandler* pHandler);
/**
- * This function is called to remove the event handler current defined
- * in the context. This is done by setting the event handler object
+ * This function is called to remove the event handler current defined
+ * in the context. This is done by setting the event handler object
* pointer to NULL.
*
* @param pctxt Context from which event handler has to be removed.
@@ -243,7 +243,7 @@ EXTERN void setEventHandler (OOCTXT* pctxt, EventHandler* pHandler);
EXTERN void removeEventHandler (OOCTXT* pctxt);
/**
- * The following functions are invoked from within the generated
+ * The following functions are invoked from within the generated
* code to call the various user-defined event handler methods ..
*/
EXTERN void invokeStartElement (OOCTXT* pctxt, const char* name, int index);
@@ -252,33 +252,33 @@ EXTERN void invokeBoolValue (OOCTXT* pctxt, ASN1BOOL value);
EXTERN void invokeIntValue (OOCTXT* pctxt, ASN1INT value);
EXTERN void invokeUIntValue (OOCTXT* pctxt, ASN1UINT value);
-EXTERN void invokeBitStrValue
+EXTERN void invokeBitStrValue
(OOCTXT* pctxt, ASN1UINT numbits, const ASN1OCTET* data);
-EXTERN void invokeOctStrValue
+EXTERN void invokeOctStrValue
(OOCTXT* pctxt, ASN1UINT numocts, const ASN1OCTET* data);
EXTERN void invokeCharStrValue (OOCTXT* pctxt, const char* value);
-EXTERN void invokeCharStr16BitValue
+EXTERN void invokeCharStr16BitValue
(OOCTXT* pctxt, ASN1UINT nchars, ASN116BITCHAR* data);
EXTERN void invokeNullValue (OOCTXT* pctxt);
-EXTERN void invokeOidValue
+EXTERN void invokeOidValue
(OOCTXT* pctxt, ASN1UINT numSubIds, ASN1UINT* pSubIds);
EXTERN void invokeEnumValue (OOCTXT* pctxt, ASN1UINT value);
-EXTERN void invokeOpenTypeValue
+EXTERN void invokeOpenTypeValue
(OOCTXT* pctxt, ASN1UINT numocts, const ASN1OCTET* data);
-/**
- * @}
+/**
+ * @}
*/
#ifdef __cplusplus
}
#endif
-#endif
+#endif
diff --git a/addons/ooh323c/src/h323/H235-SECURITY-MESSAGES.h b/addons/ooh323c/src/h323/H235-SECURITY-MESSAGES.h
index 2f401b39a..9884f8b23 100644
--- a/addons/ooh323c/src/h323/H235-SECURITY-MESSAGES.h
+++ b/addons/ooh323c/src/h323/H235-SECURITY-MESSAGES.h
@@ -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.
*
*****************************************************************************/
diff --git a/addons/ooh323c/src/h323/H235-SECURITY-MESSAGESDec.c b/addons/ooh323c/src/h323/H235-SECURITY-MESSAGESDec.c
index 5ee406956..cf8e0a799 100644
--- a/addons/ooh323c/src/h323/H235-SECURITY-MESSAGESDec.c
+++ b/addons/ooh323c/src/h323/H235-SECURITY-MESSAGESDec.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.
*
*****************************************************************************/
@@ -1797,4 +1797,3 @@ EXTERN int asn1PD_H235CryptoToken (OOCTXT* pctxt, H235CryptoToken* pvalue)
return (stat);
}
-
diff --git a/addons/ooh323c/src/h323/H235-SECURITY-MESSAGESEnc.c b/addons/ooh323c/src/h323/H235-SECURITY-MESSAGESEnc.c
index 8530c5198..75f83f512 100644
--- a/addons/ooh323c/src/h323/H235-SECURITY-MESSAGESEnc.c
+++ b/addons/ooh323c/src/h323/H235-SECURITY-MESSAGESEnc.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.
*
*****************************************************************************/
@@ -1266,4 +1266,3 @@ EXTERN int asn1PE_H235CryptoToken (OOCTXT* pctxt, H235CryptoToken* pvalue)
return (stat);
}
-
diff --git a/addons/ooh323c/src/h323/H323-MESSAGES.c b/addons/ooh323c/src/h323/H323-MESSAGES.c
index 2c27f3b93..8f750b9fb 100644
--- a/addons/ooh323c/src/h323/H323-MESSAGES.c
+++ b/addons/ooh323c/src/h323/H323-MESSAGES.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.
*
*****************************************************************************/
@@ -109,4 +109,3 @@ EXTERN const char* gs_H323_MESSAGES_GSM_UIM_vplmn_CharSet =
EXTERN const char* gs_H323_MESSAGES_AliasAddress_dialedDigits_CharSet =
"#*,0123456789";
-
diff --git a/addons/ooh323c/src/h323/H323-MESSAGES.h b/addons/ooh323c/src/h323/H323-MESSAGES.h
index 733b58f86..eb32ad9c9 100644
--- a/addons/ooh323c/src/h323/H323-MESSAGES.h
+++ b/addons/ooh323c/src/h323/H323-MESSAGES.h
@@ -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.
*
*****************************************************************************/
diff --git a/addons/ooh323c/src/h323/H323-MESSAGESDec.c b/addons/ooh323c/src/h323/H323-MESSAGESDec.c
index 503d7965f..4a641e43b 100644
--- a/addons/ooh323c/src/h323/H323-MESSAGESDec.c
+++ b/addons/ooh323c/src/h323/H323-MESSAGESDec.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.
*
*****************************************************************************/
@@ -27197,4 +27197,3 @@ EXTERN int asn1PD_H225RasMessage (OOCTXT* pctxt, H225RasMessage* pvalue)
return (stat);
}
-
diff --git a/addons/ooh323c/src/h323/H323-MESSAGESEnc.c b/addons/ooh323c/src/h323/H323-MESSAGESEnc.c
index f818fb20c..20159008a 100644
--- a/addons/ooh323c/src/h323/H323-MESSAGESEnc.c
+++ b/addons/ooh323c/src/h323/H323-MESSAGESEnc.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.
*
*****************************************************************************/
@@ -22593,4 +22593,3 @@ EXTERN int asn1PE_H225RasMessage (OOCTXT* pctxt, H225RasMessage* pvalue)
return (stat);
}
-
diff --git a/addons/ooh323c/src/h323/MULTIMEDIA-SYSTEM-CONTROL.c b/addons/ooh323c/src/h323/MULTIMEDIA-SYSTEM-CONTROL.c
index ca69407a6..3771d1ab7 100644
--- a/addons/ooh323c/src/h323/MULTIMEDIA-SYSTEM-CONTROL.c
+++ b/addons/ooh323c/src/h323/MULTIMEDIA-SYSTEM-CONTROL.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.
*
*****************************************************************************/
@@ -37,4 +37,3 @@ EXTERN const char* gs_MULTIMEDIA_SYSTEM_CONTROL_NetworkAccessParameters_networkA
EXTERN const char* gs_MULTIMEDIA_SYSTEM_CONTROL_UserInputIndication_signal_signalType_CharSet =
"!#*0123456789ABCD";
-
diff --git a/addons/ooh323c/src/h323/MULTIMEDIA-SYSTEM-CONTROL.h b/addons/ooh323c/src/h323/MULTIMEDIA-SYSTEM-CONTROL.h
index 6923cba5a..240a800ae 100644
--- a/addons/ooh323c/src/h323/MULTIMEDIA-SYSTEM-CONTROL.h
+++ b/addons/ooh323c/src/h323/MULTIMEDIA-SYSTEM-CONTROL.h
@@ -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.
*
*****************************************************************************/
diff --git a/addons/ooh323c/src/h323/MULTIMEDIA-SYSTEM-CONTROLDec.c b/addons/ooh323c/src/h323/MULTIMEDIA-SYSTEM-CONTROLDec.c
index 0875f689d..7d6aecb51 100644
--- a/addons/ooh323c/src/h323/MULTIMEDIA-SYSTEM-CONTROLDec.c
+++ b/addons/ooh323c/src/h323/MULTIMEDIA-SYSTEM-CONTROLDec.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.
*
*****************************************************************************/
@@ -42167,4 +42167,3 @@ EXTERN int asn1PD_H245MultimediaSystemControlMessage (OOCTXT* pctxt, H245Multime
return (stat);
}
-
diff --git a/addons/ooh323c/src/h323/MULTIMEDIA-SYSTEM-CONTROLEnc.c b/addons/ooh323c/src/h323/MULTIMEDIA-SYSTEM-CONTROLEnc.c
index ac124d96d..65adf6f8c 100644
--- a/addons/ooh323c/src/h323/MULTIMEDIA-SYSTEM-CONTROLEnc.c
+++ b/addons/ooh323c/src/h323/MULTIMEDIA-SYSTEM-CONTROLEnc.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.
*
*****************************************************************************/
@@ -26596,4 +26596,3 @@ EXTERN int asn1PE_H245MultimediaSystemControlMessage (OOCTXT* pctxt, H245Multime
return (stat);
}
-
diff --git a/addons/ooh323c/src/memheap.c b/addons/ooh323c/src/memheap.c
index 99a530848..4bcbd7a3d 100644
--- a/addons/ooh323c/src/memheap.c
+++ b/addons/ooh323c/src/memheap.c
@@ -1,15 +1,15 @@
/*
* Copyright (C) 1997-2004 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 LICENSE.txt 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 LICENSE.txt 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.
*
*****************************************************************************/
@@ -21,7 +21,7 @@
ASN1UINT g_defBlkSize = XM_K_MEMBLKSIZ;
-static OSMemLink* memHeapAddBlock (OSMemLink** ppMemLink,
+static OSMemLink* memHeapAddBlock (OSMemLink** ppMemLink,
void* pMemBlk, int blockType);
typedef void OSMemElemDescr;
@@ -110,39 +110,39 @@ pMemBlk->freeElemOff = (ASN1USINT)(QOFFSETOF (pElem, pMemBlk->data) + 1); \
#define SET_FREE_ELEM(pMemBlk, pElem) setLastElem (pMemBlk, pElem)
/* Memory debugging macros */
-#define RTMEMDIAG1(msg)
-#define RTMEMDIAG2(msg,a)
+#define RTMEMDIAG1(msg)
+#define RTMEMDIAG2(msg,a)
#define RTMEMDIAG3(msg,a,b)
#define RTMEMDIAG4(msg,a,b,c)
#define FILLFREEMEM(mem,size)
-#define FILLNEWMEM(mem,size)
+#define FILLNEWMEM(mem,size)
#define CHECKMEMELEM(memblk,elem)
#define CHECKMEMBLOCK(memheap,memblk)
-#define CHECKMEMHEAP(memheap)
+#define CHECKMEMHEAP(memheap)
#define TRACEMEMELEM(memblk, elem, name)
#define TRACEFREE(memlink,name)
-static void setLastElem (OSMemBlk* pMemBlk, OSMemElemDescr* pElem)
+static void setLastElem (OSMemBlk* pMemBlk, OSMemElemDescr* pElem)
{
- if (pElem == 0) {
- pMemBlk->freeElemOff = 0;
- return;
+ if (pElem == 0) {
+ pMemBlk->freeElemOff = 0;
+ return;
}
- else if (ISLAST (pElem))
- return;
+ else if (ISLAST (pElem))
+ return;
else if (pMemBlk->freeElemOff > QOFFSETOF (pElem, pMemBlk->data) + 1) {
- pElem_nextFreeOff (pElem) = QOFFSETOF (GET_FREE_ELEM (pMemBlk), pElem);
- FORCE_SET_FREE_ELEM (pMemBlk, pElem);
- }
- else if (pMemBlk->freeElemOff == 0) {
- pElem_nextFreeOff (pElem) = 0;
- FORCE_SET_FREE_ELEM (pMemBlk, pElem);
- }
- else {
- SET_FREE (pElem);
- pElem_nextFreeOff (pElem) = 0;
+ pElem_nextFreeOff (pElem) = QOFFSETOF (GET_FREE_ELEM (pMemBlk), pElem);
+ FORCE_SET_FREE_ELEM (pMemBlk, pElem);
+ }
+ else if (pMemBlk->freeElemOff == 0) {
+ pElem_nextFreeOff (pElem) = 0;
+ FORCE_SET_FREE_ELEM (pMemBlk, pElem);
+ }
+ else {
+ SET_FREE (pElem);
+ pElem_nextFreeOff (pElem) = 0;
}
}
@@ -171,7 +171,7 @@ void* memHeapAlloc (void** ppvMemHeap, int nbytes)
ppMemLink = &pMemHeap->phead;
/* if size is greater than 2**19, then allocate as RAW block */
-
+
if (nunits > (1<<16) - 2) {
void *data;
@@ -189,9 +189,9 @@ void* memHeapAlloc (void** ppvMemHeap, int nbytes)
/* save size of the RAW memory block behind the pMemLink */
*(int*)(((char*)pMemLink) + sizeof (OSMemLink)) = nbytes;
ast_mutex_unlock(&pMemHeap->pLock);
- return data;
+ return data;
}
-
+
RTMEMDIAG2 ("memHeapAlloc: adjusted nbytes = %d\n", nbytes);
/* Try to allocate a slot from an existing block on the list */
@@ -217,26 +217,26 @@ void* memHeapAlloc (void** ppvMemHeap, int nbytes)
pElem_flags (pElem) = 0;
if (pMemBlk->lastElemOff != 0)
- pElem_prevOff (pElem) =
+ pElem_prevOff (pElem) =
(ASN1USINT)(pMemBlk->free_x - pMemBlk->lastElemOff + 1);
- else
+ else
pElem_prevOff (pElem) = 0;
-
+
pPrevElem = GET_LAST_ELEM (pMemBlk);
if (pPrevElem != 0)
CLEAR_LAST (pPrevElem);
-
- pElem_nunits (pElem) = (ASN1USINT)nunits;
+
+ pElem_nunits (pElem) = (ASN1USINT)nunits;
pElem_beginOff (pElem) = QOFFSETOF (pElem, pMemBlk->data);
pMemBlk->lastElemOff = (ASN1USINT)(pMemBlk->free_x + 1);
mem_p = (void*) (pElem_data (pElem));
-
+
/* sizeof (OSMemElemDescr) == 1 unit */
- pMemBlk->free_x += nunits + 1;
-
+ pMemBlk->free_x += nunits + 1;
+
SET_LAST_ELEM (pMemBlk, pElem);
-
+
FILLNEWMEM (mem_p, nunits * 8u);
TRACEMEMELEM(pMemBlk, pElem, "Allocated");
CHECKMEMELEM (pMemBlk, pElem);
@@ -250,54 +250,54 @@ void* memHeapAlloc (void** ppvMemHeap, int nbytes)
if (0 == mem_p) {
for (pMemLink = *ppMemLink; pMemLink != 0; pMemLink = pMemLink->pnext) {
if (pMemLink->blockType & RTMEMRAW) continue;
-
+
pMemBlk = (OSMemBlk*) pMemLink->pMemBlk;
if (nunits <= (ASN1UINT)pMemBlk->freeMem) {
OSMemElemDescr* pElem = GET_FREE_ELEM(pMemBlk), *pPrevFree = 0;
- RTMEMDIAG2
- ("memHeapAlloc: try to reuse empty elems in pMemBlk = 0x%x...\n",
+ RTMEMDIAG2
+ ("memHeapAlloc: try to reuse empty elems in pMemBlk = 0x%x...\n",
pMemBlk);
while (pElem != 0) {
- if (ISFREE (pElem)) {
+ if (ISFREE (pElem)) {
if (nunits <= (ASN1UINT)pElem_nunits (pElem)) {
- RTMEMDIAG3
+ RTMEMDIAG3
("memHeapAlloc: "
- "found an exisiting free element 0x%x, size %d\n",
+ "found an exisiting free element 0x%x, size %d\n",
pElem, (pElem_nunits (pElem) * 8u));
-
- if (pMemBlk->freeElemOff ==
- QOFFSETOF (pElem, pMemBlk->data) + 1)
+
+ if (pMemBlk->freeElemOff ==
+ QOFFSETOF (pElem, pMemBlk->data) + 1)
{
-
+
/* modify the pMemBlk->freeElemOff value if necsry */
OSMemElemDescr* nextFree = GET_NEXT_FREE (pElem);
- FORCE_SET_FREE_ELEM (pMemBlk, nextFree);
+ FORCE_SET_FREE_ELEM (pMemBlk, nextFree);
}
else if (pPrevFree != 0) {
OSMemElemDescr* pNextFree = GET_NEXT_FREE (pElem);
if (pNextFree != 0)
- pElem_nextFreeOff (pPrevFree) = QOFFSETOF (pNextFree,
+ pElem_nextFreeOff (pPrevFree) = QOFFSETOF (pNextFree,
pPrevFree);
else
pElem_nextFreeOff (pPrevFree) = 0;
- }
+ }
CLEAR_FREE (pElem);
/* set beginOff value */
pElem_beginOff (pElem) = QOFFSETOF (pElem, pMemBlk->data);
-
+
pMemBlk->freeMem -= pElem_nunits (pElem);
CHECKMEMELEM (pMemBlk, pElem);
CHECKMEMBLOCK (pMemHeap, pMemBlk);
-
- mem_p = memHeapRealloc
+
+ mem_p = memHeapRealloc
(ppvMemHeap, pElem_data (pElem), nunits * 8u);
if (mem_p != 0) {
FILLNEWMEM (mem_p, nunits * 8u);
@@ -311,7 +311,7 @@ void* memHeapAlloc (void** ppvMemHeap, int nbytes)
}
if (mem_p != 0) break;
}
- }
+ }
}
/* If not successful, malloc a new block and alloc from it */
@@ -323,16 +323,16 @@ void* memHeapAlloc (void** ppvMemHeap, int nbytes)
RTMEMDIAG1 ("memHeapAlloc: alloc block..\n");
- allocSize = (ASN1UINT) ((((ASN1UINT)nunits) * 8u) +
+ allocSize = (ASN1UINT) ((((ASN1UINT)nunits) * 8u) +
sizeof (OSMemBlk) + sizeof_OSMemElemDescr);
- allocSize = (ASN1UINT) (allocSize < defBlkSize) ? defBlkSize :
+ allocSize = (ASN1UINT) (allocSize < defBlkSize) ? defBlkSize :
((allocSize + defBlkSize - 1) / defBlkSize * defBlkSize);
dataUnits = (ASN1UINT)((allocSize - sizeof (OSMemBlk)) >> 3u);
if (dataUnits >= (1u<<16)) {
dataUnits = (ASN1UINT)((1u<<16) - 1);
allocSize = (ASN1UINT)
((((ASN1UINT)dataUnits) * 8u) + sizeof (OSMemBlk));
- }
+ }
pmem = (ASN1OCTET*) ast_malloc(allocSize + sizeof (OSMemLink));
if (0 != pmem) {
@@ -348,7 +348,7 @@ void* memHeapAlloc (void** ppvMemHeap, int nbytes)
pElem_beginOff (pElem) = QOFFSETOF (pElem, pMemBlk->data);
/* sizeof (OSMemElemDescr) == 1 unit */
- pMemBlk->free_x = (ASN1USINT)(nunits + 1);
+ pMemBlk->free_x = (ASN1USINT)(nunits + 1);
pMemBlk->freeMem = 0;
pMemBlk->nunits = (ASN1USINT)dataUnits;
@@ -356,7 +356,7 @@ void* memHeapAlloc (void** ppvMemHeap, int nbytes)
pMemBlk->freeElemOff = 0;
pMemBlk->nsaved = 0;
- if (memHeapAddBlock (ppMemLink, pMemBlk, RTMEMSTD | RTMEMLINK) == 0)
+ if (memHeapAddBlock (ppMemLink, pMemBlk, RTMEMSTD | RTMEMLINK) == 0)
{
ast_free(pmem);
ast_mutex_unlock(&pMemHeap->pLock);
@@ -379,7 +379,7 @@ void* memHeapAlloc (void** ppvMemHeap, int nbytes)
}
RTMEMDIAG2 ("memHeapAlloc: pMemBlk = 0x%x\n", pMemBlk);
RTMEMDIAG2 ("memHeapAlloc: pMemBlk->free_x = %d\n", pMemBlk->free_x);
- RTMEMDIAG2 ("memHeapAlloc: pMemBlk->size = %d\n",
+ RTMEMDIAG2 ("memHeapAlloc: pMemBlk->size = %d\n",
pMemBlk->nunits * 8u);
RTMEMDIAG2 ("memHeapAlloc: mem_p = 0x%x\n", mem_p);
RTMEMDIAG2 ("memHeapAlloc: sizeof (short) = %d\n", sizeof(short));
@@ -395,7 +395,7 @@ void* memHeapAllocZ (void** ppvMemHeap, int nbytes)
return ptr;
}
-void memHeapFreePtr (void** ppvMemHeap, void* mem_p)
+void memHeapFreePtr (void** ppvMemHeap, void* mem_p)
{
OSMemHeap* pMemHeap;
OSMemLink** ppMemLink;
@@ -417,7 +417,7 @@ void memHeapFreePtr (void** ppvMemHeap, void* mem_p)
for (pMemLink = *ppMemLink; pMemLink != 0; pMemLink = pMemLink->pnextRaw) {
if ((pMemLink->blockType & RTMEMRAW) &&
- pMemLink->pMemBlk == mem_p)
+ pMemLink->pMemBlk == mem_p)
{
if(pMemLink->pnext != 0) {
pMemLink->pnext->pprev = pMemLink->pprev;
@@ -430,12 +430,12 @@ void memHeapFreePtr (void** ppvMemHeap, void* mem_p)
}
if (pPrevMemLink != 0)
pPrevMemLink->pnextRaw = pMemLink->pnextRaw;
- else if (*ppMemLink != 0 && (*ppMemLink)->pnextRaw == 0 &&
+ else if (*ppMemLink != 0 && (*ppMemLink)->pnextRaw == 0 &&
*ppMemLink != pMemLink->pnextRaw)
{
(*ppMemLink)->pnextRaw = pMemLink->pnextRaw;
}
- if ((pMemLink->blockType & RTMEMLINK) &&
+ if ((pMemLink->blockType & RTMEMLINK) &&
(pMemLink->blockType & RTMEMMALLOC))
{
ast_free(pMemLink);
@@ -461,7 +461,7 @@ void memHeapFreePtr (void** ppvMemHeap, void* mem_p)
RTMEMDIAG2 ("memHeapFreePtr: "
"the element 0x%x is already freed!\n", pElem);
ast_mutex_unlock(&pMemHeap->pLock);
- return;
+ return;
}
if (ISSAVED (pElem)) {
@@ -475,17 +475,17 @@ void memHeapFreePtr (void** ppvMemHeap, void* mem_p)
CHECKMEMBLOCK(pMemHeap, pMemBlk);
RTMEMDIAG2 ("memHeapFreePtr: pMemBlk = 0x%x\n", pMemBlk);
- RTMEMDIAG2 ("memHeapFreePtr: pMemBlk->size = %d\n",
+ RTMEMDIAG2 ("memHeapFreePtr: pMemBlk->size = %d\n",
pMemBlk->nunits * 8u);
if (ISLAST (pElem)) { /* is it the last? */
OSMemElemDescr* pPrevElem = GETPREV (pElem);
-
+
CHECKMEMELEM (pMemBlk, pPrevElem);
pMemBlk->free_x -= (pElem_nunits (pElem) + 1);
- FILLFREEMEM (&pMemBlk->data [pMemBlk->free_x * 8u],
+ FILLFREEMEM (&pMemBlk->data [pMemBlk->free_x * 8u],
(pElem_nunits (pElem) + 1) * 8u);
if (pPrevElem != 0 && ISFREE (pPrevElem)) {
@@ -494,10 +494,10 @@ void memHeapFreePtr (void** ppvMemHeap, void* mem_p)
pMemBlk->free_x -= (pElem_nunits (pPrevElem) + 1);
pMemBlk->freeMem -= pElem_nunits (pPrevElem);
SET_LAST_ELEM (pMemBlk, GETPREV (pPrevElem));
-
+
/* wasn't it the last elem in block? */
- if (pMemBlk->lastElemOff != 0) {
-
+ if (pMemBlk->lastElemOff != 0) {
+
/* correct nextFreeOff for previous free element */
pFreeElem = GET_FREE_ELEM (pMemBlk);
@@ -506,7 +506,7 @@ void memHeapFreePtr (void** ppvMemHeap, void* mem_p)
}
else {
OSMemElemDescr* pNextFree = 0;
-
+
while (pFreeElem < pPrevElem) {
pNextFree = pFreeElem;
pFreeElem = GET_NEXT_FREE (pFreeElem);
@@ -519,15 +519,15 @@ void memHeapFreePtr (void** ppvMemHeap, void* mem_p)
SET_LAST_ELEM (pMemBlk, pPrevElem);
}
- RTMEMDIAG2 ("memHeapFreePtr: pMemBlk->free_x = %d\n",
+ RTMEMDIAG2 ("memHeapFreePtr: pMemBlk->free_x = %d\n",
pMemBlk->free_x);
/* The question is: do we really want to get rid of the */
/* block or should we keep it around for reuse? */
if (pMemBlk->lastElemOff == 0) { /* was it the last elem in block? */
-
+
if ((pMemHeap->flags & RT_MH_DONTKEEPFREE) ||
- (pMemHeap->keepFreeUnits > 0 &&
+ (pMemHeap->keepFreeUnits > 0 &&
pMemHeap->freeUnits + pMemBlk->nunits > pMemHeap->keepFreeUnits))
{
ASN1OCTET blockType = pMemBlk->plink->blockType;
@@ -544,7 +544,7 @@ void memHeapFreePtr (void** ppvMemHeap, void* mem_p)
pMemBlk->plink->pprev->pnext = pMemBlk->plink->pnext;
}
else { /* head */
- if (pMemBlk->plink->pnext != 0 &&
+ if (pMemBlk->plink->pnext != 0 &&
!(pMemBlk->plink->pnext->blockType & RTMEMRAW))
{
pMemBlk->plink->pnext->pnextRaw = (*ppMemLink)->pnextRaw;
@@ -553,14 +553,14 @@ void memHeapFreePtr (void** ppvMemHeap, void* mem_p)
}
FILLFREEMEM (pMemBlk->plink, sizeof (*pMemBlk->plink));
FILLFREEMEM (pMemBlk->data, (pMemBlk->nunits * 8u));
-
+
ast_free(pMemBlk->plink);
-
+
if (!(blockType & RTMEMLINK)) {
FILLFREEMEM (pMemBlk, sizeof (*pMemBlk));
ast_free(pMemBlk);
}
- RTMEMDIAG2 ("memHeapFreePtr: pMemBlk = 0x%x was freed\n",
+ RTMEMDIAG2 ("memHeapFreePtr: pMemBlk = 0x%x was freed\n",
pMemBlk);
}
else {
@@ -576,7 +576,7 @@ void memHeapFreePtr (void** ppvMemHeap, void* mem_p)
}
else {
SET_LAST (GET_LAST_ELEM (pMemBlk));
- FILLFREEMEM (((char*) &pMemBlk->data[0]) + (pMemBlk->free_x * 8u),
+ FILLFREEMEM (((char*) &pMemBlk->data[0]) + (pMemBlk->free_x * 8u),
(pMemBlk->nunits - pMemBlk->free_x) * 8u);
CHECKMEMBLOCK (pMemHeap, pMemBlk);
}
@@ -587,25 +587,25 @@ void memHeapFreePtr (void** ppvMemHeap, void* mem_p)
SET_FREE_ELEM(pMemBlk, pElem);
pMemBlk->freeMem += pElem_nunits (pElem);
- RTMEMDIAG2 ("memHeapFreePtr: element 0x%x marked as free.\n",
+ RTMEMDIAG2 ("memHeapFreePtr: element 0x%x marked as free.\n",
pElem);
/* try to unite free blocks, if possible */
if (!ISFIRST (pElem)) {
if (ISFREE (GETPREV (pElem))) {
OSMemElemDescr* prevelem_p = GETPREV (pElem);
-
+
/* +1 because the OSMemElemDescr has size ONE unit (8 bytes) */
- pElem_nunits (prevelem_p) += pElem_nunits (pElem) + 1;
+ pElem_nunits (prevelem_p) += pElem_nunits (pElem) + 1;
pElem = prevelem_p;
pMemBlk->freeMem ++; /* sizeof (OSMemElemDescr) == 1 unit */
}
else {
/* look for nearest previous free block to correct nextFreeOff */
-
+
OSMemElemDescr* prevelem_p = pElem;
-
+
do {
prevelem_p = GETPREV (prevelem_p);
}
@@ -613,32 +613,32 @@ void memHeapFreePtr (void** ppvMemHeap, void* mem_p)
if (prevelem_p != 0) {
OSMemElemDescr* pNextFree = GET_NEXT_FREE (prevelem_p);
- if (pNextFree != 0)
+ if (pNextFree != 0)
pElem_nextFreeOff (pElem) = QOFFSETOF (pNextFree, pElem);
else
pElem_nextFreeOff (pElem) = 0;
pElem_nextFreeOff (prevelem_p) = QOFFSETOF (pElem, prevelem_p);
-
+
CHECKMEMELEM (pMemBlk, prevelem_p);
}
}
}
if (!ISLAST (pElem) && ISFREE (GETNEXT (pElem))) {
OSMemElemDescr* nextelem_p = GETNEXT (pElem);
-
+
/* +1 because the OSMemElemDescr has size ONE unit (8 bytes) */
- pElem_nunits (pElem) += pElem_nunits (nextelem_p) + 1;
+ pElem_nunits (pElem) += pElem_nunits (nextelem_p) + 1;
if (pElem_nextFreeOff (nextelem_p) == 0)
pElem_nextFreeOff (pElem) = 0;
else
- pElem_nextFreeOff (pElem) =
+ pElem_nextFreeOff (pElem) =
QOFFSETOF (GET_NEXT_FREE (nextelem_p), pElem);
pMemBlk->freeMem ++;
}
/* correct the prevOff field of next element */
- if (!ISLAST (pElem)) {
+ if (!ISLAST (pElem)) {
OSMemElemDescr* nextelem_p = GETNEXT (pElem);
pElem_prevOff (nextelem_p) = QOFFSETOF (nextelem_p, pElem);
}
@@ -649,10 +649,10 @@ void memHeapFreePtr (void** ppvMemHeap, void* mem_p)
CHECKMEMBLOCK (pMemHeap, pMemBlk);
}
ast_mutex_unlock(&pMemHeap->pLock);
-}
+}
-static void initNewFreeElement (OSMemBlk* pMemBlk,
- OSMemElemDescr* pNewElem, OSMemElemDescr* pElem)
+static void initNewFreeElement (OSMemBlk* pMemBlk,
+ OSMemElemDescr* pNewElem, OSMemElemDescr* pElem)
{
OSMemElemDescr *pNextElem, *pPrevElem = 0;
@@ -663,11 +663,11 @@ static void initNewFreeElement (OSMemBlk* pMemBlk,
pElem_prevOff (pNewElem) = QOFFSETOF (pNewElem, pElem);
- if (pMemBlk->freeElemOff != 0 &&
+ if (pMemBlk->freeElemOff != 0 &&
pMemBlk->freeElemOff < QOFFSETOF (pElem, pMemBlk->data) + 1)
{
/* look for nearest previous free block to correct its nextFreeOff */
-
+
pPrevElem = pElem;
do {
@@ -678,21 +678,21 @@ static void initNewFreeElement (OSMemBlk* pMemBlk,
if (pPrevElem != 0) { /* if it is not first free element... */
/* correct nextFreeOff for prev free element */
-
+
pElem_nextFreeOff (pPrevElem) = QOFFSETOF (pNewElem, pPrevElem);
}
else { /* if it is first free element in the block */
FORCE_SET_FREE_ELEM (pMemBlk, pNewElem);
}
-
+
pNextElem = GETNEXT (pNewElem);
if (ISFREE (pNextElem)) {
-
+
/* if the next elem is free, then unite them together */
pElem_nunits (pNewElem) += pElem_nunits (pNextElem) + 1;
if (pElem_nextFreeOff (pNextElem) != 0)
- pElem_nextFreeOff (pNewElem) = QOFFSETOF (GET_NEXT_FREE (pNextElem),
+ pElem_nextFreeOff (pNewElem) = QOFFSETOF (GET_NEXT_FREE (pNextElem),
pNewElem);
else
pElem_nextFreeOff (pNewElem) = 0;
@@ -710,7 +710,7 @@ static void initNewFreeElement (OSMemBlk* pMemBlk,
pNextElem = GETNEXT (pNextElem);
/* set nextFreeOff for new element */
-
+
if (pNextElem != 0)
pElem_nextFreeOff (pNewElem) = QOFFSETOF (pNextElem, pNewElem);
else
@@ -746,15 +746,15 @@ void* memHeapRealloc (void** ppvMemHeap, void* mem_p, int nbytes_)
for (pMemLink = *ppMemLink; pMemLink != 0; pMemLink = pMemLink->pnextRaw) {
if ((pMemLink->blockType & RTMEMRAW) &&
- pMemLink->pMemBlk == mem_p)
+ pMemLink->pMemBlk == mem_p)
{
if (pMemLink->blockType & RTMEMMALLOC) {
void *newMemBlk = ast_realloc(pMemLink->pMemBlk, nbytes_);
- if (newMemBlk == 0)
+ if (newMemBlk == 0)
return 0;
pMemLink->pMemBlk = newMemBlk;
}
- else
+ else
return 0;
*(int*)(((char*)pMemLink) + sizeof (OSMemLink)) = nbytes_;
return pMemLink->pMemBlk;
@@ -768,7 +768,7 @@ void* memHeapRealloc (void** ppvMemHeap, void* mem_p, int nbytes_)
pElem = (OSMemElemDescr*) (((char*)mem_p) - sizeof_OSMemElemDescr);
- RTMEMDIAG3 ("memHeapRealloc: mem_p = 0x%x, old size = %d,", mem_p,
+ RTMEMDIAG3 ("memHeapRealloc: mem_p = 0x%x, old size = %d,", mem_p,
pElem_nunits (pElem) * 8u);
RTMEMDIAG2 (" new nbytes = %d\n", nbytes);
@@ -781,39 +781,39 @@ void* memHeapRealloc (void** ppvMemHeap, void* mem_p, int nbytes_)
CHECKMEMBLOCK(pMemHeap, pMemBlk);
if ((unsigned)pElem_nunits (pElem) < nunits) { /* expanding */
-
+
if (nunits - pElem_nunits (pElem) <= (unsigned)pMemBlk->nunits) {
/* Try to expand the existing element in the existing block */
if (ISLAST (pElem)) { /* if the last element in the block */
-
+
/* if the free space in the block is enough */
-
- if ((int)(nunits - pElem_nunits (pElem)) <=
- (int)(pMemBlk->nunits - pMemBlk->free_x))
- {
+
+ if ((int)(nunits - pElem_nunits (pElem)) <=
+ (int)(pMemBlk->nunits - pMemBlk->free_x))
+ {
pMemBlk->free_x += nunits - pElem_nunits (pElem);
pElem_nunits (pElem) = (ASN1USINT)nunits;
RTMEMDIAG1 ("memHeapRealloc: "
"memory element is expanded.\n");
-
- FILLNEWMEM (&pMemBlk->data [(pMemBlk->free_x -
- (nunits - pElem_nunits (pElem))) * 8u],
+
+ FILLNEWMEM (&pMemBlk->data [(pMemBlk->free_x -
+ (nunits - pElem_nunits (pElem))) * 8u],
(nunits - pElem_nunits (pElem)) * 8u);
-
+
TRACEMEMELEM (pMemBlk, pElem, "Reallocated");
CHECKMEMELEM (pMemBlk, pElem);
CHECKMEMBLOCK (pMemHeap, pMemBlk);
return (mem_p);
- }
+ }
}
else {
- OSMemElemDescr* pNextElem, *pFreeElem;
+ OSMemElemDescr* pNextElem, *pFreeElem;
unsigned sumSize = pElem_nunits (pElem), freeMem = 0;
-
+
RTMEMDIAG1 ("memHeapRealloc: look for free element after "
"current block.\n");
@@ -822,10 +822,10 @@ void* memHeapRealloc (void** ppvMemHeap, void* mem_p, int nbytes_)
pNextElem = GETNEXT (pElem);
if (ISFREE (pNextElem)) {
/* +1 'cos sizeof (OSMemElemDescr) == 1 unit */
- sumSize += pElem_nunits (pNextElem) + 1;
+ sumSize += pElem_nunits (pNextElem) + 1;
freeMem++;
}
-
+
if (sumSize >= nunits) {
RTMEMDIAG1 ("memHeapRealloc: reuse free element.\n");
@@ -836,15 +836,15 @@ void* memHeapRealloc (void** ppvMemHeap, void* mem_p, int nbytes_)
FORCE_SET_FREE_ELEM (pMemBlk, GET_NEXT_FREE (pNextElem));
}
else if (pFreeElem < pElem) {
-
+
/* look for previous free elem to correct nextFreeOff */
for (; pFreeElem != 0 && pFreeElem < pNextElem;) {
- OSMemElemDescr* pNextFreeElem =
+ OSMemElemDescr* pNextFreeElem =
GET_NEXT_FREE (pFreeElem);
if (pNextFreeElem == pNextElem) {
if (pElem_nextFreeOff (pNextElem) != 0)
- pElem_nextFreeOff (pFreeElem) = QOFFSETOF
+ pElem_nextFreeOff (pFreeElem) = QOFFSETOF
(GET_NEXT_FREE (pNextElem), pFreeElem);
else
pElem_nextFreeOff (pFreeElem) = 0;
@@ -857,15 +857,15 @@ void* memHeapRealloc (void** ppvMemHeap, void* mem_p, int nbytes_)
}
/* reuse empty elements after the pElem */
-
+
pMemBlk->freeMem += freeMem;
-
+
if (sumSize - nunits > 1) {
OSMemElemDescr* pNewElem;
-
+
/* if sumSize is too large, then create new empty element */
- pNewElem = (OSMemElemDescr*)
+ pNewElem = (OSMemElemDescr*)
(pElem_data (pElem) + nbytes);
pElem_nunits (pNewElem) = (ASN1USINT)(sumSize - nunits - 1);
@@ -885,7 +885,7 @@ void* memHeapRealloc (void** ppvMemHeap, void* mem_p, int nbytes_)
if (pNextElem != 0)
pElem_prevOff (pNextElem) = QOFFSETOF (pNextElem, pElem);
}
-
+
TRACEMEMELEM (pMemBlk, pElem, "Reallocated");
CHECKMEMELEM (pMemBlk, pElem);
CHECKMEMELEM (pMemBlk, (!ISLAST (pElem)) ? GETNEXT (pElem) : 0);
@@ -902,14 +902,14 @@ void* memHeapRealloc (void** ppvMemHeap, void* mem_p, int nbytes_)
CHECKMEMHEAP (pMemHeap);
newMem_p = memHeapAlloc (ppvMemHeap, nbytes);
-
+
if (newMem_p == 0)
return 0;
/* if the old memory block is marked as saved then mark the new block
as saved as well. */
- if (ISSAVED (pElem))
+ if (ISSAVED (pElem))
memHeapMarkSaved (ppvMemHeap, newMem_p, TRUE);
CHECKMEMHEAP (pMemHeap);
@@ -928,7 +928,7 @@ void* memHeapRealloc (void** ppvMemHeap, void* mem_p, int nbytes_)
}
else { /* shrinking */
RTMEMDIAG1 ("memHeapRealloc: shrinking ...\n");
-
+
/* just free the pointer, if nbytes == 0 */
if (nbytes == 0) {
@@ -940,15 +940,15 @@ void* memHeapRealloc (void** ppvMemHeap, void* mem_p, int nbytes_)
/* do not shrink, if size diff is too small */
/* sizeof (OSMemElemDescr) == 1 unit */
- if (pElem_nunits (pElem) - nunits > 1) {
-
- /* if it is the last element in the block, then just change the size
+ if (pElem_nunits (pElem) - nunits > 1) {
+
+ /* if it is the last element in the block, then just change the size
and free_x. */
if (ISLAST (pElem)) {
pMemBlk->free_x -= (pElem_nunits (pElem) - nunits);
- FILLFREEMEM (&pMemBlk->data [pMemBlk->free_x * 8u],
+ FILLFREEMEM (&pMemBlk->data [pMemBlk->free_x * 8u],
(pElem_nunits (pElem) - nunits) * 8u);
}
else {
@@ -959,14 +959,14 @@ void* memHeapRealloc (void** ppvMemHeap, void* mem_p, int nbytes_)
pNewElem = (OSMemElemDescr*) (pElem_data (pElem) + nbytes);
/* sizeof (OSMemElemDescr) == 1 unit */
- pElem_nunits (pNewElem) = (ASN1USINT)(pElem_nunits (pElem) - nunits - 1);
-
+ pElem_nunits (pNewElem) = (ASN1USINT)(pElem_nunits (pElem) - nunits - 1);
+
initNewFreeElement (pMemBlk, pNewElem, pElem);
-
+
pMemBlk->freeMem += (pElem_nunits (pElem) - nunits) - 1;
}
pElem_nunits (pElem) = (ASN1USINT)nunits;
-
+
TRACEMEMELEM (pMemBlk, pElem, "Reallocated");
CHECKMEMELEM (pMemBlk, pElem);
CHECKMEMELEM (pMemBlk, (!ISLAST (pElem)) ? GETNEXT (pElem) : pElem);
@@ -1000,9 +1000,9 @@ void memHeapFreeAll (void** ppvMemHeap)
pMemLink2 = pMemLink;
pMemLink = pMemLink2->pnext;
- RTMEMDIAG3 ("memHeapFreeAll: pMemLink2 = 0x%x, pMemLink = 0x%x\n",
+ RTMEMDIAG3 ("memHeapFreeAll: pMemLink2 = 0x%x, pMemLink = 0x%x\n",
pMemLink2, pMemLink);
-
+
#ifdef _MEMDEBUG
if (pMemLink2->blockType & RTMEMSTD) {
OSMemBlk* pMemBlk = (OSMemBlk*) pMemLink2->pMemBlk;
@@ -1036,9 +1036,9 @@ void memHeapFreeAll (void** ppvMemHeap)
/* free link and block */
- if (((pMemLink2->blockType & RTMEMSTD) ||
+ if (((pMemLink2->blockType & RTMEMSTD) ||
(pMemLink2->blockType & RTMEMMALLOC)) &&
- !(pMemLink2->blockType & RTMEMLINK))
+ !(pMemLink2->blockType & RTMEMLINK))
ast_free(pMemLink2->pMemBlk);
ast_free(pMemLink2);
}
@@ -1089,11 +1089,11 @@ void memHeapRelease (void** ppvMemHeap)
/* This function is used for marking memory block as "saved". It means
* that the memory block containing the specified memory pointer won't be
- * freed after calls to memHeapFreeAll/memHeapReset. User is responsible
+ * freed after calls to memHeapFreeAll/memHeapReset. User is responsible
* for freeing the marked memory block by call to memFreeBlock */
-void* memHeapMarkSaved (void** ppvMemHeap, const void* mem_p,
- ASN1BOOL saved)
+void* memHeapMarkSaved (void** ppvMemHeap, const void* mem_p,
+ ASN1BOOL saved)
{
OSMemHeap* pMemHeap;
OSMemLink* pMemLink;
@@ -1101,7 +1101,7 @@ void* memHeapMarkSaved (void** ppvMemHeap, const void* mem_p,
RTMEMDIAG2 ("memHeapMarkSaved: for mem_p = 0x%x\n", mem_p);
- if (ppvMemHeap == 0 || *ppvMemHeap == 0 || mem_p == 0)
+ if (ppvMemHeap == 0 || *ppvMemHeap == 0 || mem_p == 0)
return 0;
pMemHeap = *(OSMemHeap**)ppvMemHeap;
@@ -1114,7 +1114,7 @@ void* memHeapMarkSaved (void** ppvMemHeap, const void* mem_p,
for (; pMemLink != 0; pMemLink = pMemLink->pnextRaw) {
if ((pMemLink->blockType & RTMEMRAW) &&
- pMemLink->pMemBlk == mem_p)
+ pMemLink->pMemBlk == mem_p)
{
break;
}
@@ -1132,7 +1132,7 @@ void* memHeapMarkSaved (void** ppvMemHeap, const void* mem_p,
"already free!\n", pElem);
ast_mutex_unlock(&pMemHeap->pLock);
- return 0;
+ return 0;
}
if ((ISSAVED (pElem) && !saved) || (!ISSAVED (pElem) && saved)) {
@@ -1144,7 +1144,7 @@ void* memHeapMarkSaved (void** ppvMemHeap, const void* mem_p,
pMemLink = pMemBlk->plink;
- if (saved)
+ if (saved)
SET_SAVED (pMemBlk, pElem);
else
CLEAR_SAVED (pMemBlk, pElem);
@@ -1154,7 +1154,7 @@ void* memHeapMarkSaved (void** ppvMemHeap, const void* mem_p,
ast_mutex_unlock(&pMemHeap->pLock);
return 0;
}
- if (saved && nsaved > 0)
+ if (saved && nsaved > 0)
pMemLink->blockType |= RTMEMSAVED;
else if (nsaved == 0)
pMemLink->blockType &= (~RTMEMSAVED);
@@ -1204,16 +1204,16 @@ void memHeapReset (void** ppvMemHeap)
/* add memory block to list */
-static OSMemLink* memHeapAddBlock (OSMemLink** ppMemLink,
+static OSMemLink* memHeapAddBlock (OSMemLink** ppMemLink,
void* pMemBlk, int blockType)
{
OSMemLink* pMemLink;
- /* if pMemBlk has RTMEMLINK flags it means that it is allocated
+ /* if pMemBlk has RTMEMLINK flags it means that it is allocated
* cooperatively with OSMemLink, and we don't need to do additional
* allocations for it. Just use pointer's arithemtic. */
- if (blockType & RTMEMLINK)
+ if (blockType & RTMEMLINK)
pMemLink = (OSMemLink*) (((ASN1OCTET*)pMemBlk) - sizeof (OSMemLink));
else {
pMemLink = ast_malloc(sizeof(OSMemLink) + sizeof(int));
@@ -1222,7 +1222,7 @@ static OSMemLink* memHeapAddBlock (OSMemLink** ppMemLink,
to perform rtMemRealloc through malloc/memcpy/free */
*(int*)(((char*)pMemLink) + sizeof (OSMemLink)) = (int)-1;
}
- if (pMemLink == NULL)
+ if (pMemLink == NULL)
return NULL;
pMemLink->blockType = (ASN1OCTET)blockType;
pMemLink->pMemBlk = pMemBlk;
@@ -1241,15 +1241,15 @@ static OSMemLink* memHeapAddBlock (OSMemLink** ppMemLink,
pMemLink->pnextRaw = 0;
}
- *ppMemLink = pMemLink;
+ *ppMemLink = pMemLink;
if (pMemLink->pnext != 0)
pMemLink->pnext->pprev = pMemLink;
((OSMemBlk*)pMemBlk)->plink = pMemLink; /*!AB */
RTMEMDIAG2 ("memHeapAddBlock: pMemLink = 0x%x\n", pMemLink);
- RTMEMDIAG2 ("memHeapAddBlock: pMemLink->pnext = 0x%x\n",
+ RTMEMDIAG2 ("memHeapAddBlock: pMemLink->pnext = 0x%x\n",
pMemLink->pnext);
- RTMEMDIAG2 ("memHeapAddBlock: pMemLink->pprev = 0x%x\n",
+ RTMEMDIAG2 ("memHeapAddBlock: pMemLink->pprev = 0x%x\n",
pMemLink->pprev);
return pMemLink;
@@ -1262,7 +1262,7 @@ int memHeapCheckPtr (void** ppvMemHeap, void* mem_p)
RTMEMDIAG2 ("memHeapCheckPtr: for mem_p = 0x%x\n", mem_p);
- if (ppvMemHeap == 0 || *ppvMemHeap == 0 || mem_p == 0)
+ if (ppvMemHeap == 0 || *ppvMemHeap == 0 || mem_p == 0)
return 0;
pMemHeap = *(OSMemHeap**)ppvMemHeap;
@@ -1272,7 +1272,7 @@ int memHeapCheckPtr (void** ppvMemHeap, void* mem_p)
for (; pMemLink != 0; pMemLink = pMemLink->pnext) {
if (pMemLink->blockType & RTMEMRAW) {
-
+
/* if RAW block, the pointer should be stored in pMemBlk */
if (pMemLink->pMemBlk == mem_p) {
@@ -1282,17 +1282,17 @@ int memHeapCheckPtr (void** ppvMemHeap, void* mem_p)
}
else {
OSMemBlk* pMemBlk = (OSMemBlk*)pMemLink->pMemBlk;
-
+
/* Check, is the pointer inside this memory page */
- if (mem_p > pMemLink->pMemBlk &&
+ if (mem_p > pMemLink->pMemBlk &&
mem_p < (void*)(((ASN1OCTET*)pMemLink->pMemBlk) + pMemBlk->nunits * 8u))
{
/* Check, is the pointer a correct element of the mem page */
OSMemElemDescr* pElem = (OSMemElemDescr*) pMemBlk->data;
for (; pElem != 0; pElem = GETNEXT (pElem)) {
-
+
void* curMem_p = (void*) pElem_data (pElem);
if (curMem_p == mem_p && !ISFREE (pElem)) {
ast_mutex_unlock(&pMemHeap->pLock);
@@ -1311,7 +1311,7 @@ void memHeapSetProperty (void** ppvMemHeap, ASN1UINT propId, void* pProp)
{
OSMemHeap* pMemHeap;
- if (ppvMemHeap == 0)
+ if (ppvMemHeap == 0)
return;
if (*ppvMemHeap == 0)
@@ -1332,9 +1332,9 @@ void memHeapSetProperty (void** ppvMemHeap, ASN1UINT propId, void* pProp)
break;
}
ast_mutex_unlock(&pMemHeap->pLock);
-}
+}
-int memHeapCreate (void** ppvMemHeap)
+int memHeapCreate (void** ppvMemHeap)
{
OSMemHeap* pMemHeap;
if (ppvMemHeap == 0) return ASN_E_INVPARAM;
@@ -1349,4 +1349,3 @@ int memHeapCreate (void** ppvMemHeap)
*ppvMemHeap = (void*)pMemHeap;
return ASN_OK;
}
-
diff --git a/addons/ooh323c/src/memheap.h b/addons/ooh323c/src/memheap.h
index 8cc36d902..26e5f486b 100644
--- a/addons/ooh323c/src/memheap.h
+++ b/addons/ooh323c/src/memheap.h
@@ -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.
*
*****************************************************************************/
diff --git a/addons/ooh323c/src/ooCalls.c b/addons/ooh323c/src/ooCalls.c
index c920e6a23..3097c6d28 100644
--- a/addons/ooh323c/src/ooCalls.c
+++ b/addons/ooh323c/src/ooCalls.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.
*
*****************************************************************************/
@@ -62,7 +62,7 @@ OOH323CallData* ooCreateCall(char* type, char*callToken)
{
OOTRACEERR1("ERROR:Memory - ooCreateCall - call\n");
return NULL;
- }
+ }
memset(call, 0, sizeof(OOH323CallData));
ast_cond_init(&call->gkWait, NULL);
ast_mutex_init(&call->GkLock);
@@ -80,7 +80,7 @@ OOH323CallData* ooCreateCall(char* type, char*callToken)
else {
call->ourCallerId[0] = '\0';
}
-
+
memset(&call->callIdentifier, 0, sizeof(H225CallIdentifier));
memset(&call->confIdentifier, 0, sizeof(H225ConferenceIdentifier));
@@ -107,7 +107,7 @@ OOH323CallData* ooCreateCall(char* type, char*callToken)
// May 20090713. Fix it for Video session
OO_SETFLAG(call->flags, OO_M_AUDIOSESSION);
-
+
call->callState = OO_CALL_CREATED;
call->callEndReason = OO_REASON_UNKNOWN;
call->pCallFwdData = NULL;
@@ -116,13 +116,13 @@ OOH323CallData* ooCreateCall(char* type, char*callToken)
{
call->callingPartyNumber = NULL;
}
- else{
+ else{
if(ooUtilsIsStrEmpty(gH323ep.callingPartyNumber))
{
call->callingPartyNumber = NULL;
}
else{
- call->callingPartyNumber = (char*) memAlloc(call->pctxt,
+ call->callingPartyNumber = (char*) memAlloc(call->pctxt,
strlen(gH323ep.callingPartyNumber)+1);
if(call->callingPartyNumber)
{
@@ -156,14 +156,14 @@ OOH323CallData* ooCreateCall(char* type, char*callToken)
call->masterSlaveState = OO_MasterSlave_Idle;
call->statusDeterminationNumber = 0;
call->localTermCapState = OO_LocalTermCapExchange_Idle;
- call->remoteTermCapState = OO_RemoteTermCapExchange_Idle;
+ call->remoteTermCapState = OO_RemoteTermCapExchange_Idle;
call->ourCaps = NULL;
call->remoteCaps = NULL;
call->jointCaps = NULL;
dListInit(&call->remoteFastStartOLCs);
call->remoteTermCapSeqNo =0;
call->localTermCapSeqNo = 0;
- memcpy(&call->capPrefs, &gH323ep.capPrefs, sizeof(OOCapPrefs));
+ memcpy(&call->capPrefs, &gH323ep.capPrefs, sizeof(OOCapPrefs));
call->logicalChans = NULL;
call->noOfLogicalChannels = 0;
call->logicalChanNoBase = 1001;
@@ -175,7 +175,7 @@ OOH323CallData* ooCreateCall(char* type, char*callToken)
call->pFastStartRes = NULL;
call->usrData = NULL;
ooCreateCallCmdConnection(call);
- OOTRACEINFO3("Created a new call (%s, %s)\n", call->callType,
+ OOTRACEINFO3("Created a new call (%s, %s)\n", call->callType,
call->callToken);
/* Add new call to calllist */
ooAddCallToList (call);
@@ -209,8 +209,8 @@ int ooAddCallToList(OOH323CallData *call)
int ooEndCall(OOH323CallData *call)
{
- OOTRACEDBGA4("In ooEndCall call state is - %s (%s, %s)\n",
- ooGetCallStateText(call->callState), call->callType,
+ OOTRACEDBGA4("In ooEndCall call state is - %s (%s, %s)\n",
+ ooGetCallStateText(call->callState), call->callType,
call->callToken);
if(call->callState == OO_CALL_REMOVED) {
@@ -229,7 +229,7 @@ int ooEndCall(OOH323CallData *call)
if(call->callState == OO_CALL_CLEARED || ((strcmp(call->callType, "incoming")) &&
call->callState == OO_CALL_CLEAR_RELEASESENT))
{
- ooCleanCall(call);
+ ooCleanCall(call);
call->callState = OO_CALL_REMOVED;
return OO_OK;
}
@@ -252,16 +252,16 @@ int ooEndCall(OOH323CallData *call)
}
- if(!OO_TESTFLAG(call->flags, OO_M_RELEASE_BUILT))
+ if(!OO_TESTFLAG(call->flags, OO_M_RELEASE_BUILT))
{
- if(call->callState == OO_CALL_CLEAR ||
+ if(call->callState == OO_CALL_CLEAR ||
call->callState == OO_CALL_CLEAR_RELEASERECVD)
{
ooSendReleaseComplete(call);
OO_SETFLAG(call->flags, OO_M_RELEASE_BUILT);
}
}
-
+
return OO_OK;
}
@@ -300,8 +300,8 @@ int ooCleanCall(OOH323CallData *call)
{
OOCTXT *pctxt;
- OOTRACEWARN4 ("Cleaning Call (%s, %s)- reason:%s\n",
- call->callType, call->callToken,
+ OOTRACEWARN4 ("Cleaning Call (%s, %s)- reason:%s\n",
+ call->callType, call->callToken,
ooGetReasonCodeText (call->callEndReason));
/* First clean all the logical channels, if not already cleaned. */
@@ -324,7 +324,7 @@ int ooCleanCall(OOH323CallData *call)
{
ooCloseH245Listener(call);
}
-
+
/* Close H225 connection, if not already closed. */
if (0 != call->pH225Channel && 0 != call->pH225Channel->sock)
{
@@ -343,7 +343,7 @@ int ooCleanCall(OOH323CallData *call)
}
ooRemoveCallFromList (call);
- OOTRACEINFO3("Removed call (%s, %s) from list\n", call->callType,
+ OOTRACEINFO3("Removed call (%s, %s) from list\n", call->callType,
call->callToken);
if(call->pCallFwdData && call->pCallFwdData->fwdedByRemote)
@@ -396,7 +396,7 @@ int ooCallSetCallerId(OOH323CallData* call, const char* callerid)
int ooCallSetCallingPartyNumber(OOH323CallData *call, const char *number)
{
- if(call->callingPartyNumber)
+ if(call->callingPartyNumber)
memFreePtr(call->pctxt, call->callingPartyNumber);
call->callingPartyNumber = (char*) memAlloc(call->pctxt, strlen(number)+1);
@@ -406,7 +406,7 @@ int ooCallSetCallingPartyNumber(OOH323CallData *call, const char *number)
}
else{
OOTRACEERR3("Error:Memory - ooCallSetCallingPartyNumber - "
- "callingPartyNumber.(%s, %s)\n", call->callType,
+ "callingPartyNumber.(%s, %s)\n", call->callType,
call->callToken);
return OO_FAILED;
}
@@ -428,14 +428,14 @@ int ooCallGetCallingPartyNumber(OOH323CallData *call, char *buffer, int len)
return OO_OK;
}
}
-
+
return OO_FAILED;
}
int ooCallSetCalledPartyNumber(OOH323CallData *call, const char *number)
{
- if(call->calledPartyNumber)
+ if(call->calledPartyNumber)
memFreePtr(call->pctxt, call->calledPartyNumber);
call->calledPartyNumber = (char*) memAlloc(call->pctxt, strlen(number)+1);
@@ -445,7 +445,7 @@ int ooCallSetCalledPartyNumber(OOH323CallData *call, const char *number)
}
else{
OOTRACEERR3("Error:Memory - ooCallSetCalledPartyNumber - "
- "calledPartyNumber.(%s, %s)\n", call->callType,
+ "calledPartyNumber.(%s, %s)\n", call->callType,
call->callToken);
return OO_FAILED;
}
@@ -462,7 +462,7 @@ int ooCallGetCalledPartyNumber(OOH323CallData *call, char *buffer, int len)
return OO_OK;
}
}
-
+
return OO_FAILED;
}
@@ -507,7 +507,7 @@ int ooCallAddAlias
call->remoteAliases = psNewAlias;
}
- OOTRACEDBGC5("Added %s alias %s to call. (%s, %s)\n",
+ OOTRACEDBGC5("Added %s alias %s to call. (%s, %s)\n",
local?"local":"remote", value, call->callType, call->callToken);
return OO_OK;
}
@@ -534,8 +534,8 @@ int ooCallAddAliasEmailID(OOH323CallData *call, const char* email)
int ooCallAddAliasURLID(OOH323CallData *call, const char* url)
{
return ooCallAddAlias(call, T_H225AliasAddress_url_ID, url, TRUE);
-}
-
+}
+
int ooCallAddRemoteAliasH323ID(OOH323CallData *call, const char* h323id)
{
@@ -551,63 +551,63 @@ int ooCallAddRemoteAliasDialedDigits
-/* Used to override global end point capabilities and add call specific
+/* Used to override global end point capabilities and add call specific
capabilities */
-int ooCallAddG726Capability(OOH323CallData *call, int cap, int txframes,
+int ooCallAddG726Capability(OOH323CallData *call, int cap, int txframes,
int rxframes, OOBOOL silenceSuppression, int dir,
cb_StartReceiveChannel startReceiveChannel,
cb_StartTransmitChannel startTransmitChannel,
cb_StopReceiveChannel stopReceiveChannel,
cb_StopTransmitChannel stopTransmitChannel)
{
- return ooCapabilityAddSimpleCapability(call, cap, txframes, rxframes,
- silenceSuppression, dir, startReceiveChannel,
- startTransmitChannel, stopReceiveChannel,
+ return ooCapabilityAddSimpleCapability(call, cap, txframes, rxframes,
+ silenceSuppression, dir, startReceiveChannel,
+ startTransmitChannel, stopReceiveChannel,
stopTransmitChannel, FALSE);
}
-int ooCallAddAMRNBCapability(OOH323CallData *call, int cap, int txframes,
+int ooCallAddAMRNBCapability(OOH323CallData *call, int cap, int txframes,
int rxframes, OOBOOL silenceSuppression, int dir,
cb_StartReceiveChannel startReceiveChannel,
cb_StartTransmitChannel startTransmitChannel,
cb_StopReceiveChannel stopReceiveChannel,
cb_StopTransmitChannel stopTransmitChannel)
{
- return ooCapabilityAddSimpleCapability(call, cap, txframes, rxframes,
- silenceSuppression, dir, startReceiveChannel,
- startTransmitChannel, stopReceiveChannel,
+ return ooCapabilityAddSimpleCapability(call, cap, txframes, rxframes,
+ silenceSuppression, dir, startReceiveChannel,
+ startTransmitChannel, stopReceiveChannel,
stopTransmitChannel, FALSE);
}
-int ooCallAddSpeexCapability(OOH323CallData *call, int cap, int txframes,
+int ooCallAddSpeexCapability(OOH323CallData *call, int cap, int txframes,
int rxframes, OOBOOL silenceSuppression, int dir,
cb_StartReceiveChannel startReceiveChannel,
cb_StartTransmitChannel startTransmitChannel,
cb_StopReceiveChannel stopReceiveChannel,
cb_StopTransmitChannel stopTransmitChannel)
{
- return ooCapabilityAddSimpleCapability(call, cap, txframes, rxframes,
- silenceSuppression, dir, startReceiveChannel,
- startTransmitChannel, stopReceiveChannel,
+ return ooCapabilityAddSimpleCapability(call, cap, txframes, rxframes,
+ silenceSuppression, dir, startReceiveChannel,
+ startTransmitChannel, stopReceiveChannel,
stopTransmitChannel, FALSE);
}
-int ooCallAddG7231Capability(OOH323CallData *call, int cap, int txframes,
+int ooCallAddG7231Capability(OOH323CallData *call, int cap, int txframes,
int rxframes, OOBOOL silenceSuppression, int dir,
cb_StartReceiveChannel startReceiveChannel,
cb_StartTransmitChannel startTransmitChannel,
cb_StopReceiveChannel stopReceiveChannel,
cb_StopTransmitChannel stopTransmitChannel)
{
- return ooCapabilityAddSimpleCapability(call, cap, txframes, rxframes,
- silenceSuppression, dir, startReceiveChannel,
- startTransmitChannel, stopReceiveChannel,
+ return ooCapabilityAddSimpleCapability(call, cap, txframes, rxframes,
+ silenceSuppression, dir, startReceiveChannel,
+ startTransmitChannel, stopReceiveChannel,
stopTransmitChannel, FALSE);
}
-int ooCallAddG729Capability(OOH323CallData *call, int cap, int txframes,
+int ooCallAddG729Capability(OOH323CallData *call, int cap, int txframes,
int rxframes, int dir,
cb_StartReceiveChannel startReceiveChannel,
cb_StartTransmitChannel startTransmitChannel,
@@ -615,12 +615,12 @@ int ooCallAddG729Capability(OOH323CallData *call, int cap, int txframes,
cb_StopTransmitChannel stopTransmitChannel)
{
return ooCapabilityAddSimpleCapability(call, cap, txframes, rxframes, FALSE,
- dir, startReceiveChannel, startTransmitChannel,
+ dir, startReceiveChannel, startTransmitChannel,
stopReceiveChannel, stopTransmitChannel, FALSE);
}
/*
-int ooCallAddG726Capability(OOH323CallData *call, int cap, int txframes,
+int ooCallAddG726Capability(OOH323CallData *call, int cap, int txframes,
int rxframes, int dir,
cb_StartReceiveChannel startReceiveChannel,
cb_StartTransmitChannel startTransmitChannel,
@@ -628,12 +628,12 @@ int ooCallAddG726Capability(OOH323CallData *call, int cap, int txframes,
cb_StopTransmitChannel stopTransmitChannel)
{
return ooCapabilityAddSimpleCapability(call, cap, txframes, rxframes, FALSE,
- dir, startReceiveChannel, startTransmitChannel,
+ dir, startReceiveChannel, startTransmitChannel,
stopReceiveChannel, stopTransmitChannel, FALSE);
}
*/
-int ooCallAddG728Capability(OOH323CallData *call, int cap, int txframes,
+int ooCallAddG728Capability(OOH323CallData *call, int cap, int txframes,
int rxframes, int dir,
cb_StartReceiveChannel startReceiveChannel,
cb_StartTransmitChannel startTransmitChannel,
@@ -641,11 +641,11 @@ int ooCallAddG728Capability(OOH323CallData *call, int cap, int txframes,
cb_StopTransmitChannel stopTransmitChannel)
{
return ooCapabilityAddSimpleCapability(call, cap, txframes, rxframes, FALSE,
- dir, startReceiveChannel, startTransmitChannel,
+ dir, startReceiveChannel, startTransmitChannel,
stopReceiveChannel, stopTransmitChannel, FALSE);
}
-int ooCallAddG711Capability(OOH323CallData *call, int cap, int txframes,
+int ooCallAddG711Capability(OOH323CallData *call, int cap, int txframes,
int rxframes, int dir,
cb_StartReceiveChannel startReceiveChannel,
cb_StartTransmitChannel startTransmitChannel,
@@ -653,28 +653,28 @@ int ooCallAddG711Capability(OOH323CallData *call, int cap, int txframes,
cb_StopTransmitChannel stopTransmitChannel)
{
return ooCapabilityAddSimpleCapability(call, cap, txframes, rxframes, FALSE,
- dir, startReceiveChannel, startTransmitChannel,
+ dir, startReceiveChannel, startTransmitChannel,
stopReceiveChannel, stopTransmitChannel, FALSE);
}
int ooCallAddGSMCapability
- (OOH323CallData* call, int cap, ASN1USINT framesPerPkt,
+ (OOH323CallData* call, int cap, ASN1USINT framesPerPkt,
OOBOOL comfortNoise, OOBOOL scrambled, int dir,
cb_StartReceiveChannel startReceiveChannel,
cb_StartTransmitChannel startTransmitChannel,
cb_StopReceiveChannel stopReceiveChannel,
cb_StopTransmitChannel stopTransmitChannel)
{
- return ooCapabilityAddGSMCapability(call, cap, framesPerPkt, comfortNoise,
- scrambled, dir, startReceiveChannel,
+ return ooCapabilityAddGSMCapability(call, cap, framesPerPkt, comfortNoise,
+ scrambled, dir, startReceiveChannel,
startTransmitChannel, stopReceiveChannel,
stopTransmitChannel, FALSE);
}
int ooCallAddH263VideoCapability
- (OOH323CallData *call, int cap, unsigned sqcifMPI, unsigned qcifMPI,
- unsigned cifMPI, unsigned cif4MPI, unsigned cif16MPI, unsigned maxBitRate,
+ (OOH323CallData *call, int cap, unsigned sqcifMPI, unsigned qcifMPI,
+ unsigned cifMPI, unsigned cif4MPI, unsigned cif16MPI, unsigned maxBitRate,
int dir, cb_StartReceiveChannel startReceiveChannel,
cb_StartTransmitChannel startTransmitChannel,
cb_StopReceiveChannel stopReceiveChannel,
@@ -684,7 +684,7 @@ int ooCallAddH263VideoCapability
return ooCapabilityAddH263VideoCapability(call, sqcifMPI, qcifMPI, cifMPI,
cif4MPI, cif16MPI, maxBitRate,dir,
startReceiveChannel, startTransmitChannel,
- stopReceiveChannel, stopTransmitChannel,
+ stopReceiveChannel, stopTransmitChannel,
FALSE);
}
@@ -766,7 +766,7 @@ OOH323CallData* ooFindCallByToken(const char *callToken)
else
call = call->next;
}
-
+
if(!call)
{
OOTRACEERR2("ERROR:Call with token %s not found\n", callToken);
@@ -791,7 +791,7 @@ ASN1BOOL ooIsSessionEstablished(OOH323CallData *call, int sessionID, char* dir)
while(temp)
{
if(temp->sessionID == sessionID &&
- temp->state == OO_LOGICALCHAN_ESTABLISHED &&
+ temp->state == OO_LOGICALCHAN_ESTABLISHED &&
!strcmp(temp->dir, dir) )
return TRUE;
temp = temp->next;
@@ -819,7 +819,7 @@ int ooAddMediaInfo(OOH323CallData *call, OOMediaInfo mediaInfo)
memcpy (newMediaInfo, &mediaInfo, sizeof(OOMediaInfo));
- OOTRACEDBGC4("Configured mediainfo for cap %s (%s, %s)\n",
+ OOTRACEDBGC4("Configured mediainfo for cap %s (%s, %s)\n",
ooGetCapTypeText(mediaInfo.cap),
call->callType, call->callToken);
if(!call->mediaInfo) {
@@ -849,7 +849,7 @@ unsigned ooCallGenerateSessionID
sessionID = call->nextSessionID++;
else{
OOTRACEDBGC4("Session id for %s channel of type audio has to be "
- "provided by remote.(%s, %s)\n", dir, call->callType,
+ "provided by remote.(%s, %s)\n", dir, call->callType,
call->callToken);
sessionID = 0; /* Will be assigned by remote */
}
@@ -868,7 +868,7 @@ unsigned ooCallGenerateSessionID
else{
sessionID = 0; /* Will be assigned by remote */
OOTRACEDBGC4("Session id for %s channel of type video has to be "
- "provided by remote.(%s, %s)\n", dir, call->callType,
+ "provided by remote.(%s, %s)\n", dir, call->callType,
call->callToken);
}
}
@@ -885,7 +885,7 @@ unsigned ooCallGenerateSessionID
else{
sessionID = 0; /* Will be assigned by remote */
OOTRACEDBGC4("Session id for %s channel of type data has to be "
- "provided by remote.(%s, %s)\n", dir, call->callType,
+ "provided by remote.(%s, %s)\n", dir, call->callType,
call->callToken);
}
}
@@ -900,8 +900,8 @@ int ooCallH245ConnectionRetryTimerExpired(void *data)
ooTimerCallback *cbData = (ooTimerCallback*) data;
OOH323CallData *call = cbData->call;
- OOTRACEINFO3("H245 connection retry timer expired. (%s, %s)\n",
- call->callType, call->callToken);
+ OOTRACEINFO3("H245 connection retry timer expired. (%s, %s)\n",
+ call->callType, call->callToken);
memFreePtr(call->pctxt, cbData);
call->h245ConnectionAttempts++;
@@ -914,9 +914,9 @@ int ooCallH245ConnectionRetryTimerExpired(void *data)
const char* ooGetReasonCodeText (OOUINT32 code)
{
static const char* reasonCodeText[] = {
- "OO_REASON_UNKNOWN",
+ "OO_REASON_UNKNOWN",
"OO_REASON_INVALIDMESSAGE",
- "OO_REASON_TRANSPORTFAILURE",
+ "OO_REASON_TRANSPORTFAILURE",
"OO_REASON_NOROUTE",
"OO_REASON_NOUSER",
"OO_REASON_NOBW",
@@ -926,10 +926,10 @@ const char* ooGetReasonCodeText (OOUINT32 code)
"OO_REASON_GK_UNREACHABLE",
"OO_REASON_GK_CLEARED",
"OO_REASON_NOCOMMON_CAPABILITIES",
- "OO_REASON_REMOTE_FWDED",
+ "OO_REASON_REMOTE_FWDED",
"OO_REASON_LOCAL_FWDED",
- "OO_REASON_REMOTE_CLEARED",
- "OO_REASON_LOCAL_CLEARED",
+ "OO_REASON_REMOTE_CLEARED",
+ "OO_REASON_LOCAL_CLEARED",
"OO_REASON_REMOTE_BUSY",
"OO_REASON_LOCAL_BUSY",
"OO_REASON_REMOTE_NOANSWER",
@@ -957,4 +957,3 @@ const char* ooGetCallStateText (OOCallState callState)
};
return ooUtilsGetText (callState, callStateText, OONUMBEROF(callStateText));
}
-
diff --git a/addons/ooh323c/src/ooCalls.h b/addons/ooh323c/src/ooCalls.h
index f9a93f113..d05ccf0b7 100644
--- a/addons/ooh323c/src/ooCalls.h
+++ b/addons/ooh323c/src/ooCalls.h
@@ -1,21 +1,21 @@
/*
* 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.
*
*****************************************************************************/
/**
- * @file ooCalls.h
- * This file contains call management functions.
+ * @file ooCalls.h
+ * This file contains call management functions.
*/
#ifndef _OOCALLS_H_
#define _OOCALLS_H_
@@ -29,7 +29,7 @@ extern "C" {
#endif
-/**
+/**
* @defgroup callmgmt Call Management
* @{
*/
@@ -60,7 +60,7 @@ extern "C" {
#define OO_M_DATASESSION ASN1UINTCNT(0x00000200)
#define OO_M_T38SUPPORTED ASN1UINTCNT(0x00000400)
-/**
+/**
* Call states.
*/
typedef enum {
@@ -76,20 +76,20 @@ typedef enum {
OO_CALL_REMOVED /* call removed */
} OOCallState;
-/**
+/**
* H.245 session states.
*/
typedef enum {
OO_H245SESSION_IDLE,
OO_H245SESSION_PAUSED,
OO_H245SESSION_ACTIVE,
- OO_H245SESSION_ENDSENT,
+ OO_H245SESSION_ENDSENT,
OO_H245SESSION_ENDRECVD,
OO_H245SESSION_CLOSED
} OOH245SessionState;
/**
- * Structure to store local and remote media endpoint info for a
+ * Structure to store local and remote media endpoint info for a
* given media type.
*/
typedef struct OOMediaInfo{
@@ -115,10 +115,10 @@ typedef struct OOCallFwdData {
int port;
struct OOAliases *aliases;
OOBOOL fwdedByRemote; /*Set when we are being fwded by remote*/
-} OOCallFwdData;
+} OOCallFwdData;
/**
- * Structure to store information on an H.323 channel (H.225 or H.245) for
+ * Structure to store information on an H.323 channel (H.225 or H.245) for
* a particular call.
*/
typedef struct OOH323Channel {
@@ -128,7 +128,7 @@ typedef struct OOH323Channel {
} OOH323Channel;
/**
- * Structure to store information on fast start response (H.225) to
+ * Structure to store information on fast start response (H.225) to
* reply same answer in CALL PROCEEDING, ALERTING & CONNECT.
*/
typedef struct EXTERN FastStartResponse {
@@ -144,8 +144,8 @@ typedef struct OOH323Regex {
/**
- * This structure is used to maintain all information on an active call.
- * A list of these structures is maintained within the global endpoint
+ * This structure is used to maintain all information on an active call.
+ * A list of these structures is maintained within the global endpoint
* structure.
*/
typedef struct OOH323CallData {
@@ -166,10 +166,10 @@ typedef struct OOH323CallData {
int transfercap;
ASN1USINT callReference;
char ourCallerId[256];
- H225CallIdentifier callIdentifier;/* The call identifier for the active
+ H225CallIdentifier callIdentifier;/* The call identifier for the active
call. */
char *callingPartyNumber;
- char *calledPartyNumber;
+ char *calledPartyNumber;
H225ConferenceIdentifier confIdentifier;
ASN1UINT flags;
OOCallState callState;
@@ -207,8 +207,8 @@ typedef struct OOH323CallData {
DList remoteFastStartOLCs;
ASN1UINT8 remoteTermCapSeqNo;
ASN1UINT8 localTermCapSeqNo;
- OOCapPrefs capPrefs;
- OOLogicalChannel* logicalChans;
+ OOCapPrefs capPrefs;
+ OOLogicalChannel* logicalChans;
int noOfLogicalChannels;
int logicalChanNoBase;
int logicalChanNoMax;
@@ -237,7 +237,7 @@ typedef struct OOH323CallData {
#define ooCallData OOH323CallData
/**
- * This callback function is triggered when a new call structure is
+ * This callback function is triggered when a new call structure is
* created inside the stack for an incoming or outgoing call.
*
* @param call H.323 call data structure
@@ -246,8 +246,8 @@ typedef struct OOH323CallData {
typedef int (*cb_OnNewCallCreated)(OOH323CallData* call);
/**
- * This callback function is triggered when a Q.931 alerting message is
- * received for an outgoing call or when a Q.931 alerting message is sent
+ * This callback function is triggered when a Q.931 alerting message is
+ * received for an outgoing call or when a Q.931 alerting message is sent
* for an incoming call.
*
* @param call H.323 call data structure
@@ -256,8 +256,8 @@ typedef int (*cb_OnNewCallCreated)(OOH323CallData* call);
typedef int (*cb_OnAlerting)(OOH323CallData * call);
/**
- * This callback function is triggered when there is an incoming call.
- * In the case where a gatekeeper is in use, the call must first be
+ * This callback function is triggered when there is an incoming call.
+ * In the case where a gatekeeper is in use, the call must first be
* admitted by the gatekeeper before this callback is triggered.
*
* @param call H.323 call data structure
@@ -266,7 +266,7 @@ typedef int (*cb_OnAlerting)(OOH323CallData * call);
typedef int (*cb_OnIncomingCall)(OOH323CallData* call );
/**
- * This callback function is triggered after a Q.931 setup message
+ * This callback function is triggered after a Q.931 setup message
* is sent for an outgoing call.
*
* @param call H.323 call data structure
@@ -275,10 +275,10 @@ typedef int (*cb_OnIncomingCall)(OOH323CallData* call );
typedef int (*cb_OnOutgoingCall)(OOH323CallData* call );
/**
- * This callback function is triggered when a Q.931 connect message is
- * sent in case of incoming call. In case of outgoing call, this is invoked
- * when a Q.931 connect message is received. It is not invoked until after
- * fast start and H.245 tunneling messages within the connect message are
+ * This callback function is triggered when a Q.931 connect message is
+ * sent in case of incoming call. In case of outgoing call, this is invoked
+ * when a Q.931 connect message is received. It is not invoked until after
+ * fast start and H.245 tunneling messages within the connect message are
* processed.
*
* @param call H.323 call data structure
@@ -295,8 +295,8 @@ typedef int (*cb_OnCallEstablished)(struct OOH323CallData* call);
typedef int (*cb_OnCallCleared)(struct OOH323CallData* call);
/**
- * This callback function is triggered when master-slave determination
- * and capabilities negotiation procedures are successfully completed
+ * This callback function is triggered when master-slave determination
+ * and capabilities negotiation procedures are successfully completed
* for a call.
*
* @param call H.323 call data structure
@@ -332,7 +332,7 @@ typedef void (*cb_OnMediaChanged)
(struct OOH323CallData *call, char* remoteIP, int remotePort);
/**
- * This structure holds all of the H.323 signaling callback function
+ * This structure holds all of the H.323 signaling callback function
* addresses.
* @see ooH323EpSetH323Callbacks
*/
@@ -428,7 +428,7 @@ EXTERN int ooCallSetCalledPartyNumber
EXTERN int ooCallClearAliases(OOH323CallData *call);
/**
- * This function is used to add an H323ID alias to be used by local endpoint
+ * This function is used to add an H323ID alias to be used by local endpoint
* for a particular call.
* @param call Handle to the call
* @param h323id H323ID to add for the local endpoint for the call.
@@ -438,7 +438,7 @@ EXTERN int ooCallClearAliases(OOH323CallData *call);
EXTERN int ooCallAddAliasH323ID(OOH323CallData *call, const char* h323id);
/**
- * This function is used to add an dialedDigits alias to be used by local
+ * This function is used to add an dialedDigits alias to be used by local
* endpoint for a particular call.
* @param call Handle to the call
* @param dialedDigits DialedDigits to add for the local endpoint for call.
@@ -449,7 +449,7 @@ EXTERN int ooCallAddAliasDialedDigits
(OOH323CallData *call, const char* dialedDigits);
/**
- * This function is used to add an email-id alias to be used by local
+ * This function is used to add an email-id alias to be used by local
* endpoint for a particular call.
* @param call Handle to the call
* @param email Email-id to add for the local endpoint for call.
@@ -460,7 +460,7 @@ EXTERN int ooCallAddAliasEmailID(OOH323CallData *call, const char* email);
/**
- * This function is used to add an email-id alias to be used by local
+ * This function is used to add an email-id alias to be used by local
* endpoint for a particular call.
* @param call Handle to the call
* @param url URL-id to add for the local endpoint for call.
@@ -471,8 +471,8 @@ EXTERN int ooCallAddAliasURLID(OOH323CallData *call, const char* url);
/**
- * This is a helper function used by other call related add aliases functions
- * to add a particular alias. This function is not supposed to be called
+ * This is a helper function used by other call related add aliases functions
+ * to add a particular alias. This function is not supposed to be called
* directly.
* @param call Handle to the call
* @param aliasType Type of alias being added
@@ -486,7 +486,7 @@ int ooCallAddAlias
/**
- * This function is used to add an dialed digits alias for the remote endpoint
+ * This function is used to add an dialed digits alias for the remote endpoint
* involved in a particular call.
* @param call Handle to the call
* @param dialedDigits dialedDigits alias to add for the remote endpoint.
@@ -497,7 +497,7 @@ EXTERN int ooCallAddRemoteAliasDialedDigits
(OOH323CallData *call, const char* dialedDigits);
/**
- * This function is used to add an H323ID alias for the remote endpoint
+ * This function is used to add an H323ID alias for the remote endpoint
* involved in a particular call.
* @param call Handle to the call
* @param h323id H323ID to add for the remote endpoint.
@@ -508,12 +508,12 @@ EXTERN int ooCallAddRemoteAliasH323ID(OOH323CallData *call, const char* h323id);
/**
- * This function is used to add G7231 capability for the call. The
- * "ooCallAdd...Capability" functions allow to override the global endpoint
+ * This function is used to add G7231 capability for the call. The
+ * "ooCallAdd...Capability" functions allow to override the global endpoint
* capabilities and use specific capabilities for specific calls.
* @param call Call for which capability has to be added.
* @param cap Capability to be added.
- * @param txframes Number of frames per packet for transmission.
+ * @param txframes Number of frames per packet for transmission.
* @param rxframes Number of frames per packet for reception.
* @param silenceSuppression Indicates support for silenceSuppression.
* @param dir Direction of capability.OORX, OOTX, OORXANDTX
@@ -522,9 +522,9 @@ EXTERN int ooCallAddRemoteAliasH323ID(OOH323CallData *call, const char* h323id);
* @param stopReceiveChannel Callback function to stop receive channel.
* @param stopTransmitChannel Callback function to stop transmit channel.
*
- * @return OO_OK, on success. OO_FAILED, on failure.
+ * @return OO_OK, on success. OO_FAILED, on failure.
*/
-EXTERN int ooCallAddG7231Capability(OOH323CallData *call, int cap, int txframes,
+EXTERN int ooCallAddG7231Capability(OOH323CallData *call, int cap, int txframes,
int rxframes, OOBOOL silenceSuppression, int dir,
cb_StartReceiveChannel startReceiveChannel,
cb_StartTransmitChannel startTransmitChannel,
@@ -532,12 +532,12 @@ EXTERN int ooCallAddG7231Capability(OOH323CallData *call, int cap, int txframes,
cb_StopTransmitChannel stopTransmitChannel);
/**
- * This function is used to add G728 capability for the call. The
- * "ooCallAdd...Capability" functions allow to override the global endpoint
+ * This function is used to add G728 capability for the call. The
+ * "ooCallAdd...Capability" functions allow to override the global endpoint
* capabilities and use specific capabilities for specific calls.
* @param call Call for which capability has to be added.
* @param cap Capability to be added.
- * @param txframes Number of frames per packet for transmission.
+ * @param txframes Number of frames per packet for transmission.
* @param rxframes Number of frames per packet for reception.
* @param dir Direction of capability.OORX, OOTX, OORXANDTX
* @param startReceiveChannel Callback function to start receive channel.
@@ -545,9 +545,9 @@ EXTERN int ooCallAddG7231Capability(OOH323CallData *call, int cap, int txframes,
* @param stopReceiveChannel Callback function to stop receive channel.
* @param stopTransmitChannel Callback function to stop transmit channel.
*
- * @return OO_OK, on success. OO_FAILED, on failure.
+ * @return OO_OK, on success. OO_FAILED, on failure.
*/
-EXTERN int ooCallAddG728Capability(OOH323CallData *call, int cap, int txframes,
+EXTERN int ooCallAddG728Capability(OOH323CallData *call, int cap, int txframes,
int rxframes, int dir,
cb_StartReceiveChannel startReceiveChannel,
cb_StartTransmitChannel startTransmitChannel,
@@ -555,12 +555,12 @@ EXTERN int ooCallAddG728Capability(OOH323CallData *call, int cap, int txframes,
cb_StopTransmitChannel stopTransmitChannel);
/**
- * This function is used to add G729 capability for the call. The
- * "ooCallAdd...Capability" functions allow to override the global endpoint
+ * This function is used to add G729 capability for the call. The
+ * "ooCallAdd...Capability" functions allow to override the global endpoint
* capabilities and use specific capabilities for specific calls.
* @param call Call for which capability has to be added.
* @param cap Capability to be added.
- * @param txframes Number of frames per packet for transmission.
+ * @param txframes Number of frames per packet for transmission.
* @param rxframes Number of frames per packet for reception.
* @param dir Direction of capability.OORX, OOTX, OORXANDTX
* @param startReceiveChannel Callback function to start receive channel.
@@ -568,9 +568,9 @@ EXTERN int ooCallAddG728Capability(OOH323CallData *call, int cap, int txframes,
* @param stopReceiveChannel Callback function to stop receive channel.
* @param stopTransmitChannel Callback function to stop transmit channel.
*
- * @return OO_OK, on success. OO_FAILED, on failure.
+ * @return OO_OK, on success. OO_FAILED, on failure.
*/
-EXTERN int ooCallAddG729Capability(OOH323CallData *call, int cap, int txframes,
+EXTERN int ooCallAddG729Capability(OOH323CallData *call, int cap, int txframes,
int rxframes, int dir,
cb_StartReceiveChannel startReceiveChannel,
cb_StartTransmitChannel startTransmitChannel,
@@ -578,12 +578,12 @@ EXTERN int ooCallAddG729Capability(OOH323CallData *call, int cap, int txframes,
cb_StopTransmitChannel stopTransmitChannel);
/**
- * This function is used to add G711 capability for the call. The
- * "ooCallAdd...Capability" functions allow to override the global endpoint
+ * This function is used to add G711 capability for the call. The
+ * "ooCallAdd...Capability" functions allow to override the global endpoint
* capabilities and use specific capabilities for specific calls.
* @param call Call for which capability has to be added.
* @param cap Capability to be added.
- * @param txframes Number of frames per packet for transmission.
+ * @param txframes Number of frames per packet for transmission.
* @param rxframes Number of frames per packet for reception.
* @param dir Direction of capability.OORX, OOTX, OORXANDTX
* @param startReceiveChannel Callback function to start receive channel.
@@ -591,9 +591,9 @@ EXTERN int ooCallAddG729Capability(OOH323CallData *call, int cap, int txframes,
* @param stopReceiveChannel Callback function to stop receive channel.
* @param stopTransmitChannel Callback function to stop transmit channel.
*
- * @return OO_OK, on success. OO_FAILED, on failure.
+ * @return OO_OK, on success. OO_FAILED, on failure.
*/
-EXTERN int ooCallAddG711Capability(OOH323CallData *call, int cap, int txframes,
+EXTERN int ooCallAddG711Capability(OOH323CallData *call, int cap, int txframes,
int rxframes, int dir,
cb_StartReceiveChannel startReceiveChannel,
cb_StartTransmitChannel startTransmitChannel,
@@ -602,13 +602,13 @@ EXTERN int ooCallAddG711Capability(OOH323CallData *call, int cap, int txframes,
/**
- * This function is used to add GSM capability for the call. The
- * "ooCallAdd...Capability" functions allow to override the global endpoint
+ * This function is used to add GSM capability for the call. The
+ * "ooCallAdd...Capability" functions allow to override the global endpoint
* capabilities and use specific capabilities for specific calls.
* @param call Call for which capability has to be added.
* @param cap Type of GSM capability to be added.
- * @param framesPerPkt Number of GSM frames pre packet.
- * @param comfortNoise Comfort noise spec for the capability.
+ * @param framesPerPkt Number of GSM frames pre packet.
+ * @param comfortNoise Comfort noise spec for the capability.
* @param scrambled Scrambled enabled/disabled for the capability.
* @param dir Direction of capability.OORX, OOTX, OORXANDTX
* @param startReceiveChannel Callback function to start receive channel.
@@ -616,10 +616,10 @@ EXTERN int ooCallAddG711Capability(OOH323CallData *call, int cap, int txframes,
* @param stopReceiveChannel Callback function to stop receive channel.
* @param stopTransmitChannel Callback function to stop transmit channel.
*
- * @return OO_OK, on success. OO_FAILED, on failure.
+ * @return OO_OK, on success. OO_FAILED, on failure.
*/
-EXTERN int ooCallAddGSMCapability(OOH323CallData* call, int cap,
- ASN1USINT framesPerPkt, OOBOOL comfortNoise,
+EXTERN int ooCallAddGSMCapability(OOH323CallData* call, int cap,
+ ASN1USINT framesPerPkt, OOBOOL comfortNoise,
OOBOOL scrambled, int dir,
cb_StartReceiveChannel startReceiveChannel,
cb_StartTransmitChannel startTransmitChannel,
@@ -630,23 +630,23 @@ EXTERN int ooCallAddGSMCapability(OOH323CallData* call, int cap,
/**
- * This function is used to add H263 video capability for the call. The
- * "ooCallAdd...Capability" functions allow to override the global endpoint
+ * This function is used to add H263 video capability for the call. The
+ * "ooCallAdd...Capability" functions allow to override the global endpoint
* capabilities and use specific capabilities for specific calls.
* @param call Call for which capability has to be added.
* @param cap Capability type - OO_H263VIDEO
- * @param sqcifMPI Minimum picture interval for encoding/decoding
+ * @param sqcifMPI Minimum picture interval for encoding/decoding
* of SQCIF pictures.
- * @param qcifMPI Minimum picture interval for encoding/decoding
+ * @param qcifMPI Minimum picture interval for encoding/decoding
* of QCIF pictures.
- * @param cifMPI Minimum picture interval for encoding/decoding
+ * @param cifMPI Minimum picture interval for encoding/decoding
* of CIF pictures.
- * @param cif4MPI Minimum picture interval for encoding/decoding
+ * @param cif4MPI Minimum picture interval for encoding/decoding
* of CIF4 pictures.
- * @param cif16MPI Minimum picture interval for encoding/decoding
+ * @param cif16MPI Minimum picture interval for encoding/decoding
* of CIF16 pictures.
* @param maxBitRate Maximum bit rate in units of 100 bits/s at
- * which a transmitter can transmit video or a
+ * which a transmitter can transmit video or a
* receiver can receive video.
* @param dir Direction of capability.OORX, OOTX, OORXANDTX
* @param startReceiveChannel Callback function to start receive channel.
@@ -654,13 +654,13 @@ EXTERN int ooCallAddGSMCapability(OOH323CallData* call, int cap,
* @param stopReceiveChannel Callback function to stop receive channel.
* @param stopTransmitChannel Callback function to stop transmit channel.
*
- * @return OO_OK, on success. OO_FAILED, on failure.
+ * @return OO_OK, on success. OO_FAILED, on failure.
*/
-EXTERN int ooCallAddH263VideoCapability(OOH323CallData *call, int cap,
- unsigned sqcifMPI, unsigned qcifMPI,
- unsigned cifMPI, unsigned cif4MPI,
- unsigned cif16MPI, unsigned maxBitRate,
- int dir,
+EXTERN int ooCallAddH263VideoCapability(OOH323CallData *call, int cap,
+ unsigned sqcifMPI, unsigned qcifMPI,
+ unsigned cifMPI, unsigned cif4MPI,
+ unsigned cif16MPI, unsigned maxBitRate,
+ int dir,
cb_StartReceiveChannel startReceiveChannel,
cb_StartTransmitChannel startTransmitChannel,
cb_StopReceiveChannel stopReceiveChannel,
@@ -682,9 +682,9 @@ EXTERN int ooCallEnableDTMFRFC2833
/**
- * This function is used to disable rfc 2833 capability for the call.
- * By default the stack uses the dtmf settings for the endpoint. But if you
- * want to enable/disable dtmf for a specific call, then you can override
+ * This function is used to disable rfc 2833 capability for the call.
+ * By default the stack uses the dtmf settings for the endpoint. But if you
+ * want to enable/disable dtmf for a specific call, then you can override
* end-point settings using this function
* @param call Call for which rfc2833 has to be disabled.
*
@@ -694,9 +694,9 @@ EXTERN int ooCallDisableDTMFRFC2833(OOH323CallData *call);
/**
- * This function is used to enable H.245(alphanumeric) dtmf support for the
- * call. By default the stack uses the dtmf settings for the endpoint. But if
- * you want to enable H.245(alphanumeric) dtmf for a specific call, then you
+ * This function is used to enable H.245(alphanumeric) dtmf support for the
+ * call. By default the stack uses the dtmf settings for the endpoint. But if
+ * you want to enable H.245(alphanumeric) dtmf for a specific call, then you
* can override end-point settings using this function
* @param call Call for which H.245(alphanumeric) dtmf support
* has to be enabled.
@@ -706,9 +706,9 @@ EXTERN int ooCallDisableDTMFRFC2833(OOH323CallData *call);
EXTERN int ooCallEnableDTMFH245Alphanumeric(OOH323CallData *call);
/**
- * This function is used to disable H.245(alphanumeric) dtmf support for the
- * call. By default the stack uses the dtmf settings for the endpoint. But if
- * you want to disable H.245(alphanumeric) dtmf for a specific call, then you
+ * This function is used to disable H.245(alphanumeric) dtmf support for the
+ * call. By default the stack uses the dtmf settings for the endpoint. But if
+ * you want to disable H.245(alphanumeric) dtmf for a specific call, then you
* can override end-point settings using this function
* @param call Call for which H.245(alphanumeric) dtmf support
* has to be disabled.
@@ -718,8 +718,8 @@ EXTERN int ooCallEnableDTMFH245Alphanumeric(OOH323CallData *call);
EXTERN int ooCallDisableDTMFH245Alphanumeric(OOH323CallData *call);
/**
- * This function is used to enable H.245(signal) dtmf support for the call.
- * By default the stack uses the dtmf settings for the endpoint. But if you
+ * This function is used to enable H.245(signal) dtmf support for the call.
+ * By default the stack uses the dtmf settings for the endpoint. But if you
* want to enable H.245(signal) dtmf for a specific call, then you can override
* end-point settings using this function
* @param call Call for which H.245(signal) dtmf support
@@ -731,9 +731,9 @@ EXTERN int ooCallEnableDTMFH245Signal(OOH323CallData *call);
/**
- * This function is used to disable H.245(signal) dtmf support for the call.
- * By default the stack uses the dtmf settings for the endpoint. But if you
- * want to disable H.245(signal) dtmf for a specific call, then you can
+ * This function is used to disable H.245(signal) dtmf support for the call.
+ * By default the stack uses the dtmf settings for the endpoint. But if you
+ * want to disable H.245(signal) dtmf for a specific call, then you can
* override end-point settings using this function
* @param call Call for which H.245(signal) dtmf support
* has to be disabled.
@@ -745,7 +745,7 @@ EXTERN int ooCallDisableDTMFH245Signal(OOH323CallData *call);
/**
* This function is used to enable Q.931(keypad) dtmf support for the call.
- * By default the stack uses the dtmf settings for the endpoint. But if you
+ * By default the stack uses the dtmf settings for the endpoint. But if you
* want to enable Q.931(keypad) dtmf support for a specific call, then you can
* override end-point settings using this function
* @param call Call for which Q.931(keypad) dtmf support
@@ -757,7 +757,7 @@ EXTERN int ooCallEnableDTMFQ931Keypad(OOH323CallData *call);
/**
* This function is used to disable Q.931(keypad) dtmf support for the call.
- * By default the stack uses the dtmf settings for the endpoint. But if you
+ * By default the stack uses the dtmf settings for the endpoint. But if you
* want to disable Q.931(keypad) dtmf support for a specific call, then you can
* override end-point settings using this function
* @param call Call for which Q.931(keypad) dtmf support
@@ -787,14 +787,14 @@ EXTERN int ooEndCall(OOH323CallData *call);
/**
* This function is used to remove a call from the list of existing calls.
- *
+ *
* @param call Pointer to the call to be removed.
* @return OO_OK, on success. OO_FAILED, on failure.
*/
EXTERN int ooRemoveCallFromList (OOH323CallData *call);
/**
- * This function is used to clean up a call. It closes all associated sockets,
+ * This function is used to clean up a call. It closes all associated sockets,
* removes the call from the global list and frees up associated memory.
*
* @param call Pointer to the call to be cleared.
@@ -803,25 +803,25 @@ EXTERN int ooRemoveCallFromList (OOH323CallData *call);
EXTERN int ooCleanCall(OOH323CallData *call);
/**
- * This function is used to check whether a specified session in specified
+ * This function is used to check whether a specified session in specified
* direction is active for the call.
* @param call Handle to call for which session has to be queried.
- * @param sessionID Session id to identify the type of session(1 for audio,
+ * @param sessionID Session id to identify the type of session(1 for audio,
* 2 for voice and 3 for data)
* @param dir Direction of the session(transmit/receive)
*
- * @return 1, if session active. 0, otherwise.
+ * @return 1, if session active. 0, otherwise.
*/
EXTERN ASN1BOOL ooIsSessionEstablished
(OOH323CallData *call, int sessionID, char* dir);
/**
- * This function can be used by an application to specify media endpoint
+ * This function can be used by an application to specify media endpoint
* information for different types of media. The stack by default uses local IP
- * and port for media. An application can provide mediainfo if it wants to
+ * and port for media. An application can provide mediainfo if it wants to
* override default.
* @param call Handle to the call
- * @param mediaInfo Structure which defines the media endpoint to be
+ * @param mediaInfo Structure which defines the media endpoint to be
* used.
*
* @return OO_OK, on success. OO_FAILED, on failure.
@@ -829,7 +829,7 @@ EXTERN ASN1BOOL ooIsSessionEstablished
EXTERN int ooAddMediaInfo(OOH323CallData *call, OOMediaInfo mediaInfo);
/**
- * This function is used to generate a media session id for the new media
+ * This function is used to generate a media session id for the new media
* session for the call.
* @param call Handle to the call.
* @param type Type of media session.
@@ -841,7 +841,7 @@ EXTERN unsigned ooCallGenerateSessionID
(OOH323CallData *call, OOCapType type, char *dir);
/**
- * This is an handler for H245 connection retry timer. When remote end is not
+ * This is an handler for H245 connection retry timer. When remote end is not
* yet listening for H245 connections, this timer provides a wait and retry
* mechanism to establish H245 connection.
* @param data Timer callback data.
@@ -868,8 +868,8 @@ EXTERN const char* ooGetReasonCodeText (OOUINT32 code);
*/
EXTERN const char* ooGetCallStateText (OOCallState callState);
-/**
- * @}
+/**
+ * @}
*/
int isRunning(char *callToken);
diff --git a/addons/ooh323c/src/ooCapability.c b/addons/ooh323c/src/ooCapability.c
index c5b1f87e9..731478346 100644
--- a/addons/ooh323c/src/ooCapability.c
+++ b/addons/ooh323c/src/ooCapability.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.
*
*****************************************************************************/
@@ -40,7 +40,7 @@ int ooCapabilityEnableDTMFRFC2833
}
else{
call->dtmfmode |= OO_CAP_DTMF_RFC2833;
- OOTRACEINFO3("Enabled RFC2833 DTMF capability for (%s, %s) \n",
+ OOTRACEINFO3("Enabled RFC2833 DTMF capability for (%s, %s) \n",
call->callType, call->callToken);
if(dynamicRTPPayloadType >= 96 && dynamicRTPPayloadType <= 127)
call->dtmfcodec = dynamicRTPPayloadType;
@@ -67,7 +67,7 @@ int ooCapabilityEnableDTMFCISCO
}
else{
call->dtmfmode |= OO_CAP_DTMF_CISCO;
- OOTRACEINFO3("Enabled RTP/CISCO DTMF capability for (%s, %s) \n",
+ OOTRACEINFO3("Enabled RTP/CISCO DTMF capability for (%s, %s) \n",
call->callType, call->callToken);
if(dynamicRTPPayloadType >= 96 && dynamicRTPPayloadType <= 127)
call->dtmfcodec = dynamicRTPPayloadType;
@@ -89,7 +89,7 @@ int ooCapabilityDisableDTMFRFC2833(OOH323CallData *call)
}
else{
call->dtmfmode ^= OO_CAP_DTMF_RFC2833;
- OOTRACEINFO3("Disabled RFC2833 DTMF capability for (%s, %s)\n",
+ OOTRACEINFO3("Disabled RFC2833 DTMF capability for (%s, %s)\n",
call->callType, call->callToken);
}
@@ -104,7 +104,7 @@ int ooCapabilityDisableDTMFCISCO(OOH323CallData *call)
}
else{
call->dtmfmode ^= OO_CAP_DTMF_CISCO;
- OOTRACEINFO3("Disabled RTP/CISCO DTMF capability for (%s, %s)\n",
+ OOTRACEINFO3("Disabled RTP/CISCO DTMF capability for (%s, %s)\n",
call->callType, call->callToken);
}
@@ -119,7 +119,7 @@ int ooCapabilityEnableDTMFH245Alphanumeric(OOH323CallData *call)
}
else {
call->dtmfmode |= OO_CAP_DTMF_H245_alphanumeric;
- OOTRACEINFO3("Dtmf mode set to H.245(alphanumeric) for (%s, %s)\n",
+ OOTRACEINFO3("Dtmf mode set to H.245(alphanumeric) for (%s, %s)\n",
call->callType, call->callToken);
}
return OO_OK;
@@ -133,7 +133,7 @@ int ooCapabilityDisableDTMFH245Alphanumeric(OOH323CallData *call)
}
else {
call->dtmfmode ^= OO_CAP_DTMF_H245_alphanumeric;
- OOTRACEINFO3("Dtmf mode H.245(alphanumeric) disabled for (%s, %s)\n",
+ OOTRACEINFO3("Dtmf mode H.245(alphanumeric) disabled for (%s, %s)\n",
call->callType, call->callToken);
}
return OO_OK;
@@ -147,7 +147,7 @@ int ooCapabilityEnableDTMFH245Signal(OOH323CallData *call)
}
else {
call->dtmfmode |= OO_CAP_DTMF_H245_signal;
- OOTRACEINFO3("Dtmf mode set to H.245(signal) for (%s, %s)\n",
+ OOTRACEINFO3("Dtmf mode set to H.245(signal) for (%s, %s)\n",
call->callType, call->callToken);
}
return OO_OK;
@@ -161,7 +161,7 @@ int ooCapabilityDisableDTMFH245Signal(OOH323CallData *call)
}
else {
call->dtmfmode ^= OO_CAP_DTMF_H245_signal;
- OOTRACEINFO3("Dtmf mode H.245(signal) disabled for (%s, %s)\n",
+ OOTRACEINFO3("Dtmf mode H.245(signal) disabled for (%s, %s)\n",
call->callType, call->callToken);
}
return OO_OK;
@@ -175,7 +175,7 @@ int ooCapabilityEnableDTMFQ931Keypad(struct OOH323CallData *call)
}
else {
call->dtmfmode |= OO_CAP_DTMF_Q931;
- OOTRACEINFO3("Dtmf mode set to Q.931(keypad) for the call (%s, %s)\n",
+ OOTRACEINFO3("Dtmf mode set to Q.931(keypad) for the call (%s, %s)\n",
call->callType, call->callToken);
}
return OO_OK;
@@ -189,26 +189,26 @@ int ooCapabilityDisableDTMFQ931Keypad(struct OOH323CallData *call)
}
else {
call->dtmfmode ^= OO_CAP_DTMF_Q931;
- OOTRACEINFO3("Dtmf mode Q.931(keypad) disabled for the call (%s, %s)\n",
+ OOTRACEINFO3("Dtmf mode Q.931(keypad) disabled for the call (%s, %s)\n",
call->callType, call->callToken);
}
return OO_OK;
}
-int ooCapabilityAddH263VideoCapability(ooCallData *call,
- unsigned sqcifMPI, unsigned qcifMPI,
- unsigned cifMPI, unsigned cif4MPI,
- unsigned cif16MPI, unsigned maxBitRate, int dir,
+int ooCapabilityAddH263VideoCapability(ooCallData *call,
+ unsigned sqcifMPI, unsigned qcifMPI,
+ unsigned cifMPI, unsigned cif4MPI,
+ unsigned cif16MPI, unsigned maxBitRate, int dir,
cb_StartReceiveChannel startReceiveChannel,
cb_StartTransmitChannel startTransmitChannel,
cb_StopReceiveChannel stopReceiveChannel,
- cb_StopTransmitChannel stopTransmitChannel,
+ cb_StopTransmitChannel stopTransmitChannel,
OOBOOL remote)
{
int ret = OO_OK;
if(sqcifMPI>0)
{
- ret = ooCapabilityAddH263VideoCapability_helper(call, sqcifMPI, 0,
+ ret = ooCapabilityAddH263VideoCapability_helper(call, sqcifMPI, 0,
0, 0, 0, maxBitRate, dir, startReceiveChannel,
startTransmitChannel, stopReceiveChannel,
stopTransmitChannel, remote);
@@ -232,7 +232,7 @@ int ooCapabilityAddH263VideoCapability(ooCallData *call,
}
if(cifMPI>0)
{
- ret = ooCapabilityAddH263VideoCapability_helper(call, 0, 0, cifMPI,
+ ret = ooCapabilityAddH263VideoCapability_helper(call, 0, 0, cifMPI,
0, 0, maxBitRate, dir, startReceiveChannel,
startTransmitChannel, stopReceiveChannel,
stopTransmitChannel, remote);
@@ -244,8 +244,8 @@ int ooCapabilityAddH263VideoCapability(ooCallData *call,
}
if(cif4MPI>0)
{
- ret = ooCapabilityAddH263VideoCapability_helper(call, 0, 0, 0,
- cif4MPI, 0, maxBitRate, dir,
+ ret = ooCapabilityAddH263VideoCapability_helper(call, 0, 0, 0,
+ cif4MPI, 0, maxBitRate, dir,
startReceiveChannel,
startTransmitChannel, stopReceiveChannel,
stopTransmitChannel, remote);
@@ -257,7 +257,7 @@ int ooCapabilityAddH263VideoCapability(ooCallData *call,
}
if(cif16MPI>0)
{
- ret = ooCapabilityAddH263VideoCapability_helper(call, dir, 0, 0, 0, 0,
+ ret = ooCapabilityAddH263VideoCapability_helper(call, dir, 0, 0, 0, 0,
cif16MPI, maxBitRate, startReceiveChannel,
startTransmitChannel, stopReceiveChannel,
stopTransmitChannel, remote);
@@ -272,18 +272,18 @@ int ooCapabilityAddH263VideoCapability(ooCallData *call,
}
int ooCapabilityAddH263VideoCapability_helper(ooCallData *call,
- unsigned sqcifMPI, unsigned qcifMPI,
- unsigned cifMPI, unsigned cif4MPI,
- unsigned cif16MPI, unsigned maxBitRate, int dir,
+ unsigned sqcifMPI, unsigned qcifMPI,
+ unsigned cifMPI, unsigned cif4MPI,
+ unsigned cif16MPI, unsigned maxBitRate, int dir,
cb_StartReceiveChannel startReceiveChannel,
cb_StartTransmitChannel startTransmitChannel,
cb_StopReceiveChannel stopReceiveChannel,
- cb_StopTransmitChannel stopTransmitChannel,
+ cb_StopTransmitChannel stopTransmitChannel,
OOBOOL remote)
{
ooH323EpCapability *epCap = NULL, *cur=NULL;
- OOH263CapParams *params=NULL;
+ OOH263CapParams *params=NULL;
OOCTXT *pctxt=NULL;
char *pictureType = NULL;
int cap = OO_H263VIDEO;
@@ -299,7 +299,7 @@ int ooCapabilityAddH263VideoCapability_helper(ooCallData *call,
".\n");
return OO_FAILED;
}
-
+
if(sqcifMPI>0)
{
params->MPI = sqcifMPI;
@@ -341,7 +341,7 @@ int ooCapabilityAddH263VideoCapability_helper(ooCallData *call,
}
else
epCap->dir = dir;
-
+
epCap->cap = OO_H263VIDEO;
epCap->capType = OO_CAP_TYPE_VIDEO;
epCap->params = (void*)params;
@@ -349,7 +349,7 @@ int ooCapabilityAddH263VideoCapability_helper(ooCallData *call,
epCap->startTransmitChannel = startTransmitChannel;
epCap->stopReceiveChannel = stopReceiveChannel;
epCap->stopTransmitChannel = stopTransmitChannel;
-
+
epCap->next = NULL;
if(!call)
@@ -380,7 +380,7 @@ int ooCapabilityAddH263VideoCapability_helper(ooCallData *call,
else{
/*Add as our capability */
OOTRACEDBGC4("Adding call specific H263 video capability %s. "
- "(%s, %s)\n", pictureType, call->callType,
+ "(%s, %s)\n", pictureType, call->callType,
call->callToken);
if(!call->ourCaps){
call->ourCaps = epCap;
@@ -399,8 +399,8 @@ int ooCapabilityAddH263VideoCapability_helper(ooCallData *call,
/* Used for g711 ulaw/alaw, g728, g729 and g7231 */
int ooCapabilityAddSimpleCapability
- (OOH323CallData *call, int cap, int txframes,
- int rxframes, OOBOOL silenceSuppression, int dir,
+ (OOH323CallData *call, int cap, int txframes,
+ int rxframes, OOBOOL silenceSuppression, int dir,
cb_StartReceiveChannel startReceiveChannel,
cb_StartTransmitChannel startTransmitChannel,
cb_StopReceiveChannel stopReceiveChannel,
@@ -408,7 +408,7 @@ int ooCapabilityAddSimpleCapability
OOBOOL remote)
{
ooH323EpCapability *epCap = NULL, *cur=NULL;
- OOCapParams *params=NULL;
+ OOCapParams *params=NULL;
OOCTXT *pctxt=NULL;
if(!call) pctxt = &gH323ep.ctxt;
else pctxt = call->pctxt;
@@ -438,7 +438,7 @@ int ooCapabilityAddSimpleCapability
else {
epCap->dir = dir;
}
-
+
epCap->cap = cap;
epCap->capType = OO_CAP_TYPE_AUDIO;
epCap->params = (void*)params;
@@ -451,7 +451,7 @@ int ooCapabilityAddSimpleCapability
if(!call)
{
/* Add as local capability */
- OOTRACEDBGC2("Adding endpoint capability %s. \n",
+ OOTRACEDBGC2("Adding endpoint capability %s. \n",
ooGetCapTypeText(epCap->cap));
if(!gH323ep.myCaps) {
gH323ep.myCaps = epCap;
@@ -479,8 +479,8 @@ int ooCapabilityAddSimpleCapability
}
else{
/* Add as our capability */
- OOTRACEDBGC4("Adding call specific capability %s. (%s, %s)\n",
- ooGetCapTypeText(epCap->cap), call->callType,
+ OOTRACEDBGC4("Adding call specific capability %s. (%s, %s)\n",
+ ooGetCapTypeText(epCap->cap), call->callType,
call->callToken);
if(!call->ourCaps){
call->ourCaps = epCap;
@@ -494,7 +494,7 @@ int ooCapabilityAddSimpleCapability
ooAppendCapToCapPrefs(call, cap);
}
}
-
+
return OO_OK;
}
@@ -513,20 +513,20 @@ int epCapIsPreferred(OOH323CallData *call, ooH323EpCapability *epCap)
return 0;
}
-int ooCapabilityAddGSMCapability(OOH323CallData *call, int cap,
+int ooCapabilityAddGSMCapability(OOH323CallData *call, int cap,
unsigned framesPerPkt, OOBOOL comfortNoise,
- OOBOOL scrambled, int dir,
+ OOBOOL scrambled, int dir,
cb_StartReceiveChannel startReceiveChannel,
cb_StartTransmitChannel startTransmitChannel,
cb_StopReceiveChannel stopReceiveChannel,
- cb_StopTransmitChannel stopTransmitChannel,
+ cb_StopTransmitChannel stopTransmitChannel,
OOBOOL remote)
{
ooH323EpCapability *epCap = NULL, *cur=NULL;
- OOGSMCapParams *params=NULL;
+ OOGSMCapParams *params=NULL;
OOCTXT *pctxt = NULL;
-
+
if(!call) pctxt = &gH323ep.ctxt;
else pctxt = call->pctxt;
@@ -559,7 +559,7 @@ int ooCapabilityAddGSMCapability(OOH323CallData *call, int cap,
epCap->startTransmitChannel = startTransmitChannel;
epCap->stopReceiveChannel = stopReceiveChannel;
epCap->stopTransmitChannel = stopTransmitChannel;
-
+
epCap->next = NULL;
/* Add as local capability */
if(!call)
@@ -587,8 +587,8 @@ int ooCapabilityAddGSMCapability(OOH323CallData *call, int cap,
}
}
else{
- OOTRACEDBGC4("Adding call specific capability %s. (%s, %s)\n",
- ooGetCapTypeText(epCap->cap), call->callType,
+ OOTRACEDBGC4("Adding call specific capability %s. (%s, %s)\n",
+ ooGetCapTypeText(epCap->cap), call->callType,
call->callToken);
/*Add as our capability */
if(!call->ourCaps){
@@ -617,7 +617,7 @@ int ooCapabilityAddT38Capability
OOBOOL remote)
{
ooH323EpCapability *epCap = NULL, *cur=NULL;
- OOCapParams *params=NULL;
+ OOCapParams *params=NULL;
OOCTXT *pctxt=NULL;
if(!call) pctxt = &gH323ep.ctxt;
else pctxt = call->pctxt;
@@ -639,7 +639,7 @@ int ooCapabilityAddT38Capability
else {
epCap->dir = dir;
}
-
+
epCap->cap = cap;
epCap->capType = OO_CAP_TYPE_DATA;
epCap->params = (void*)params;
@@ -652,7 +652,7 @@ int ooCapabilityAddT38Capability
if(!call)
{
/* Add as local capability */
- OOTRACEDBGC2("Adding endpoint capability %s. \n",
+ OOTRACEDBGC2("Adding endpoint capability %s. \n",
ooGetCapTypeText(epCap->cap));
if(!gH323ep.myCaps) {
gH323ep.myCaps = epCap;
@@ -681,8 +681,8 @@ int ooCapabilityAddT38Capability
}
else{
/* Add as our capability */
- OOTRACEDBGC4("Adding call specific capability %s. (%s, %s)\n",
- ooGetCapTypeText(epCap->cap), call->callType,
+ OOTRACEDBGC4("Adding call specific capability %s. (%s, %s)\n",
+ ooGetCapTypeText(epCap->cap), call->callType,
call->callToken);
if(!call->ourCaps){
call->ourCaps = epCap;
@@ -697,7 +697,7 @@ int ooCapabilityAddT38Capability
call->t38sides |= 1;
}
}
-
+
return OO_OK;
}
@@ -714,7 +714,7 @@ struct H245VideoCapability* ooCapabilityCreateVideoCapability
"ooCapabilityCreateVideoCapability.\n");
return NULL;
}
-
+
if(!(epCap->dir & dir))
{
OOTRACEERR1("Error:Failed to create capability due to direction "
@@ -741,7 +741,7 @@ struct H245VideoCapability* ooCapabilityCreateVideoCapability
}
-
+
struct H245AudioCapability* ooCapabilityCreateAudioCapability
(ooH323EpCapability *epCap, OOCTXT *pctxt, int dir)
{
@@ -752,7 +752,7 @@ struct H245AudioCapability* ooCapabilityCreateAudioCapability
"ooCapabilityCreateAudioCapability.\n");
return NULL;
}
-
+
if(!(epCap->dir & dir))
{
OOTRACEERR1("Error:Failed to create capability due to direction "
@@ -799,7 +799,7 @@ void* ooCapabilityCreateDTMFCapability(int cap, int dtmfcodec, OOCTXT *pctxt)
switch(cap)
{
case OO_CAP_DTMF_RFC2833:
- pATECap = (H245AudioTelephonyEventCapability*)memAlloc(pctxt,
+ pATECap = (H245AudioTelephonyEventCapability*)memAlloc(pctxt,
sizeof(H245AudioTelephonyEventCapability));
if(!pATECap)
{
@@ -820,7 +820,7 @@ void* ooCapabilityCreateDTMFCapability(int cap, int dtmfcodec, OOCTXT *pctxt)
pATECap->audioTelephoneEvent = events;
return pATECap;
case OO_CAP_DTMF_CISCO:
- pCSDTMFCap = (H245DataApplicationCapability*)memAlloc(pctxt,
+ pCSDTMFCap = (H245DataApplicationCapability*)memAlloc(pctxt,
sizeof(H245DataApplicationCapability));
if(!pCSDTMFCap)
{
@@ -851,10 +851,10 @@ void* ooCapabilityCreateDTMFCapability(int cap, int dtmfcodec, OOCTXT *pctxt)
pCSDTMFCap->application.u.nonStandard->nonStandardIdentifier.u.h221NonStandard->t35CountryCode = 181;
pCSDTMFCap->application.u.nonStandard->nonStandardIdentifier.u.h221NonStandard->t35Extension = 0;
pCSDTMFCap->application.u.nonStandard->nonStandardIdentifier.u.h221NonStandard->manufacturerCode = 18;
-
+
return pCSDTMFCap;
case OO_CAP_DTMF_H245_alphanumeric:
- userInput = (H245UserInputCapability*)memAllocZ(pctxt,
+ userInput = (H245UserInputCapability*)memAllocZ(pctxt,
sizeof(H245UserInputCapability));
if(!userInput)
{
@@ -865,7 +865,7 @@ void* ooCapabilityCreateDTMFCapability(int cap, int dtmfcodec, OOCTXT *pctxt)
userInput->t = T_H245UserInputCapability_basicString;
return userInput;
case OO_CAP_DTMF_H245_signal:
- userInput = (H245UserInputCapability*)memAllocZ(pctxt,
+ userInput = (H245UserInputCapability*)memAllocZ(pctxt,
sizeof(H245UserInputCapability));
if(!userInput)
{
@@ -898,9 +898,9 @@ struct H245VideoCapability* ooCapabilityCreateH263VideoCapability
}
params =(OOH263CapParams*)epCap->params;
- pVideo = (H245VideoCapability*)memAllocZ(pctxt,
+ pVideo = (H245VideoCapability*)memAllocZ(pctxt,
sizeof(H245VideoCapability));
- pH263Cap = (H245H263VideoCapability*) memAllocZ(pctxt,
+ pH263Cap = (H245H263VideoCapability*) memAllocZ(pctxt,
sizeof(H245H263VideoCapability));
if(!pVideo || !pH263Cap)
{
@@ -964,9 +964,9 @@ struct H245AudioCapability* ooCapabilityCreateGSMFullRateCapability
return NULL;
}
- pAudio = (H245AudioCapability*)memAlloc(pctxt,
+ pAudio = (H245AudioCapability*)memAlloc(pctxt,
sizeof(H245AudioCapability));
- pGSMCap = (H245GSMAudioCapability*)memAlloc(pctxt,
+ pGSMCap = (H245GSMAudioCapability*)memAlloc(pctxt,
sizeof(H245GSMAudioCapability));
if(!pAudio || !pGSMCap)
{
@@ -989,7 +989,7 @@ struct H245AudioCapability* ooCapabilityCreateGSMFullRateCapability
pGSMCap->audioUnitSize = ((OOGSMCapParams*)epCap->params)->rxframes*OO_GSMFRAMESIZE;
else
pGSMCap->audioUnitSize = ((OOGSMCapParams*)epCap->params)->txframes*OO_GSMFRAMESIZE;
-
+
pGSMCap->comfortNoise = ((OOGSMCapParams*)epCap->params)->comfortNoise;
pGSMCap->scrambled = ((OOGSMCapParams*)epCap->params)->scrambled;
@@ -1009,7 +1009,7 @@ struct H245AudioCapability* ooCapabilityCreateSimpleCapability
return NULL;
}
params =(OOCapParams*)epCap->params;
- pAudio = (H245AudioCapability*)memAlloc(pctxt,
+ pAudio = (H245AudioCapability*)memAlloc(pctxt,
sizeof(H245AudioCapability));
if(!pAudio)
{
@@ -1017,7 +1017,7 @@ struct H245AudioCapability* ooCapabilityCreateSimpleCapability
return NULL;
}
-
+
switch(epCap->cap)
{
case OO_G711ALAW64K:
@@ -1032,7 +1032,7 @@ struct H245AudioCapability* ooCapabilityCreateSimpleCapability
if(dir & OORX)
pAudio->u.g711Alaw56k = params->rxframes;
else
- pAudio->u.g711Alaw56k = params->txframes;
+ pAudio->u.g711Alaw56k = params->txframes;
return pAudio;
case OO_G711ULAW64K:
pAudio->t = T_H245AudioCapability_g711Ulaw64k;
@@ -1078,7 +1078,7 @@ struct H245AudioCapability* ooCapabilityCreateSimpleCapability
return pAudio;
case OO_G7231:
pAudio->t = T_H245AudioCapability_g7231;
- pAudio->u.g7231 = (H245AudioCapability_g7231*)memAlloc(pctxt,
+ pAudio->u.g7231 = (H245AudioCapability_g7231*)memAlloc(pctxt,
sizeof(H245AudioCapability_g7231));
if(!pAudio->u.g7231)
{
@@ -1112,7 +1112,7 @@ struct H245AudioCapability* ooCapabilityCreateNonStandardCapability
return NULL;
}
- pAudio = (H245AudioCapability*)memAlloc(pctxt,
+ pAudio = (H245AudioCapability*)memAlloc(pctxt,
sizeof(H245AudioCapability));
if(!pAudio)
{
@@ -1120,7 +1120,7 @@ struct H245AudioCapability* ooCapabilityCreateNonStandardCapability
return NULL;
}
-
+
switch(epCap->cap)
{
case OO_AMRNB:
@@ -1128,7 +1128,7 @@ struct H245AudioCapability* ooCapabilityCreateNonStandardCapability
case OO_G726AAL2:
case OO_SPEEX:
pAudio->t = T_H245AudioCapability_nonStandard;
- pAudio->u.nonStandard = (H245NonStandardParameter*)memAlloc(pctxt,
+ pAudio->u.nonStandard = (H245NonStandardParameter*)memAlloc(pctxt,
sizeof(H245NonStandardParameter));
if(!pAudio->u.nonStandard)
{
@@ -1139,7 +1139,7 @@ struct H245AudioCapability* ooCapabilityCreateNonStandardCapability
pAudio->u.nonStandard->nonStandardIdentifier.t=T_H245NonStandardIdentifier_h221NonStandard;
pAudio->u.nonStandard->nonStandardIdentifier.u.h221NonStandard =
- (H245NonStandardIdentifier_h221NonStandard *) memAlloc(pctxt,
+ (H245NonStandardIdentifier_h221NonStandard *) memAlloc(pctxt,
sizeof(H245NonStandardIdentifier_h221NonStandard));
if (!pAudio->u.nonStandard->nonStandardIdentifier.u.h221NonStandard) {
OOTRACEERR2("Error:Memory - ooCapabilityCreateSimpleCapability - %d\n", epCap->cap);
@@ -1199,7 +1199,7 @@ struct H245DataMode_application* ooCreateT38ApplicationData
{
app->t = T_H245DataApplicationCapability_application_t38fax;
app->u.t38fax =
- (H245DataMode_application_t38fax *) memAlloc(pctxt,
+ (H245DataMode_application_t38fax *) memAlloc(pctxt,
sizeof(H245DataMode_application_t38fax));
if (!app->u.t38fax) {
OOTRACEERR1("Error:Memory - ooCreateT38AppData\n");
@@ -1237,7 +1237,7 @@ struct H245DataApplicationCapability* ooCapabilityCreateT38Capability
return NULL;
}
- pT38 = (H245DataApplicationCapability*)memAlloc(pctxt,
+ pT38 = (H245DataApplicationCapability*)memAlloc(pctxt,
sizeof(H245DataApplicationCapability));
if(!pT38)
{
@@ -1246,7 +1246,7 @@ struct H245DataApplicationCapability* ooCapabilityCreateT38Capability
}
memset(pT38, 0, sizeof(H245DataApplicationCapability));
pT38app = (void *)&pT38->application;
-
+
switch(epCap->cap)
{
case OO_T38:
@@ -1268,7 +1268,7 @@ struct H245DataApplicationCapability* ooCapabilityCreateT38Capability
/* Used for g711 ulaw/alaw, g728, g729, g729a, g7231 */
ASN1BOOL ooCapabilityCheckCompatibility_Simple
- (OOH323CallData *call, ooH323EpCapability* epCap,
+ (OOH323CallData *call, ooH323EpCapability* epCap,
H245AudioCapability* audioCap, int dir)
{
int noofframes=0, cap;
@@ -1308,11 +1308,11 @@ ASN1BOOL ooCapabilityCheckCompatibility_Simple
case T_H245AudioCapability_g729AnnexA:
cap = OO_G729A;
noofframes = audioCap->u.g729AnnexA;
- break;
+ break;
case T_H245AudioCapability_g729wAnnexB:
cap = OO_G729B;
noofframes = audioCap->u.g729wAnnexB;
- break;
+ break;
case T_H245AudioCapability_g7231:
cap = OO_G7231;
noofframes = audioCap->u.g7231->maxAl_sduAudioFrames;
@@ -1322,7 +1322,7 @@ ASN1BOOL ooCapabilityCheckCompatibility_Simple
return FALSE;
}
- OOTRACEDBGC3("Comparing codecs: current=%d, requested=%d\n",
+ OOTRACEDBGC3("Comparing codecs: current=%d, requested=%d\n",
epCap->cap, cap);
if(cap != epCap->cap) { return FALSE; }
@@ -1359,7 +1359,7 @@ ASN1BOOL ooCapabilityCheckCompatibility_Simple
}
/* Used for g726, AMRNB */
ASN1BOOL ooCapabilityCheckCompatibility_NonStandard
- (OOH323CallData *call, ooH323EpCapability* epCap,
+ (OOH323CallData *call, ooH323EpCapability* epCap,
H245AudioCapability* audioCap, int dir)
{
int cap;
@@ -1368,7 +1368,7 @@ ASN1BOOL ooCapabilityCheckCompatibility_NonStandard
if (audioCap->t == T_H245AudioCapability_nonStandard &&
audioCap->u.nonStandard &&
- audioCap->u.nonStandard->nonStandardIdentifier.t ==
+ audioCap->u.nonStandard->nonStandardIdentifier.t ==
T_H245NonStandardIdentifier_h221NonStandard) {
switch (audioCap->u.nonStandard->data.numocts) {
case sizeof("G.726-32k")-1:
@@ -1386,10 +1386,10 @@ ASN1BOOL ooCapabilityCheckCompatibility_NonStandard
return FALSE;
break;
case sizeof("AMRNB")-1: /* case sizeof("Speex")-1 */
- if (!strncmp((char *)audioCap->u.nonStandard->data.data, "AMRNB",
+ if (!strncmp((char *)audioCap->u.nonStandard->data.data, "AMRNB",
audioCap->u.nonStandard->data.numocts))
cap = OO_AMRNB;
- else if (!strncmp((char *)audioCap->u.nonStandard->data.data, "Speex",
+ else if (!strncmp((char *)audioCap->u.nonStandard->data.data, "Speex",
audioCap->u.nonStandard->data.numocts))
cap = OO_SPEEX;
else
@@ -1401,7 +1401,7 @@ ASN1BOOL ooCapabilityCheckCompatibility_NonStandard
} else
return FALSE;
- OOTRACEDBGC3("Comparing codecs: current=%d, requested=%d\n",
+ OOTRACEDBGC3("Comparing codecs: current=%d, requested=%d\n",
epCap->cap, cap);
if(cap != epCap->cap) { return FALSE; }
@@ -1411,7 +1411,7 @@ ASN1BOOL ooCapabilityCheckCompatibility_NonStandard
OOBOOL ooCapabilityCheckCompatibility_GSM
- (OOH323CallData *call, ooH323EpCapability* epCap,
+ (OOH323CallData *call, ooH323EpCapability* epCap,
H245AudioCapability* audioCap, int dir)
{
unsigned noofframes=0, cap;
@@ -1447,8 +1447,8 @@ OOBOOL ooCapabilityCheckCompatibility_GSM
{
if(((OOGSMCapParams*)epCap->params)->txframes > noofframes){
OOTRACEDBGA5("Reducing txframes for GSM from %d to %d to match "
- "receive capability of remote end.(%s, %s)\n",
- ((OOGSMCapParams*)epCap->params)->txframes, noofframes,
+ "receive capability of remote end.(%s, %s)\n",
+ ((OOGSMCapParams*)epCap->params)->txframes, noofframes,
call->callType, call->callToken);
((OOGSMCapParams*)epCap->params)->txframes = noofframes;
}
@@ -1459,7 +1459,7 @@ OOBOOL ooCapabilityCheckCompatibility_GSM
}
OOBOOL ooCapabilityCheckCompatibility_T38
- (OOH323CallData *call, ooH323EpCapability* epCap,
+ (OOH323CallData *call, ooH323EpCapability* epCap,
H245DataApplicationCapability* t38Cap, int dir)
{
unsigned cap = 0;
@@ -1479,20 +1479,20 @@ OOBOOL ooCapabilityCheckCompatibility_T38
OOBOOL ooCapabilityCheckCompatibility_H263Video
- (struct OOH323CallData *call, ooH323EpCapability *epCap,
+ (struct OOH323CallData *call, ooH323EpCapability *epCap,
H245VideoCapability *pVideoCap, int dir)
{
H245H263VideoCapability *pH263Cap = NULL;
OOH263CapParams *params = epCap->params;
- if(!pVideoCap->u.h263VideoCapability)
+ if(!pVideoCap->u.h263VideoCapability)
{
OOTRACEERR3("Error:No H263 video capability present in video capability"
"structure. (%s, %s)\n", call->callType, call->callToken);
return FALSE;
}
pH263Cap = pVideoCap->u.h263VideoCapability;
-
+
/* can we receive/transmit this capability */
if(OORX & dir)
{
@@ -1632,14 +1632,14 @@ OOBOOL ooCapabilityCheckCompatibility_H263Video
}
}
}
-
+
return FALSE;
}
OOBOOL ooCapabilityCheckCompatibility_Audio
- (OOH323CallData *call, ooH323EpCapability* epCap,
+ (OOH323CallData *call, ooH323EpCapability* epCap,
H245AudioCapability* audioCap, int dir)
{
@@ -1666,17 +1666,17 @@ OOBOOL ooCapabilityCheckCompatibility_Audio
return FALSE;
}
- return FALSE;
+ return FALSE;
}
OOBOOL ooCapabilityCheckCompatibility_Video
- (OOH323CallData *call, ooH323EpCapability* epCap,
+ (OOH323CallData *call, ooH323EpCapability* epCap,
H245VideoCapability* videoCap, int dir)
{
switch(videoCap->t)
{
case T_H245VideoCapability_h263VideoCapability:
- return ooCapabilityCheckCompatibility_H263Video(call, epCap,
+ return ooCapabilityCheckCompatibility_H263Video(call, epCap,
videoCap, dir);
default:
OOTRACEDBGC3("ooCapabilityCheckCompatibility_Video - Unsupported video "
@@ -1689,19 +1689,19 @@ OOBOOL ooCapabilityCheckCompatibility_Video
can receive only y, then we can't reduce our transmit rate
*/
OOBOOL ooCapabilityCheckCompatibility
- (struct OOH323CallData *call, ooH323EpCapability* epCap,
+ (struct OOH323CallData *call, ooH323EpCapability* epCap,
H245DataType* dataType, int dir)
{
switch(dataType->t)
{
case T_H245DataType_audioData:
if(epCap->capType == OO_CAP_TYPE_AUDIO)
- return ooCapabilityCheckCompatibility_Audio(call, epCap,
+ return ooCapabilityCheckCompatibility_Audio(call, epCap,
dataType->u.audioData, dir);
break;
case T_H245DataType_videoData:
if(epCap->capType == OO_CAP_TYPE_VIDEO)
- return ooCapabilityCheckCompatibility_Video(call, epCap,
+ return ooCapabilityCheckCompatibility_Video(call, epCap,
dataType->u.videoData, dir);
break;
case T_H245DataType_data:
@@ -1729,11 +1729,11 @@ ASN1BOOL ooCheckCompatibility
if(txCap->cap != rxCap->cap) return FALSE;
if(!(txCap->dir & OOTX)) return FALSE;
-
+
if(!(rxCap->dir & OORX)) return FALSE;
switch(txCap->cap)
- {
+ {
case OO_G711ALAW64K:
case OO_G711ALAW56K:
case OO_G711ULAW64K:
@@ -1743,26 +1743,26 @@ ASN1BOOL ooCheckCompatibility
case OO_G729A:
case OO_G729B:
case OO_G7231:
- if(((OOCapParams*)txCap->params)->txframes <=
+ if(((OOCapParams*)txCap->params)->txframes <=
((OOCapParams*)rxCap->params)->rxframes)
return TRUE;
else{
- OOTRACEDBGA4("Simple caps %s are not compatible.(%s, %s)\n",
- ooGetCapTypeText(txCap->cap), call->callType,
+ OOTRACEDBGA4("Simple caps %s are not compatible.(%s, %s)\n",
+ ooGetCapTypeText(txCap->cap), call->callType,
call->callToken);
return FALSE;
}
case OO_GSMFULLRATE:
case OO_GSMHALFRATE:
case OO_GSMENHANCEDFULLRATE:
- if(((OOGSMCapParams*)txCap->params)->txframes <=
+ if(((OOGSMCapParams*)txCap->params)->txframes <=
((OOGSMCapParams*)rxCap->params)->rxframes)
return TRUE;
else{
OOTRACEDBGA3("GSM caps are not compatible. (%s, %s)\n", call->callType,
call->callToken);
return FALSE;
- }
+ }
default:
OOTRACEWARN3("WARN: Unsupported capabilities being compared. (%s, %s)\n",
call->callType, call->callToken);
@@ -1796,18 +1796,18 @@ ooH323EpCapability* ooIsAudioDataTypeGSMSupported
cap = OO_GSMENHANCEDFULLRATE;
break;
default:
- OOTRACEERR3("Error:Invalid GSM capability type.(%s, %s)\n",
+ OOTRACEERR3("Error:Invalid GSM capability type.(%s, %s)\n",
call->callType, call->callToken);
return NULL;
}
OOTRACEDBGC4("Determined audio data type to be of type %d. Searching"
- " for matching capability.(%s, %s)\n", cap, call->callType,
+ " for matching capability.(%s, %s)\n", cap, call->callType,
call->callToken);
/* If we have call specific caps then we use them, otherwise we use
general endpoint caps*/
- if(call->ourCaps)
+ if(call->ourCaps)
cur = call->ourCaps;
else
cur = gH323ep.myCaps;
@@ -1816,31 +1816,31 @@ ooH323EpCapability* ooIsAudioDataTypeGSMSupported
{
OOTRACEDBGC4("Local cap being compared %d. (%s, %s)\n", cur->cap,
call->callType, call->callToken);
-
+
if(cur->cap == cap && (cur->dir & dir))
break;
cur = cur->next;
}
-
+
if(!cur) return NULL;
-
+
OOTRACEDBGC4("Found matching audio capability type %d. Comparing"
- " other parameters. (%s, %s)\n", cap, call->callType,
+ " other parameters. (%s, %s)\n", cap, call->callType,
call->callToken);
-
+
/* can we receive this capability */
if(dir & OORX)
{
if(((OOGSMCapParams*)cur->params)->rxframes < framesPerPkt)
return NULL;
else{
- epCap = (ooH323EpCapability*)memAlloc(call->pctxt,
+ epCap = (ooH323EpCapability*)memAlloc(call->pctxt,
sizeof(ooH323EpCapability));
params =(OOGSMCapParams*)memAlloc(call->pctxt,sizeof(OOGSMCapParams));
if(!epCap || !params)
{
OOTRACEERR3("Error:Memory - ooIsAudioDataTypeGSMSupported - "
- "epCap/params (%s, %s)\n", call->callType,
+ "epCap/params (%s, %s)\n", call->callType,
call->callToken);
return NULL;
}
@@ -1861,13 +1861,13 @@ ooH323EpCapability* ooIsAudioDataTypeGSMSupported
/* Can we transmit compatible stream */
if(dir & OOTX)
{
- epCap = (ooH323EpCapability*)memAlloc(call->pctxt,
+ epCap = (ooH323EpCapability*)memAlloc(call->pctxt,
sizeof(ooH323EpCapability));
params =(OOGSMCapParams*)memAlloc(call->pctxt,sizeof(OOGSMCapParams));
if(!epCap || !params)
{
OOTRACEERR3("Error:Memory - ooIsAudioDataTypeGSMSupported - "
- "epCap/params (%s, %s)\n", call->callType,
+ "epCap/params (%s, %s)\n", call->callType,
call->callToken);
return NULL;
}
@@ -1885,7 +1885,7 @@ ooH323EpCapability* ooIsAudioDataTypeGSMSupported
{
OOTRACEINFO5("Reducing framesPerPkt for transmission of GSM "
"capability from %d to %d to match receive capability of"
- " remote endpoint.(%s, %s)\n", params->txframes,
+ " remote endpoint.(%s, %s)\n", params->txframes,
framesPerPkt, call->callType, call->callToken);
params->txframes = framesPerPkt;
}
@@ -1957,12 +1957,12 @@ ooH323EpCapability* ooIsAudioDataTypeSimpleSupported
}
OOTRACEDBGC4("Determined Simple audio data type to be of type %s. Searching"
- " for matching capability.(%s, %s)\n",
+ " for matching capability.(%s, %s)\n",
ooGetCapTypeText(cap), call->callType, call->callToken);
/* If we have call specific caps, we use them; otherwise use general
endpoint caps
- */
+ */
if(call->ourCaps)
cur = call->ourCaps;
else
@@ -1970,38 +1970,38 @@ ooH323EpCapability* ooIsAudioDataTypeSimpleSupported
while(cur)
{
- OOTRACEDBGC4("Local cap being compared %s. (%s, %s)\n",
+ OOTRACEDBGC4("Local cap being compared %s. (%s, %s)\n",
ooGetCapTypeText(cur->cap),call->callType, call->callToken);
-
+
if(cur->cap == cap && (cur->dir & dir))
break;
cur = cur->next;
}
-
+
if(!cur) return NULL;
-
+
OOTRACEDBGC4("Found matching simple audio capability type %s. Comparing"
- " other parameters. (%s, %s)\n", ooGetCapTypeText(cap),
+ " other parameters. (%s, %s)\n", ooGetCapTypeText(cap),
call->callType, call->callToken);
-
+
/* can we receive this capability */
if(dir & OORX)
{
if(((OOCapParams*)cur->params)->rxframes < framesPerPkt)
return NULL;
- if(((OOCapParams*)cur->params)->rxframes > framesPerPkt)
+ if(((OOCapParams*)cur->params)->rxframes > framesPerPkt)
((OOCapParams*)cur->params)->rxframes = framesPerPkt;
- OOTRACEDBGC4("We can receive Simple capability %s. (%s, %s)\n",
- ooGetCapTypeText(cur->cap), call->callType,
+ OOTRACEDBGC4("We can receive Simple capability %s. (%s, %s)\n",
+ ooGetCapTypeText(cur->cap), call->callType,
call->callToken);
- epCap = (ooH323EpCapability*)memAlloc(call->pctxt,
+ epCap = (ooH323EpCapability*)memAlloc(call->pctxt,
sizeof(ooH323EpCapability));
params=(OOCapParams*)memAlloc(call->pctxt,sizeof(OOCapParams));
if(!epCap || !params)
{
OOTRACEERR3("Error:Memory - ooIsAudioDataTypeSimpleSupported - "
- "epCap/params (%s, %s)\n", call->callType,
+ "epCap/params (%s, %s)\n", call->callType,
call->callToken);
return NULL;
}
@@ -2016,8 +2016,8 @@ ooH323EpCapability* ooIsAudioDataTypeSimpleSupported
epCap->next = NULL;
memcpy(epCap->params, cur->params, sizeof(OOCapParams));
OOTRACEDBGC4("Returning copy of matched receive capability %s. "
- "(%s, %s)\n",
- ooGetCapTypeText(cur->cap), call->callType,
+ "(%s, %s)\n",
+ ooGetCapTypeText(cur->cap), call->callType,
call->callToken);
return epCap;
}
@@ -2025,16 +2025,16 @@ ooH323EpCapability* ooIsAudioDataTypeSimpleSupported
/* Can we transmit compatible stream */
if(dir & OOTX)
{
- OOTRACEDBGC4("We can transmit Simple capability %s. (%s, %s)\n",
- ooGetCapTypeText(cur->cap), call->callType,
+ OOTRACEDBGC4("We can transmit Simple capability %s. (%s, %s)\n",
+ ooGetCapTypeText(cur->cap), call->callType,
call->callToken);
- epCap = (ooH323EpCapability*)memAlloc(call->pctxt,
+ epCap = (ooH323EpCapability*)memAlloc(call->pctxt,
sizeof(ooH323EpCapability));
params =(OOCapParams*)memAlloc(call->pctxt,sizeof(OOCapParams));
if(!epCap || !params)
{
OOTRACEERR3("Error:Memory - ooIsAudioDataTypeSimpleSupported - "
- "epCap/params (%s, %s)\n", call->callType,
+ "epCap/params (%s, %s)\n", call->callType,
call->callToken);
return NULL;
}
@@ -2052,13 +2052,13 @@ ooH323EpCapability* ooIsAudioDataTypeSimpleSupported
{
OOTRACEINFO5("Reducing framesPerPkt for transmission of Simple "
"capability from %d to %d to match receive capability of"
- " remote endpoint.(%s, %s)\n", params->txframes,
+ " remote endpoint.(%s, %s)\n", params->txframes,
framesPerPkt, call->callType, call->callToken);
params->txframes = framesPerPkt;
}
OOTRACEDBGC4("Returning copy of matched transmit capability %s."
- "(%s, %s)\n",
- ooGetCapTypeText(cur->cap), call->callType,
+ "(%s, %s)\n",
+ ooGetCapTypeText(cur->cap), call->callType,
call->callToken);
return epCap;
}
@@ -2074,8 +2074,8 @@ ooH323EpCapability* ooIsAudioDataTypeNonStandardSupported
OOCapParams * params= NULL;
if (audioCap->t == T_H245AudioCapability_nonStandard &&
- audioCap->u.nonStandard &&
- audioCap->u.nonStandard->nonStandardIdentifier.t ==
+ audioCap->u.nonStandard &&
+ audioCap->u.nonStandard->nonStandardIdentifier.t ==
T_H245NonStandardIdentifier_h221NonStandard) {
switch (audioCap->u.nonStandard->data.numocts) {
case sizeof("G.726-32k")-1:
@@ -2109,12 +2109,12 @@ ooH323EpCapability* ooIsAudioDataTypeNonStandardSupported
return NULL;
OOTRACEDBGC4("Determined Simple audio data type to be of type %s. Searching"
- " for matching capability.(%s, %s)\n",
+ " for matching capability.(%s, %s)\n",
ooGetCapTypeText(cap), call->callType, call->callToken);
/* If we have call specific caps, we use them; otherwise use general
endpoint caps
- */
+ */
if(call->ourCaps)
cur = call->ourCaps;
else
@@ -2122,33 +2122,33 @@ ooH323EpCapability* ooIsAudioDataTypeNonStandardSupported
while(cur)
{
- OOTRACEDBGC4("Local cap being compared %s. (%s, %s)\n",
+ OOTRACEDBGC4("Local cap being compared %s. (%s, %s)\n",
ooGetCapTypeText(cur->cap),call->callType, call->callToken);
-
+
if(cur->cap == cap && (cur->dir & dir))
break;
cur = cur->next;
}
-
+
if(!cur) return NULL;
-
+
OOTRACEDBGC4("Found matching simple audio capability type %s. Comparing"
- " other parameters. (%s, %s)\n", ooGetCapTypeText(cap),
+ " other parameters. (%s, %s)\n", ooGetCapTypeText(cap),
call->callType, call->callToken);
-
+
/* can we receive this capability */
if(dir & OORX)
{
- OOTRACEDBGC4("We can receive Simple capability %s. (%s, %s)\n",
- ooGetCapTypeText(cur->cap), call->callType,
+ OOTRACEDBGC4("We can receive Simple capability %s. (%s, %s)\n",
+ ooGetCapTypeText(cur->cap), call->callType,
call->callToken);
- epCap = (ooH323EpCapability*)memAlloc(call->pctxt,
+ epCap = (ooH323EpCapability*)memAlloc(call->pctxt,
sizeof(ooH323EpCapability));
params=(OOCapParams*)memAlloc(call->pctxt,sizeof(OOCapParams));
if(!epCap || !params)
{
OOTRACEERR3("Error:Memory - ooIsAudioDataTypeSimpleSupported - "
- "epCap/params (%s, %s)\n", call->callType,
+ "epCap/params (%s, %s)\n", call->callType,
call->callToken);
return NULL;
}
@@ -2163,8 +2163,8 @@ ooH323EpCapability* ooIsAudioDataTypeNonStandardSupported
epCap->next = NULL;
memcpy(epCap->params, cur->params, sizeof(OOCapParams));
OOTRACEDBGC4("Returning copy of matched receive capability %s. "
- "(%s, %s)\n",
- ooGetCapTypeText(cur->cap), call->callType,
+ "(%s, %s)\n",
+ ooGetCapTypeText(cur->cap), call->callType,
call->callToken);
return epCap;
}
@@ -2172,16 +2172,16 @@ ooH323EpCapability* ooIsAudioDataTypeNonStandardSupported
/* Can we transmit compatible stream */
if(dir & OOTX)
{
- OOTRACEDBGC4("We can transmit Simple capability %s. (%s, %s)\n",
- ooGetCapTypeText(cur->cap), call->callType,
+ OOTRACEDBGC4("We can transmit Simple capability %s. (%s, %s)\n",
+ ooGetCapTypeText(cur->cap), call->callType,
call->callToken);
- epCap = (ooH323EpCapability*)memAlloc(call->pctxt,
+ epCap = (ooH323EpCapability*)memAlloc(call->pctxt,
sizeof(ooH323EpCapability));
params =(OOCapParams*)memAlloc(call->pctxt,sizeof(OOCapParams));
if(!epCap || !params)
{
OOTRACEERR3("Error:Memory - ooIsAudioDataTypeSimpleSupported - "
- "epCap/params (%s, %s)\n", call->callType,
+ "epCap/params (%s, %s)\n", call->callType,
call->callToken);
return NULL;
}
@@ -2196,8 +2196,8 @@ ooH323EpCapability* ooIsAudioDataTypeNonStandardSupported
epCap->next = NULL;
memcpy(epCap->params, cur->params, sizeof(OOCapParams));
OOTRACEDBGC4("Returning copy of matched transmit capability %s."
- "(%s, %s)\n",
- ooGetCapTypeText(cur->cap), call->callType,
+ "(%s, %s)\n",
+ ooGetCapTypeText(cur->cap), call->callType,
call->callToken);
return epCap;
}
@@ -2228,10 +2228,10 @@ ooH323EpCapability* ooIsAudioDataTypeSupported
case T_H245AudioCapability_gsmFullRate:
case T_H245AudioCapability_gsmHalfRate:
case T_H245AudioCapability_gsmEnhancedFullRate:
- return ooIsAudioDataTypeGSMSupported(call, audioCap, dir);
+ return ooIsAudioDataTypeGSMSupported(call, audioCap, dir);
default:
return NULL;
- }
+ }
}
ooH323EpCapability* ooIsT38Supported
@@ -2248,7 +2248,7 @@ ooH323EpCapability* ooIsT38Supported
break;
default:
return NULL;
- }
+ }
if(call->ourCaps)
cur = call->ourCaps;
@@ -2257,33 +2257,33 @@ ooH323EpCapability* ooIsT38Supported
while(cur)
{
- OOTRACEDBGC4("Local cap being compared %s. (%s, %s)\n",
+ OOTRACEDBGC4("Local cap being compared %s. (%s, %s)\n",
ooGetCapTypeText(cur->cap),call->callType, call->callToken);
-
+
if(cur->cap == cap && (cur->dir & dir))
break;
cur = cur->next;
}
-
+
if(!cur) return NULL;
-
+
OOTRACEDBGC4("Found matching t38 capability type %s. Comparing"
- " other parameters. (%s, %s)\n", ooGetCapTypeText(cap),
+ " other parameters. (%s, %s)\n", ooGetCapTypeText(cap),
call->callType, call->callToken);
-
+
/* can we receive this capability */
if(dir & OORX)
{
- OOTRACEDBGC4("We can receive Simple capability %s. (%s, %s)\n",
- ooGetCapTypeText(cur->cap), call->callType,
+ OOTRACEDBGC4("We can receive Simple capability %s. (%s, %s)\n",
+ ooGetCapTypeText(cur->cap), call->callType,
call->callToken);
- epCap = (ooH323EpCapability*)memAllocZ(call->pctxt,
+ epCap = (ooH323EpCapability*)memAllocZ(call->pctxt,
sizeof(ooH323EpCapability));
params=(OOCapParams*)memAlloc(call->pctxt,sizeof(OOCapParams));
if(!epCap || !params)
{
OOTRACEERR3("Error:Memory - ooIsT38Supported - "
- "epCap/params (%s, %s)\n", call->callType,
+ "epCap/params (%s, %s)\n", call->callType,
call->callToken);
return NULL;
}
@@ -2298,8 +2298,8 @@ ooH323EpCapability* ooIsT38Supported
epCap->next = NULL;
memcpy(epCap->params, cur->params, sizeof(OOCapParams));
OOTRACEDBGC4("Returning copy of matched receive capability %s. "
- "(%s, %s)\n",
- ooGetCapTypeText(cur->cap), call->callType,
+ "(%s, %s)\n",
+ ooGetCapTypeText(cur->cap), call->callType,
call->callToken);
return epCap;
}
@@ -2307,16 +2307,16 @@ ooH323EpCapability* ooIsT38Supported
/* Can we transmit compatible stream */
if(dir & OOTX)
{
- OOTRACEDBGC4("We can transmit Simple capability %s. (%s, %s)\n",
- ooGetCapTypeText(cur->cap), call->callType,
+ OOTRACEDBGC4("We can transmit Simple capability %s. (%s, %s)\n",
+ ooGetCapTypeText(cur->cap), call->callType,
call->callToken);
- epCap = (ooH323EpCapability*)memAlloc(call->pctxt,
+ epCap = (ooH323EpCapability*)memAlloc(call->pctxt,
sizeof(ooH323EpCapability));
params =(OOCapParams*)memAllocZ(call->pctxt,sizeof(OOCapParams));
if(!epCap || !params)
{
OOTRACEERR3("Error:Memory - ooIsAudioDataTypeSimpleSupported - "
- "epCap/params (%s, %s)\n", call->callType,
+ "epCap/params (%s, %s)\n", call->callType,
call->callToken);
return NULL;
}
@@ -2331,8 +2331,8 @@ ooH323EpCapability* ooIsT38Supported
epCap->next = NULL;
memcpy(epCap->params, cur->params, sizeof(OOCapParams));
OOTRACEDBGC4("Returning copy of matched transmit capability %s."
- "(%s, %s)\n",
- ooGetCapTypeText(cur->cap), call->callType,
+ "(%s, %s)\n",
+ ooGetCapTypeText(cur->cap), call->callType,
call->callToken);
return epCap;
}
@@ -2340,12 +2340,12 @@ ooH323EpCapability* ooIsT38Supported
}
ooH323EpCapability* ooIsVideoDataTypeH263Supported
- (OOH323CallData *call, H245H263VideoCapability* pH263Cap, int dir,
+ (OOH323CallData *call, H245H263VideoCapability* pH263Cap, int dir,
OOPictureFormat picFormat)
{
int cap;
ooH323EpCapability *cur=NULL, *epCap=NULL;
- OOH263CapParams *params= NULL;
+ OOH263CapParams *params= NULL;
char *pictureType=NULL;
unsigned mpi=0;
cap = OO_H263VIDEO;
@@ -2375,14 +2375,14 @@ ooH323EpCapability* ooIsVideoDataTypeH263Supported
pictureType = "CIF16";
mpi = pH263Cap->cif16MPI;
}
-
- OOTRACEDBGA4("Looking for H263 video capability(%s). (%s, %s)\n",
+
+ OOTRACEDBGA4("Looking for H263 video capability(%s). (%s, %s)\n",
pictureType, call->callType, call->callToken);
/* If we have call specific caps, we use them; otherwise use general
endpoint caps
- */
+ */
if(call->ourCaps)
cur = call->ourCaps;
else
@@ -2390,9 +2390,9 @@ ooH323EpCapability* ooIsVideoDataTypeH263Supported
while(cur)
{
- OOTRACEDBGC4("Local cap being compared %s. (%s, %s)\n",
+ OOTRACEDBGC4("Local cap being compared %s. (%s, %s)\n",
ooGetCapTypeText(cur->cap),call->callType, call->callToken);
-
+
if(cur->cap == cap && (cur->dir & dir))
{
if(((OOH263CapParams*)cur->params)->picFormat == picFormat)
@@ -2400,25 +2400,25 @@ ooH323EpCapability* ooIsVideoDataTypeH263Supported
}
cur = cur->next;
}
-
+
if(!cur) return NULL;
-
+
OOTRACEDBGC4("Found matching H.263 video capability type %s. Comparing"
- " other parameters. (%s, %s)\n", ooGetCapTypeText(cap),
- call->callType, call->callToken);
+ " other parameters. (%s, %s)\n", ooGetCapTypeText(cap),
+ call->callType, call->callToken);
if(dir & OORX)
{
if(mpi < ((OOH263CapParams*)cur->params)->MPI)
return NULL;
else{
- epCap = (ooH323EpCapability*)memAlloc(call->pctxt,
+ epCap = (ooH323EpCapability*)memAlloc(call->pctxt,
sizeof(ooH323EpCapability));
- params = (OOH263CapParams*) memAlloc(call->pctxt,
+ params = (OOH263CapParams*) memAlloc(call->pctxt,
sizeof(OOH263CapParams));
if(!epCap || !params)
{
OOTRACEERR3("Error:Memory - ooIsVideoDataTypeH263Supported - "
- "epCap/params. (%s, %s)\n", call->callType,
+ "epCap/params. (%s, %s)\n", call->callType,
call->callToken);
return NULL;
}
@@ -2433,21 +2433,21 @@ ooH323EpCapability* ooIsVideoDataTypeH263Supported
epCap->next = NULL;
memcpy(epCap->params, cur->params, sizeof(OOH263CapParams));
OOTRACEDBGC4("Returning copy of matched receive capability %s. "
- "(%s, %s)\n", ooGetCapTypeText(cur->cap), call->callType,
+ "(%s, %s)\n", ooGetCapTypeText(cur->cap), call->callType,
call->callToken);
return epCap;
}
}
if(dir & OOTX)
{
- epCap = (ooH323EpCapability*)memAlloc(call->pctxt,
+ epCap = (ooH323EpCapability*)memAlloc(call->pctxt,
sizeof(ooH323EpCapability));
- params = (OOH263CapParams*) memAlloc(call->pctxt,
+ params = (OOH263CapParams*) memAlloc(call->pctxt,
sizeof(OOH263CapParams));
if(!epCap || !params)
{
OOTRACEERR3("Error:Memory - ooIsVideoDataTypeH263Supported - "
- "epCap/params. (%s, %s)\n", call->callType,
+ "epCap/params. (%s, %s)\n", call->callType,
call->callToken);
return NULL;
}
@@ -2465,12 +2465,12 @@ ooH323EpCapability* ooIsVideoDataTypeH263Supported
{
OOTRACEINFO5("Increasing minimum picture interval for transmission of"
" H263 video capability from %d to %d to match receive "
- "capability of remote endpoint.(%s, %s)\n", params->MPI,
+ "capability of remote endpoint.(%s, %s)\n", params->MPI,
mpi, call->callType, call->callToken);
params->MPI = mpi;
}
OOTRACEDBGC4("Returning copy of matched receive capability %s. "
- "(%s, %s)\n", ooGetCapTypeText(cur->cap), call->callType,
+ "(%s, %s)\n", ooGetCapTypeText(cur->cap), call->callType,
call->callToken);
return epCap;
}
@@ -2481,25 +2481,25 @@ ooH323EpCapability* ooIsVideoDataTypeH263Supported
ooH323EpCapability* ooIsVideoDataTypeSupported
(OOH323CallData *call, H245VideoCapability* pVideoCap, int dir)
{
- switch(pVideoCap->t)
+ switch(pVideoCap->t)
{
case T_H245VideoCapability_h263VideoCapability:
if(pVideoCap->u.h263VideoCapability->m.sqcifMPIPresent)
- return ooIsVideoDataTypeH263Supported(call,
+ return ooIsVideoDataTypeH263Supported(call,
pVideoCap->u.h263VideoCapability, dir, OO_PICFORMAT_SQCIF);
else if(pVideoCap->u.h263VideoCapability->m.qcifMPIPresent)
- return ooIsVideoDataTypeH263Supported(call,
+ return ooIsVideoDataTypeH263Supported(call,
pVideoCap->u.h263VideoCapability, dir, OO_PICFORMAT_QCIF);
else if(pVideoCap->u.h263VideoCapability->m.cifMPIPresent)
- return ooIsVideoDataTypeH263Supported(call,
+ return ooIsVideoDataTypeH263Supported(call,
pVideoCap->u.h263VideoCapability, dir, OO_PICFORMAT_CIF);
else if(pVideoCap->u.h263VideoCapability->m.cif4MPIPresent)
- return ooIsVideoDataTypeH263Supported(call,
+ return ooIsVideoDataTypeH263Supported(call,
pVideoCap->u.h263VideoCapability, dir, OO_PICFORMAT_CIF4);
else if(pVideoCap->u.h263VideoCapability->m.cif16MPIPresent)
- return ooIsVideoDataTypeH263Supported(call,
+ return ooIsVideoDataTypeH263Supported(call,
pVideoCap->u.h263VideoCapability, dir, OO_PICFORMAT_CIF16);
- break;
+ break;
case T_H245VideoCapability_nonStandard:
case T_H245VideoCapability_h261VideoCapability:
case T_H245VideoCapability_h262VideoCapability:
@@ -2517,17 +2517,17 @@ ooH323EpCapability* ooIsVideoDataTypeSupported
ooH323EpCapability* ooIsDataTypeSupported
(OOH323CallData *call, H245DataType *data, int dir)
{
- OOTRACEDBGC3("Looking for data type support. (%s, %s)\n", call->callType,
+ OOTRACEDBGC3("Looking for data type support. (%s, %s)\n", call->callType,
call->callToken);
-
+
switch(data->t)
{
case T_H245DataType_nonStandard:
- OOTRACEDBGC3("NonStandard data type not supported.(%s, %s)\n",
+ OOTRACEDBGC3("NonStandard data type not supported.(%s, %s)\n",
call->callType, call->callToken);
return NULL;
case T_H245DataType_nullData:
- OOTRACEDBGC3("Null data type not supported.(%s, %s)\n",
+ OOTRACEDBGC3("Null data type not supported.(%s, %s)\n",
call->callType, call->callToken);
return NULL;
case T_H245DataType_videoData:
@@ -2540,12 +2540,12 @@ ooH323EpCapability* ooIsDataTypeSupported
return ooIsAudioDataTypeSupported(call, data->u.audioData, dir);
case T_H245DataType_data:
- OOTRACEDBGC3("Looking for application data dataType support.(%s, %s)\n",
+ OOTRACEDBGC3("Looking for application data dataType support.(%s, %s)\n",
call->callType, call->callToken);
return ooIsT38Supported(call, data->u.data, dir);
case T_H245DataType_encryptionData:
- OOTRACEDBGC3("Encryption data type not supported.(%s, %s)\n",
+ OOTRACEDBGC3("Encryption data type not supported.(%s, %s)\n",
call->callType, call->callToken);
return NULL;
case T_H245DataType_h235Control:
@@ -2555,7 +2555,7 @@ ooH323EpCapability* ooIsDataTypeSupported
case T_H245DataType_multiplexedStream:
return NULL;
default:
- OOTRACEINFO3("Unknown data type (%s, %s)\n", call->callType,
+ OOTRACEINFO3("Unknown data type (%s, %s)\n", call->callType,
call->callToken);
}
return NULL;
@@ -2584,15 +2584,15 @@ int ooRemoveCapFromCapPrefs(OOH323CallData *call, int cap)
memcpy(&oldPrefs, capPrefs, sizeof(OOCapPrefs));
memset(capPrefs, 0, sizeof(OOCapPrefs));
for(i=0; i<oldPrefs.index; i++)
- {
- if(oldPrefs.order[i] != cap)
+ {
+ if(oldPrefs.order[i] != cap)
capPrefs->order[j++] = oldPrefs.order[i];
}
capPrefs->index = j;
return OO_OK;
}
-
+
int ooAppendCapToCapPrefs(OOH323CallData *call, int cap)
{
OOCapPrefs *capPrefs=NULL;
@@ -2629,7 +2629,7 @@ int ooChangeCapPrefOrder(OOH323CallData *call, int cap, int pos)
/* Decrease Pref order */
if(i < pos)
{
- for( ; i<pos; i++)
+ for( ; i<pos; i++)
capPrefs->order[i] = capPrefs->order[i+1];
capPrefs->order[i]=cap;
return OO_OK;
@@ -2658,12 +2658,12 @@ int ooPreppendCapToCapPrefs(OOH323CallData *call, int cap)
memcpy(&oldPrefs, capPrefs, sizeof(OOCapPrefs));
-
+
capPrefs->order[j++] = cap;
for(i=0; i<oldPrefs.index; i++)
- {
- if(oldPrefs.order[i] != cap)
+ {
+ if(oldPrefs.order[i] != cap)
capPrefs->order[j++] = oldPrefs.order[i];
}
capPrefs->index = j;
@@ -2675,35 +2675,35 @@ int ooAddRemoteCapability(OOH323CallData *call, H245Capability *cap)
switch(cap->t)
{
case T_H245Capability_receiveAudioCapability:
- return ooAddRemoteAudioCapability(call, cap->u.receiveAudioCapability,
+ return ooAddRemoteAudioCapability(call, cap->u.receiveAudioCapability,
OORX);
case T_H245Capability_transmitAudioCapability:
- return ooAddRemoteAudioCapability(call, cap->u.transmitAudioCapability,
+ return ooAddRemoteAudioCapability(call, cap->u.transmitAudioCapability,
OOTX);
case T_H245Capability_receiveAndTransmitAudioCapability:
- return ooAddRemoteAudioCapability(call,
+ return ooAddRemoteAudioCapability(call,
cap->u.receiveAndTransmitAudioCapability, OORXTX);
case T_H245Capability_receiveDataApplicationCapability:
- return ooAddRemoteDataApplicationCapability(call, cap->u.receiveDataApplicationCapability,
+ return ooAddRemoteDataApplicationCapability(call, cap->u.receiveDataApplicationCapability,
OORX);
case T_H245Capability_transmitDataApplicationCapability:
- return ooAddRemoteDataApplicationCapability(call, cap->u.transmitDataApplicationCapability,
+ return ooAddRemoteDataApplicationCapability(call, cap->u.transmitDataApplicationCapability,
OOTX);
case T_H245Capability_receiveAndTransmitDataApplicationCapability:
- return ooAddRemoteDataApplicationCapability(call,
+ return ooAddRemoteDataApplicationCapability(call,
cap->u.receiveAndTransmitDataApplicationCapability, OORXTX);
default:
- OOTRACEDBGA3("Unsupported cap type encountered. Ignoring. (%s, %s)\n",
+ OOTRACEDBGA3("Unsupported cap type encountered. Ignoring. (%s, %s)\n",
call->callType, call->callToken);
}
return OO_OK;
}
-int ooAddRemoteDataApplicationCapability(OOH323CallData *call,
+int ooAddRemoteDataApplicationCapability(OOH323CallData *call,
H245DataApplicationCapability *dataCap,
int dir)
{
@@ -2720,177 +2720,177 @@ int ooAddRemoteDataApplicationCapability(OOH323CallData *call,
dir, NULL, NULL, NULL, NULL,TRUE);
default:
OOTRACEDBGA1("Unsupported data capability type\n");
-
+
}
return OO_OK;
}
-int ooAddRemoteAudioCapability(OOH323CallData *call,
+int ooAddRemoteAudioCapability(OOH323CallData *call,
H245AudioCapability *audioCap,
int dir)
{
int rxframes=0, txframes=0;
-
+
switch(audioCap->t)
{
case T_H245AudioCapability_g711Alaw64k:
if(dir&OOTX) txframes = audioCap->u.g711Alaw64k;
else if(dir&OORX) rxframes = audioCap->u.g711Alaw64k;
- else{
- txframes = audioCap->u.g711Alaw64k;
- rxframes = audioCap->u.g711Alaw64k;
+ else{
+ txframes = audioCap->u.g711Alaw64k;
+ rxframes = audioCap->u.g711Alaw64k;
}
- return ooCapabilityAddSimpleCapability(call, OO_G711ALAW64K, txframes,
+ return ooCapabilityAddSimpleCapability(call, OO_G711ALAW64K, txframes,
rxframes, FALSE, dir, NULL, NULL, NULL, NULL,TRUE);
case T_H245AudioCapability_g711Alaw56k:
if(dir&OOTX) txframes = audioCap->u.g711Alaw56k;
else if(dir&OORX) rxframes = audioCap->u.g711Alaw56k;
- else{
- txframes = audioCap->u.g711Alaw56k;
- rxframes = audioCap->u.g711Alaw56k;
+ else{
+ txframes = audioCap->u.g711Alaw56k;
+ rxframes = audioCap->u.g711Alaw56k;
}
- return ooCapabilityAddSimpleCapability(call, OO_G711ALAW56K, txframes,
+ return ooCapabilityAddSimpleCapability(call, OO_G711ALAW56K, txframes,
rxframes, FALSE, dir, NULL, NULL, NULL, NULL, TRUE);
case T_H245AudioCapability_g711Ulaw64k:
if(dir&OOTX) txframes = audioCap->u.g711Ulaw64k;
else if(dir&OORX) rxframes = audioCap->u.g711Ulaw64k;
- else{
- txframes = audioCap->u.g711Ulaw64k;
- rxframes = audioCap->u.g711Ulaw64k;
+ else{
+ txframes = audioCap->u.g711Ulaw64k;
+ rxframes = audioCap->u.g711Ulaw64k;
}
- return ooCapabilityAddSimpleCapability(call, OO_G711ULAW64K, txframes,
+ return ooCapabilityAddSimpleCapability(call, OO_G711ULAW64K, txframes,
rxframes, FALSE, dir, NULL, NULL, NULL, NULL, TRUE);
case T_H245AudioCapability_g711Ulaw56k:
if(dir&OOTX) txframes = audioCap->u.g711Ulaw56k;
else if(dir&OORX) rxframes = audioCap->u.g711Ulaw56k;
- else{
- txframes = audioCap->u.g711Ulaw56k;
- rxframes = audioCap->u.g711Ulaw56k;
+ else{
+ txframes = audioCap->u.g711Ulaw56k;
+ rxframes = audioCap->u.g711Ulaw56k;
}
- return ooCapabilityAddSimpleCapability(call, OO_G711ULAW56K, txframes,
+ return ooCapabilityAddSimpleCapability(call, OO_G711ULAW56K, txframes,
rxframes, FALSE, dir, NULL, NULL, NULL, NULL, TRUE);
/* case T_H245AudioCapability_g726:
if(dir&OOTX) txframes = audioCap->u.g726;
else if(dir&OORX) rxframes = audioCap->u.g726;
- else{
- txframes = audioCap->u.g726;
- rxframes = audioCap->u.g726;
+ else{
+ txframes = audioCap->u.g726;
+ rxframes = audioCap->u.g726;
}
- return ooCapabilityAddSimpleCapability(call, OO_G726, txframes,
+ return ooCapabilityAddSimpleCapability(call, OO_G726, txframes,
rxframes, FALSE, dir, NULL, NULL, NULL, NULL, TRUE);
*/
case T_H245AudioCapability_nonStandard:
- if (audioCap->u.nonStandard &&
- audioCap->u.nonStandard->nonStandardIdentifier.t ==
+ if (audioCap->u.nonStandard &&
+ audioCap->u.nonStandard->nonStandardIdentifier.t ==
T_H245NonStandardIdentifier_h221NonStandard &&
audioCap->u.nonStandard->data.numocts == sizeof("G.726-32k")-1 &&
- !strncmp((char *)audioCap->u.nonStandard->data.data, "G.726-32k",
+ !strncmp((char *)audioCap->u.nonStandard->data.data, "G.726-32k",
audioCap->u.nonStandard->data.numocts))
- return ooCapabilityAddSimpleCapability(call, OO_G726, 20,
+ return ooCapabilityAddSimpleCapability(call, OO_G726, 20,
240, FALSE, dir, NULL, NULL, NULL, NULL, TRUE);
- if (audioCap->u.nonStandard &&
- audioCap->u.nonStandard->nonStandardIdentifier.t ==
+ if (audioCap->u.nonStandard &&
+ audioCap->u.nonStandard->nonStandardIdentifier.t ==
T_H245NonStandardIdentifier_h221NonStandard &&
audioCap->u.nonStandard->data.numocts == sizeof("G726r32")-1 &&
- !strncmp((char *)audioCap->u.nonStandard->data.data, "G726r32",
+ !strncmp((char *)audioCap->u.nonStandard->data.data, "G726r32",
audioCap->u.nonStandard->data.numocts))
- return ooCapabilityAddSimpleCapability(call, OO_G726AAL2, 20,
+ return ooCapabilityAddSimpleCapability(call, OO_G726AAL2, 20,
240, FALSE, dir, NULL, NULL, NULL, NULL, TRUE);
- if (audioCap->u.nonStandard &&
- audioCap->u.nonStandard->nonStandardIdentifier.t ==
+ if (audioCap->u.nonStandard &&
+ audioCap->u.nonStandard->nonStandardIdentifier.t ==
T_H245NonStandardIdentifier_h221NonStandard &&
audioCap->u.nonStandard->data.numocts == sizeof("AMRNB")-1 &&
- !strncmp((char *)audioCap->u.nonStandard->data.data, "AMRNB",
+ !strncmp((char *)audioCap->u.nonStandard->data.data, "AMRNB",
audioCap->u.nonStandard->data.numocts))
- return ooCapabilityAddSimpleCapability(call, OO_AMRNB, 4,
+ return ooCapabilityAddSimpleCapability(call, OO_AMRNB, 4,
4, FALSE, dir, NULL, NULL, NULL, NULL, TRUE);
- if (audioCap->u.nonStandard &&
- audioCap->u.nonStandard->nonStandardIdentifier.t ==
+ if (audioCap->u.nonStandard &&
+ audioCap->u.nonStandard->nonStandardIdentifier.t ==
T_H245NonStandardIdentifier_h221NonStandard &&
audioCap->u.nonStandard->data.numocts == sizeof("Speex")-1 &&
- !strncmp((char *)audioCap->u.nonStandard->data.data, "Speex",
+ !strncmp((char *)audioCap->u.nonStandard->data.data, "Speex",
audioCap->u.nonStandard->data.numocts))
- return ooCapabilityAddSimpleCapability(call, OO_SPEEX, 4,
+ return ooCapabilityAddSimpleCapability(call, OO_SPEEX, 4,
4, FALSE, dir, NULL, NULL, NULL, NULL, TRUE);
break;
case T_H245AudioCapability_g728:
if(dir&OOTX) txframes = audioCap->u.g728;
else if(dir&OORX) rxframes = audioCap->u.g728;
- else{
- txframes = audioCap->u.g728;
- rxframes = audioCap->u.g728;
+ else{
+ txframes = audioCap->u.g728;
+ rxframes = audioCap->u.g728;
}
- return ooCapabilityAddSimpleCapability(call, OO_G728, txframes,
+ return ooCapabilityAddSimpleCapability(call, OO_G728, txframes,
rxframes, FALSE, dir, NULL, NULL, NULL, NULL, TRUE);
case T_H245AudioCapability_g729:
if(dir&OOTX) txframes = audioCap->u.g729;
else if(dir&OORX) rxframes = audioCap->u.g729;
- else{
- txframes = audioCap->u.g729;
- rxframes = audioCap->u.g729;
+ else{
+ txframes = audioCap->u.g729;
+ rxframes = audioCap->u.g729;
}
- return ooCapabilityAddSimpleCapability(call, OO_G729, txframes,
+ return ooCapabilityAddSimpleCapability(call, OO_G729, txframes,
rxframes, FALSE, dir, NULL, NULL, NULL, NULL, TRUE);
case T_H245AudioCapability_g729AnnexA:
if(dir&OOTX) txframes = audioCap->u.g729AnnexA;
else if(dir&OORX) rxframes = audioCap->u.g729AnnexA;
- else{
- txframes = audioCap->u.g729AnnexA;
- rxframes = audioCap->u.g729AnnexA;
+ else{
+ txframes = audioCap->u.g729AnnexA;
+ rxframes = audioCap->u.g729AnnexA;
}
- return ooCapabilityAddSimpleCapability(call, OO_G729A, txframes,
+ return ooCapabilityAddSimpleCapability(call, OO_G729A, txframes,
rxframes, FALSE, dir, NULL, NULL, NULL, NULL, TRUE);
case T_H245AudioCapability_g729wAnnexB:
if(dir&OOTX) txframes = audioCap->u.g729wAnnexB;
else if(dir&OORX) rxframes = audioCap->u.g729wAnnexB;
- else{
- txframes = audioCap->u.g729wAnnexB;
- rxframes = audioCap->u.g729wAnnexB;
+ else{
+ txframes = audioCap->u.g729wAnnexB;
+ rxframes = audioCap->u.g729wAnnexB;
}
- return ooCapabilityAddSimpleCapability(call, OO_G729B, txframes,
+ return ooCapabilityAddSimpleCapability(call, OO_G729B, txframes,
rxframes, FALSE, dir, NULL, NULL, NULL, NULL, TRUE);
case T_H245AudioCapability_g7231:
if(dir&OOTX) txframes = audioCap->u.g7231->maxAl_sduAudioFrames;
else if(dir&OORX) rxframes = audioCap->u.g7231->maxAl_sduAudioFrames;
- else{
- txframes = audioCap->u.g7231->maxAl_sduAudioFrames;
- rxframes = audioCap->u.g7231->maxAl_sduAudioFrames;
+ else{
+ txframes = audioCap->u.g7231->maxAl_sduAudioFrames;
+ rxframes = audioCap->u.g7231->maxAl_sduAudioFrames;
}
return ooCapabilityAddSimpleCapability(call, OO_G7231, txframes,rxframes,
audioCap->u.g7231->silenceSuppression,
- dir, NULL, NULL, NULL, NULL, TRUE);
+ dir, NULL, NULL, NULL, NULL, TRUE);
case T_H245AudioCapability_gsmFullRate:
- return ooCapabilityAddGSMCapability(call, OO_GSMFULLRATE,
+ return ooCapabilityAddGSMCapability(call, OO_GSMFULLRATE,
(unsigned)(audioCap->u.gsmFullRate->audioUnitSize/OO_GSMFRAMESIZE),
audioCap->u.gsmFullRate->comfortNoise,
- audioCap->u.gsmFullRate->scrambled,
+ audioCap->u.gsmFullRate->scrambled,
dir, NULL, NULL, NULL, NULL, TRUE);
case T_H245AudioCapability_gsmHalfRate:
return ooCapabilityAddGSMCapability(call, OO_GSMHALFRATE,
(unsigned)(audioCap->u.gsmHalfRate->audioUnitSize/OO_GSMFRAMESIZE),
audioCap->u.gsmHalfRate->comfortNoise,
- audioCap->u.gsmHalfRate->scrambled,
+ audioCap->u.gsmHalfRate->scrambled,
dir, NULL, NULL, NULL, NULL, TRUE);
case T_H245AudioCapability_gsmEnhancedFullRate:
- return ooCapabilityAddGSMCapability(call, OO_GSMENHANCEDFULLRATE,
+ return ooCapabilityAddGSMCapability(call, OO_GSMENHANCEDFULLRATE,
(unsigned)(audioCap->u.gsmEnhancedFullRate->audioUnitSize/OO_GSMFRAMESIZE),
audioCap->u.gsmEnhancedFullRate->comfortNoise,
- audioCap->u.gsmEnhancedFullRate->scrambled,
+ audioCap->u.gsmEnhancedFullRate->scrambled,
dir, NULL, NULL, NULL, NULL, TRUE);
default:
OOTRACEDBGA1("Unsupported audio capability type\n");
-
+
}
return OO_OK;
@@ -2902,11 +2902,11 @@ int ooCapabilityUpdateJointCapabilities
ooH323EpCapability * epCap = NULL, *cur = NULL;
OOTRACEDBGC3("checking whether we need to add cap to joint capabilities"
"(%s, %s)\n", call->callType, call->callToken);
-
+
switch(cap->t)
{
case T_H245Capability_receiveAudioCapability:
- epCap= ooIsAudioDataTypeSupported(call, cap->u.receiveAudioCapability,
+ epCap= ooIsAudioDataTypeSupported(call, cap->u.receiveAudioCapability,
OOTX);
break;
case T_H245Capability_transmitAudioCapability:
@@ -2919,14 +2919,14 @@ int ooCapabilityUpdateJointCapabilities
epCap = ooIsAudioDataTypeSupported(call, cap->u.transmitAudioCapability, OORX);
break;
case T_H245Capability_receiveVideoCapability:
- return ooCapabilityUpdateJointCapabilitiesVideo(call,
+ return ooCapabilityUpdateJointCapabilitiesVideo(call,
cap->u.receiveVideoCapability, OOTX);
case T_H245Capability_transmitVideoCapability:
- return ooCapabilityUpdateJointCapabilitiesVideo(call,
+ return ooCapabilityUpdateJointCapabilitiesVideo(call,
cap->u.transmitVideoCapability, OORX);
case T_H245Capability_receiveDataApplicationCapability:
- epCap= ooIsT38Supported(call, cap->u.receiveDataApplicationCapability,
+ epCap= ooIsT38Supported(call, cap->u.receiveDataApplicationCapability,
OOTX);
break;
case T_H245Capability_transmitDataApplicationCapability:
@@ -2941,7 +2941,7 @@ int ooCapabilityUpdateJointCapabilities
case T_H245Capability_receiveAndTransmitUserInputCapability:
- if((cap->u.receiveAndTransmitUserInputCapability->t ==
+ if((cap->u.receiveAndTransmitUserInputCapability->t ==
T_H245UserInputCapability_basicString) &&
(call->dtmfmode & OO_CAP_DTMF_H245_alphanumeric))
{
@@ -2957,7 +2957,7 @@ int ooCapabilityUpdateJointCapabilities
}
case T_H245Capability_receiveUserInputCapability:
- if((cap->u.receiveUserInputCapability->t ==
+ if((cap->u.receiveUserInputCapability->t ==
T_H245UserInputCapability_basicString) &&
(call->dtmfmode & OO_CAP_DTMF_H245_alphanumeric))
{
@@ -2973,7 +2973,7 @@ int ooCapabilityUpdateJointCapabilities
}
//break;
default:
- OOTRACEDBGA3("Unsupported cap type encountered. Ignoring. (%s, %s)\n",
+ OOTRACEDBGA3("Unsupported cap type encountered. Ignoring. (%s, %s)\n",
call->callType, call->callToken);
}
@@ -3006,11 +3006,11 @@ int ooCapabilityUpdateJointCapabilitiesVideo
switch(videoCap->t)
{
case T_H245VideoCapability_h263VideoCapability:
- return ooCapabilityUpdateJointCapabilitiesVideoH263(call,
+ return ooCapabilityUpdateJointCapabilitiesVideoH263(call,
videoCap->u.h263VideoCapability, dir);
default:
OOTRACEDBGC3("ooCapabilityUpdateJointCapabilitiesVideo - Unsupported"
- "capability type. (%s, %s)\n", call->callType,
+ "capability type. (%s, %s)\n", call->callType,
call->callToken);
}
return OO_OK;
@@ -3023,7 +3023,7 @@ int ooCapabilityUpdateJointCapabilitiesVideoH263
ooH323EpCapability *epCap = NULL, *cur = NULL;
if(pH263Cap->m.sqcifMPIPresent)
{
- epCap = ooIsVideoDataTypeH263Supported(call, pH263Cap, dir,
+ epCap = ooIsVideoDataTypeH263Supported(call, pH263Cap, dir,
OO_PICFORMAT_SQCIF);
if(epCap)
{
@@ -3038,14 +3038,14 @@ int ooCapabilityUpdateJointCapabilitiesVideoH263
cur->next = epCap;
}
- }
+ }
}
epCap = NULL;
if(pH263Cap->m.qcifMPIPresent)
{
- epCap = ooIsVideoDataTypeH263Supported(call, pH263Cap, dir,
+ epCap = ooIsVideoDataTypeH263Supported(call, pH263Cap, dir,
OO_PICFORMAT_QCIF);
if(epCap)
{
@@ -3060,14 +3060,14 @@ int ooCapabilityUpdateJointCapabilitiesVideoH263
cur->next = epCap;
}
- }
+ }
}
epCap = NULL;
if(pH263Cap->m.cifMPIPresent)
{
- epCap = ooIsVideoDataTypeH263Supported(call, pH263Cap, dir,
+ epCap = ooIsVideoDataTypeH263Supported(call, pH263Cap, dir,
OO_PICFORMAT_CIF);
if(epCap)
{
@@ -3082,14 +3082,14 @@ int ooCapabilityUpdateJointCapabilitiesVideoH263
cur->next = epCap;
}
- }
+ }
}
epCap = NULL;
if(pH263Cap->m.cif4MPIPresent)
{
- epCap = ooIsVideoDataTypeH263Supported(call, pH263Cap, dir,
+ epCap = ooIsVideoDataTypeH263Supported(call, pH263Cap, dir,
OO_PICFORMAT_CIF4);
if(epCap)
{
@@ -3103,14 +3103,14 @@ int ooCapabilityUpdateJointCapabilitiesVideoH263
while(cur->next) cur = cur->next;
cur->next = epCap;
}
- }
+ }
}
epCap = NULL;
if(pH263Cap->m.cif16MPIPresent)
{
- epCap = ooIsVideoDataTypeH263Supported(call, pH263Cap, dir,
+ epCap = ooIsVideoDataTypeH263Supported(call, pH263Cap, dir,
OO_PICFORMAT_CIF16);
if(epCap)
{
@@ -3125,7 +3125,7 @@ int ooCapabilityUpdateJointCapabilitiesVideoH263
cur->next = epCap;
}
- }
+ }
}
return OO_OK;
diff --git a/addons/ooh323c/src/ooCapability.h b/addons/ooh323c/src/ooCapability.h
index 4e108cfd8..ce9cc392f 100644
--- a/addons/ooh323c/src/ooCapability.h
+++ b/addons/ooh323c/src/ooCapability.h
@@ -1,21 +1,21 @@
/*
* 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.
*
*****************************************************************************/
/**
- * @file ooCapability.h
- * This file contains Capability management functions.
+ * @file ooCapability.h
+ * This file contains Capability management functions.
*/
#ifndef OO_CAPABILITY_H_
#define OO_CAPABILITY_H_
@@ -29,7 +29,7 @@
#define OOTX (1<<1)
#define OORXANDTX (1<<2)
#define OORXTX (1<<3) /* For symmetric capabilities */
-/* Various types of caps. Note that not all
+/* Various types of caps. Note that not all
supported */
typedef enum OOCapabilities{
OO_CAP_AUDIO_BASE = 0,
@@ -89,7 +89,7 @@ typedef enum OOCapabilities{
/**
* This structure defines the preference order for capabilities.
- *
+ *
*/
typedef struct OOCapPrefs {
int order[20];
@@ -99,11 +99,11 @@ typedef struct OOCapPrefs {
typedef struct OOCapParams {
int txframes; /*!< Number of frames per packet for transmission */
int rxframes; /*!< Number of frames per packet for reception */
- OOBOOL silenceSuppression;
+ OOBOOL silenceSuppression;
} OOCapParams;
typedef struct OOGSMCapParams {
- unsigned txframes;
+ unsigned txframes;
unsigned rxframes;
OOBOOL scrambled;
OOBOOL comfortNoise;
@@ -130,7 +130,7 @@ struct OOLogicalChannel;
extern "C" {
#endif
-/**
+/**
* This callback is used for starting media receive channel. This callback
* function is triggered when receive media channel has to be started.
* @param call Call for which receive media channel has to be started.
@@ -143,7 +143,7 @@ typedef int (*cb_StartReceiveChannel)
(struct OOH323CallData *call, struct OOLogicalChannel *pChannel);
-/**
+/**
* This callback is used for starting media transmit channel. This callback
* function is triggered when transmit media channel has to be started.
* @param call Call for which transmit media channel has to be started.
@@ -155,7 +155,7 @@ typedef int (*cb_StartReceiveChannel)
typedef int (*cb_StartTransmitChannel)
(struct OOH323CallData *call, struct OOLogicalChannel *pChannel);
-/**
+/**
* This callback is used for stopping media receive channel. This callback
* function is triggered when receive media channel has to be stopped.
* @param call Call for which receive media channel has to be stopped.
@@ -167,7 +167,7 @@ typedef int (*cb_StartTransmitChannel)
typedef int (*cb_StopReceiveChannel)
(struct OOH323CallData *call, struct OOLogicalChannel *pChannel);
-/**
+/**
* This callback is used for stopping media transmit channel. This callback
* function is triggered when transmit media channel has to be stopped.
* @param call Call for which transmit media channel has to be stopped.
@@ -190,7 +190,7 @@ typedef enum OOCapType {
* capability
*/
typedef struct ooH323EpCapability {
- int dir;
+ int dir;
int cap;
OOCapType capType;
void *params;
@@ -212,14 +212,14 @@ typedef struct ooH323EpCapability {
#endif /* MAKE_DLL */
#endif /* EXTERN */
-/**
+/**
* @defgroup capmgmt Capability Management
* @{
*/
/**
* This function is used to add rfc2833 based dtmf detection capability
- * @param call Call if enabling for call, else null for
+ * @param call Call if enabling for call, else null for
* endpoint.
* @param dynamicRTPPayloadType dynamicRTPPayloadType to be used.
* @return OO_OK, on success. OO_FAILED, on failure.
@@ -237,7 +237,7 @@ EXTERN int ooCapabilityDisableDTMFRFC2833(struct OOH323CallData *call);
/**
- * This function is used to enable support for H.245 based alphanumeric dtmf
+ * This function is used to enable support for H.245 based alphanumeric dtmf
* capability.
* @param call Handle to call, if enabling for the call, else NULL
* for end-point.
@@ -246,7 +246,7 @@ EXTERN int ooCapabilityDisableDTMFRFC2833(struct OOH323CallData *call);
EXTERN int ooCapabilityEnableDTMFH245Alphanumeric(struct OOH323CallData *call);
/**
- * This function is used to disable support for H.245 based alphanumeric dtmf
+ * This function is used to disable support for H.245 based alphanumeric dtmf
* capability.
* @param call Handle to call, if disabling for the call, else NULL
* for end-point.
@@ -256,7 +256,7 @@ EXTERN int ooCapabilityDisableDTMFH245Alphanumeric
(struct OOH323CallData *call);
/**
- * This function is used to enable support for H.245 based signal dtmf
+ * This function is used to enable support for H.245 based signal dtmf
* capability.
* @param call Handle to call, if enabling for the call, else NULL
* for end-point.
@@ -265,7 +265,7 @@ EXTERN int ooCapabilityDisableDTMFH245Alphanumeric
EXTERN int ooCapabilityEnableDTMFH245Signal(struct OOH323CallData *call);
/**
- * This function is used to disable support for H.245 based signal dtmf
+ * This function is used to disable support for H.245 based signal dtmf
* capability.
* @param call Handle to call, if disabling for the call, else NULL
* for end-point.
@@ -291,14 +291,14 @@ EXTERN int ooCapabilityDisableDTMFQ931Keypad(struct OOH323CallData *call);
/**
* This function is used to add simple capabilities which have only rxframes
- * and txframes parameters to the endpoint or call.(ex. G711, G728, G723.1,
+ * and txframes parameters to the endpoint or call.(ex. G711, G728, G723.1,
* G729)
- * @param call Handle to a call. If this is not Null, then
- * capability is added to call's remote enpoint
- * capability list, else it is added to local H323
+ * @param call Handle to a call. If this is not Null, then
+ * capability is added to call's remote enpoint
+ * capability list, else it is added to local H323
* endpoint list.
* @param cap Type of G711 capability to be added.
- * @param txframes Number of frames per packet for transmission.
+ * @param txframes Number of frames per packet for transmission.
* @param rxframes Number of frames per packet for reception.
* @param silenceSuppression Indicates support for silence suppression.
* Used only in case of g7231, otherwise ignored.
@@ -312,8 +312,8 @@ EXTERN int ooCapabilityDisableDTMFQ931Keypad(struct OOH323CallData *call);
* @return OO_OK, on success. OO_FAILED, on failure.
*/
EXTERN int ooCapabilityAddSimpleCapability
- (struct OOH323CallData *call, int cap, int txframes, int rxframes,
- OOBOOL silenceSuppression, int dir,
+ (struct OOH323CallData *call, int cap, int txframes, int rxframes,
+ OOBOOL silenceSuppression, int dir,
cb_StartReceiveChannel startReceiveChannel,
cb_StartTransmitChannel startTransmitChannel,
cb_StopReceiveChannel stopReceiveChannel,
@@ -325,13 +325,13 @@ EXTERN int ooCapabilityAddSimpleCapability
* This is an internal helper function which is used to add a GSM capability
* to local endpoints capability list or to remote endpoints capability list or
* to a call's capability list.
- * @param call Handle to a call. If this is not Null, then
- * capability is added to call's remote enpoint
- * capability list, else it is added to local H323
+ * @param call Handle to a call. If this is not Null, then
+ * capability is added to call's remote enpoint
+ * capability list, else it is added to local H323
* endpoint list.
* @param cap Type of GSM capability to be added.
- * @param framesPerPkt Number of GSM frames per packet.
- * @param comfortNoise Comfort noise spec for the capability.
+ * @param framesPerPkt Number of GSM frames per packet.
+ * @param comfortNoise Comfort noise spec for the capability.
* @param scrambled Scrambled enabled/disabled for the capability.
* @param dir Direction of capability.OORX, OOTX, OORXANDTX
* @param startReceiveChannel Callback function to start receive channel.
@@ -340,38 +340,38 @@ EXTERN int ooCapabilityAddSimpleCapability
* @param stopTransmitChannel Callback function to stop transmit channel.
* @param remote TRUE, if adding call's remote capabilities.
*
- * @return OO_OK, on success. OO_FAILED, on failure.
+ * @return OO_OK, on success. OO_FAILED, on failure.
*/
-int ooCapabilityAddGSMCapability(struct OOH323CallData *call, int cap,
+int ooCapabilityAddGSMCapability(struct OOH323CallData *call, int cap,
unsigned framesPerPkt, OOBOOL comfortNoise,
- OOBOOL scrambled, int dir,
+ OOBOOL scrambled, int dir,
cb_StartReceiveChannel startReceiveChannel,
cb_StartTransmitChannel startTransmitChannel,
cb_StopReceiveChannel stopReceiveChannel,
- cb_StopTransmitChannel stopTransmitChannel,
+ cb_StopTransmitChannel stopTransmitChannel,
OOBOOL remote);
/**
- * This function is used to add H263 video capability to local endpoints
- * capability list or to remote endpoints capability list or to a call's
+ * This function is used to add H263 video capability to local endpoints
+ * capability list or to remote endpoints capability list or to a call's
* capability list.
- * @param call Handle to a call. If this is not Null, then
- * capability is added to call's remote enpoint
- * capability list, else it is added to local H323
+ * @param call Handle to a call. If this is not Null, then
+ * capability is added to call's remote enpoint
+ * capability list, else it is added to local H323
* endpoint list.
- * @param sqcifMPI Minimum picture interval for encoding/decoding
+ * @param sqcifMPI Minimum picture interval for encoding/decoding
* of SQCIF pictures.
- * @param qcifMPI Minimum picture interval for encoding/decoding
+ * @param qcifMPI Minimum picture interval for encoding/decoding
* of QCIF pictures.
- * @param cifMPI Minimum picture interval for encoding/decoding
+ * @param cifMPI Minimum picture interval for encoding/decoding
* of CIF pictures.
- * @param cif4MPI Minimum picture interval for encoding/decoding
+ * @param cif4MPI Minimum picture interval for encoding/decoding
* of CIF4 pictures.
- * @param cif16MPI Minimum picture interval for encoding/decoding
+ * @param cif16MPI Minimum picture interval for encoding/decoding
* of CIF16 pictures.
* @param maxBitRate Maximum bit rate in units of 100 bits/s at
- * which a transmitter can transmit video or a
+ * which a transmitter can transmit video or a
* receiver can receive video.
* @param dir Direction of capability.OORX, OOTX, OORXANDTX
* @param startReceiveChannel Callback function to start receive channel.
@@ -380,37 +380,37 @@ int ooCapabilityAddGSMCapability(struct OOH323CallData *call, int cap,
* @param stopTransmitChannel Callback function to stop transmit channel.
* @param remote TRUE, if adding call's remote capabilities.
*
- * @return OO_OK, on success. OO_FAILED, on failure.
+ * @return OO_OK, on success. OO_FAILED, on failure.
*/
-EXTERN int ooCapabilityAddH263VideoCapability(struct OOH323CallData *call,
- unsigned sqcifMPI, unsigned qcifMPI,
- unsigned cifMPI, unsigned cif4MPI,
+EXTERN int ooCapabilityAddH263VideoCapability(struct OOH323CallData *call,
+ unsigned sqcifMPI, unsigned qcifMPI,
+ unsigned cifMPI, unsigned cif4MPI,
unsigned cif16MPI, unsigned maxBitRate, int dir,
cb_StartReceiveChannel startReceiveChannel,
cb_StartTransmitChannel startTransmitChannel,
cb_StopReceiveChannel stopReceiveChannel,
- cb_StopTransmitChannel stopTransmitChannel,
+ cb_StopTransmitChannel stopTransmitChannel,
OOBOOL remote);
/**
* This function is an helper function to ooCapabilityAddH263VideoCapability.
- * @param call Handle to a call. If this is not Null, then
- * capability is added to call's remote enpoint
- * capability list, else it is added to local H323
+ * @param call Handle to a call. If this is not Null, then
+ * capability is added to call's remote enpoint
+ * capability list, else it is added to local H323
* endpoint list.
- * @param sqcifMPI Minimum picture interval for encoding/decoding
+ * @param sqcifMPI Minimum picture interval for encoding/decoding
* of SQCIF pictures.
- * @param qcifMPI Minimum picture interval for encoding/decoding
+ * @param qcifMPI Minimum picture interval for encoding/decoding
* of QCIF pictures.
- * @param cifMPI Minimum picture interval for encoding/decoding
+ * @param cifMPI Minimum picture interval for encoding/decoding
* of CIF pictures.
- * @param cif4MPI Minimum picture interval for encoding/decoding
+ * @param cif4MPI Minimum picture interval for encoding/decoding
* of CIF4 pictures.
- * @param cif16MPI Minimum picture interval for encoding/decoding
+ * @param cif16MPI Minimum picture interval for encoding/decoding
* of CIF16 pictures.
* @param maxBitRate Maximum bit rate in units of 100 bits/s at
- * which a transmitter can transmit video or a
+ * which a transmitter can transmit video or a
* receiver can receive video.
* @param dir Direction of capability.OORX, OOTX, OORXANDTX
* @param startReceiveChannel Callback function to start receive channel.
@@ -419,24 +419,24 @@ EXTERN int ooCapabilityAddH263VideoCapability(struct OOH323CallData *call,
* @param stopTransmitChannel Callback function to stop transmit channel.
* @param remote TRUE, if adding call's remote capabilities.
*
- * @return OO_OK, on success. OO_FAILED, on failure.
+ * @return OO_OK, on success. OO_FAILED, on failure.
*/
-int ooCapabilityAddH263VideoCapability_helper(struct OOH323CallData *call,
- unsigned sqcifMPI, unsigned qcifMPI,
- unsigned cifMPI, unsigned cif4MPI,
- unsigned cif16MPI, unsigned maxBitRate, int dir,
+int ooCapabilityAddH263VideoCapability_helper(struct OOH323CallData *call,
+ unsigned sqcifMPI, unsigned qcifMPI,
+ unsigned cifMPI, unsigned cif4MPI,
+ unsigned cif16MPI, unsigned maxBitRate, int dir,
cb_StartReceiveChannel startReceiveChannel,
cb_StartTransmitChannel startTransmitChannel,
cb_StopReceiveChannel stopReceiveChannel,
- cb_StopTransmitChannel stopTransmitChannel,
+ cb_StopTransmitChannel stopTransmitChannel,
OOBOOL remote);
/**
- * This function is used to add a audio capability to calls remote
+ * This function is used to add a audio capability to calls remote
* capability list.
* @param call Handle to the call.
* @param audioCap Handle to the remote endpoint's audio capability.
- * @param dir Direction in which capability is supported by
+ * @param dir Direction in which capability is supported by
* remote endpoint.
*
* @return OO_OK, on success. OO_FAILED, otherwise.
@@ -458,12 +458,12 @@ int ooAddRemoteCapability(struct OOH323CallData *call, H245Capability *cap);
/**
* This function is used to update joint capabilities for call. It checks
* whether remote capability can be supported by local capabilities for the
- * call and if supported makes entry into the joint capability list for the
+ * call and if supported makes entry into the joint capability list for the
* call.
* @param call Handle to the call
* @param cap Remote cap which will be tested for compatibility.
*
- * @return returns OO_OK, if updated else OO_FAILED;
+ * @return returns OO_OK, if updated else OO_FAILED;
*/
EXTERN int ooCapabilityUpdateJointCapabilities
(struct OOH323CallData* call, H245Capability *cap);
@@ -472,50 +472,50 @@ EXTERN int ooCapabilityUpdateJointCapabilities
/**
* This function is used to update joint video capabilities for call. It checks
* whether remote capability can be supported by local capabilities for the
- * call and if supported makes entry into the joint capability list for the
+ * call and if supported makes entry into the joint capability list for the
* call.
* @param call Handle to the call
- * @param videoCap Remote video capability which will be tested for
+ * @param videoCap Remote video capability which will be tested for
* compatibility.
* @param dir Direction of the capability
*
- * @return returns OO_OK, if updated else OO_FAILED;
+ * @return returns OO_OK, if updated else OO_FAILED;
*/
EXTERN int ooCapabilityUpdateJointCapabilitiesVideo
(struct OOH323CallData *call, H245VideoCapability *videoCap, int dir);
/**
- * This function is used to update joint video H263 capabilities for call. It
- * checks whether remote capability can be supported by local capabilities for
+ * This function is used to update joint video H263 capabilities for call. It
+ * checks whether remote capability can be supported by local capabilities for
* the call and if supported makes entry into the joint capability list for the
* call.
* @param call Handle to the call
- * @param pH263Cap Remote H263 video capability which will be tested for
+ * @param pH263Cap Remote H263 video capability which will be tested for
* compatibility.
* @param dir Direction of the H263 capability
*
- * @return returns OO_OK, if updated else OO_FAILED;
+ * @return returns OO_OK, if updated else OO_FAILED;
*/
EXTERN int ooCapabilityUpdateJointCapabilitiesVideoH263
(struct OOH323CallData *call, H245H263VideoCapability *pH263Cap, int dir);
/**
- * This function is used to test whether the endpoint capability in the
+ * This function is used to test whether the endpoint capability in the
* specified direction can be supported by the audio capability.
* @param call Handle to the call.
* @param epCap Endpoint capability.
- * @param dataType Data type with which compatibility has to
+ * @param dataType Data type with which compatibility has to
* be tested.
* @param dir Direction indicating whether endpoint capability
* will be used for transmission or reception.
*
- * @return TRUE, if compatible. FALSE, otherwise.
+ * @return TRUE, if compatible. FALSE, otherwise.
*/
-ASN1BOOL ooCapabilityCheckCompatibility(struct OOH323CallData *call,
- ooH323EpCapability *epCap,
+ASN1BOOL ooCapabilityCheckCompatibility(struct OOH323CallData *call,
+ ooH323EpCapability *epCap,
H245DataType *dataType, int dir);
@@ -523,27 +523,27 @@ ASN1BOOL ooCapabilityCheckCompatibility(struct OOH323CallData *call,
* This function is used to create a audio capability structure using the
* capability type.
* @param epCap Capability.
- * @param pctxt Handle to OOCTXT which will be used to allocate memory
+ * @param pctxt Handle to OOCTXT which will be used to allocate memory
* for new audio capability.
- * @param dir Direction in which the newly created capability will be
+ * @param dir Direction in which the newly created capability will be
* used.
*
- * @return Newly created audio capability on success, NULL on
+ * @return Newly created audio capability on success, NULL on
* failure.
*/
-struct H245AudioCapability* ooCapabilityCreateAudioCapability
+struct H245AudioCapability* ooCapabilityCreateAudioCapability
(ooH323EpCapability* epCap, OOCTXT *pctxt, int dir);
/**
* This function is used to create a video capability structure using the
* capability type.
* @param epCap Capability.
- * @param pctxt Handle to OOCTXT which will be used to allocate memory
+ * @param pctxt Handle to OOCTXT which will be used to allocate memory
* for new video capability.
- * @param dir Direction in which the newly created capability will be
+ * @param dir Direction in which the newly created capability will be
* used.
*
- * @return Newly created video capability on success, NULL on
+ * @return Newly created video capability on success, NULL on
* failure.
*/
struct H245VideoCapability* ooCapabilityCreateVideoCapability
@@ -554,7 +554,7 @@ struct H245VideoCapability* ooCapabilityCreateVideoCapability
* This function is used to create a dtmf capability which can be added to
* a TCS message.
* @param cap Type of dtmf capability to be created.
- * @param pctxt Pointer to OOCTXT structure to be used for memory
+ * @param pctxt Pointer to OOCTXT structure to be used for memory
* allocation.
*
* @return Pointer to the created DTMF capability, NULL in case of
@@ -570,23 +570,23 @@ void * ooCapabilityCreateDTMFCapability(int cap, int dtmfcodec, OOCTXT *pctxt);
* for new audio capability.
* @param dir Direction for the newly created capability.
*
- * @return Newly created audio capability on success, NULL on
+ * @return Newly created audio capability on success, NULL on
* failure.
*/
struct H245AudioCapability* ooCapabilityCreateGSMFullRateCapability
(ooH323EpCapability *epCap, OOCTXT* pctxt, int dir);
/**
- * This function is used to create a simple(g711, g728, g723.1, g729) audio
+ * This function is used to create a simple(g711, g728, g723.1, g729) audio
* capability structure.
*
* @param epCap Handle to the endpoint capability
- * @param pctxt Handle to OOCTXT which will be used to allocate memory
+ * @param pctxt Handle to OOCTXT which will be used to allocate memory
* for new audio capability.
- * @param dir Direction in which the newly created capability will be
+ * @param dir Direction in which the newly created capability will be
* used.
*
- * @return Newly created audio capability on success, NULL on
+ * @return Newly created audio capability on success, NULL on
* failure.
*/
struct H245AudioCapability* ooCapabilityCreateSimpleCapability
@@ -596,15 +596,15 @@ struct H245AudioCapability* ooCapabilityCreateNonStandardCapability
/**
- * This function is used to create a H263 video capability
+ * This function is used to create a H263 video capability
* structure.
* @param epCap Handle to the endpoint capability
- * @param pctxt Handle to OOCTXT which will be used to allocate memory
+ * @param pctxt Handle to OOCTXT which will be used to allocate memory
* for new video capability.
- * @param dir Direction in which the newly created capability will be
+ * @param dir Direction in which the newly created capability will be
* used.
*
- * @return Newly created video capability on success, NULL on
+ * @return Newly created video capability on success, NULL on
* failure.
*/
struct H245VideoCapability* ooCapabilityCreateH263VideoCapability
@@ -616,9 +616,9 @@ struct H245VideoCapability* ooCapabilityCreateH263VideoCapability
* can be supported by the endpoint.
* @param call Handle to the call.
* @param audioCap Handle to the audio capability.
- * @param dir Direction in which support is desired.
+ * @param dir Direction in which support is desired.
*
- * @return Handle to the copyof capability which supports audioCap,
+ * @return Handle to the copyof capability which supports audioCap,
* Null if none found
*/
ooH323EpCapability* ooIsAudioDataTypeSupported
@@ -629,9 +629,9 @@ ooH323EpCapability* ooIsAudioDataTypeSupported
* can be supported by the endpoint.
* @param call Handle to the call.
* @param pVideoCap Handle to the video capability.
- * @param dir Direction in which support is desired.
+ * @param dir Direction in which support is desired.
*
- * @return Handle to the copy of capability which supports video
+ * @return Handle to the copy of capability which supports video
* capability, Null if none found
*/
ooH323EpCapability* ooIsVideoDataTypeSupported
@@ -642,14 +642,14 @@ ooH323EpCapability* ooIsVideoDataTypeSupported
* can be supported by the endpoint.
* @param call Handle to the call.
* @param pH263Cap Handle to the H263 video capability.
- * @param dir Direction in which support is desired.
+ * @param dir Direction in which support is desired.
* @param picFormat Picture type(cif, qcif etc.)
*
- * @return Handle to the copy of capability which supports H263
+ * @return Handle to the copy of capability which supports H263
* capability, Null if none found
*/
ooH323EpCapability* ooIsVideoDataTypeH263Supported
- (struct OOH323CallData *call, H245H263VideoCapability* pH263Cap, int dir,
+ (struct OOH323CallData *call, H245H263VideoCapability* pH263Cap, int dir,
OOPictureFormat picFormat);
/**
@@ -657,9 +657,9 @@ ooH323EpCapability* ooIsVideoDataTypeH263Supported
* can be supported by the endpoint.
* @param call Handle to the call.
* @param data Handle to the capability type.
- * @param dir Direction in which support is desired.
+ * @param dir Direction in which support is desired.
*
- * @return Handle to the copy of capability which supports specified
+ * @return Handle to the copy of capability which supports specified
* capability type, Null if none found
*/
ooH323EpCapability* ooIsDataTypeSupported
@@ -705,7 +705,7 @@ EXTERN int ooRemoveCapFromCapPrefs(struct OOH323CallData *call, int cap);
EXTERN int ooAppendCapToCapPrefs(struct OOH323CallData *call, int cap);
/**
- * This function is used to change preference order of a particular capability
+ * This function is used to change preference order of a particular capability
* in the preference list.
* @param call Handle to call, if call's preference list has to be modified
* else NULL, to modify endpoint's preference list.
@@ -786,13 +786,11 @@ int ooCapabilityAddT38Capability
/**/
-/**
- * @}
+/**
+ * @}
*/
#ifdef __cplusplus
}
#endif
#endif
-
-
diff --git a/addons/ooh323c/src/ooCmdChannel.c b/addons/ooh323c/src/ooCmdChannel.c
index 353818d1d..0cdb9dddf 100644
--- a/addons/ooh323c/src/ooCmdChannel.c
+++ b/addons/ooh323c/src/ooCmdChannel.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.
*
*****************************************************************************/
@@ -109,7 +109,7 @@ int ooWriteStackCommand(OOStackCommand *cmd)
return OO_FAILED;
}
ast_mutex_unlock(&gCmdChanLock);
-
+
return OO_OK;
}
int ooWriteCallStackCommand(OOH323CallData* call, OOStackCommand *cmd)
@@ -144,14 +144,14 @@ int ooWriteCallStackCommand(OOH323CallData* call, OOStackCommand *cmd)
return OO_FAILED;
}
ast_mutex_unlock(call->CmdChanLock);
-
+
return OO_OK;
}
int ooReadAndProcessStackCommand()
{
- OOH323CallData *pCall = NULL;
+ OOH323CallData *pCall = NULL;
unsigned char buffer[MAXMSGLEN];
int i, recvLen = 0;
OOStackCommand cmd;
@@ -174,10 +174,10 @@ int ooReadAndProcessStackCommand()
else {
switch(cmd.type) {
- case OO_CMD_MAKECALL:
- OOTRACEINFO2("Processing MakeCall command %s\n",
+ case OO_CMD_MAKECALL:
+ OOTRACEINFO2("Processing MakeCall command %s\n",
(char*)cmd.param2);
-
+
ooH323NewCall ((char*)cmd.param2);
break;
@@ -210,7 +210,7 @@ int ooReadAndProcessStackCommand()
}
}
break;
-
+
case OO_CMD_ANSCALL:
pCall = ooFindCallByToken((char*)cmd.param1);
if(!pCall) {
@@ -231,13 +231,13 @@ int ooReadAndProcessStackCommand()
ooH323ForwardCall((char*)cmd.param1, (char*)cmd.param2);
break;
- case OO_CMD_HANGCALL:
- OOTRACEINFO3("Processing Hang call command %s with q931 cause %d\n",
+ case OO_CMD_HANGCALL:
+ OOTRACEINFO3("Processing Hang call command %s with q931 cause %d\n",
(char*)cmd.param1, *(int *) cmd.param3);
- ooH323HangCall((char*)cmd.param1,
+ ooH323HangCall((char*)cmd.param1,
*(OOCallClearReason*)cmd.param2, *(int *) cmd.param3);
break;
-
+
case OO_CMD_SENDDIGIT:
pCall = ooFindCallByToken((char*)cmd.param1);
if(!pCall) {
@@ -259,7 +259,7 @@ int ooReadAndProcessStackCommand()
break;
- case OO_CMD_STOPMONITOR:
+ case OO_CMD_STOPMONITOR:
OOTRACEINFO1("Processing StopMonitor command\n");
ooStopMonitorCalls();
break;
@@ -303,7 +303,7 @@ int ooReadAndProcessCallStackCommand(OOH323CallData* call)
if (cmd.plen1 > 0) {
cmd.param1 = ast_malloc(cmd.plen1 + 1);
- if (!cmd.param1)
+ if (!cmd.param1)
return OO_FAILED;
memset(cmd.param1, 0, cmd.plen1 + 1);
memcpy(cmd.param1, bPoint, cmd.plen1);
@@ -312,7 +312,7 @@ int ooReadAndProcessCallStackCommand(OOH323CallData* call)
if (cmd.plen2 > 0) {
cmd.param2 = ast_malloc(cmd.plen2 + 1);
- if (!cmd.param2)
+ if (!cmd.param2)
return OO_FAILED;
memset(cmd.param2, 0, cmd.plen2 + 1);
memcpy(cmd.param2, bPoint, cmd.plen2);
@@ -321,7 +321,7 @@ int ooReadAndProcessCallStackCommand(OOH323CallData* call)
if (cmd.plen3 > 0) {
cmd.param3 = ast_malloc(cmd.plen3 + 1);
- if (!cmd.param3)
+ if (!cmd.param3)
return OO_FAILED;
memset(cmd.param3, 0, cmd.plen3 + 1);
memcpy(cmd.param3, bPoint, cmd.plen3);
@@ -333,11 +333,11 @@ int ooReadAndProcessCallStackCommand(OOH323CallData* call)
else {
switch(cmd.type) {
- case OO_CMD_MAKECALL:
- OOTRACEINFO2("Processing MakeCall command %s\n",
+ case OO_CMD_MAKECALL:
+ OOTRACEINFO2("Processing MakeCall command %s\n",
(char*)cmd.param2);
-
- ooH323MakeCall ((char*)cmd.param1, (char*)cmd.param2,
+
+ ooH323MakeCall ((char*)cmd.param1, (char*)cmd.param2,
(ooCallOptions*)cmd.param3);
break;
@@ -354,7 +354,7 @@ int ooReadAndProcessCallStackCommand(OOH323CallData* call)
}
}
break;
-
+
case OO_CMD_ANSCALL:
ooSendConnect(call);
break;
@@ -365,13 +365,13 @@ int ooReadAndProcessCallStackCommand(OOH323CallData* call)
ooH323ForwardCall((char*)cmd.param1, (char*)cmd.param2);
break;
- case OO_CMD_HANGCALL:
- OOTRACEINFO2("Processing Hang call command %s with q931 cause %d\n",
+ case OO_CMD_HANGCALL:
+ OOTRACEINFO2("Processing Hang call command %s with q931 cause %d\n",
(char*)cmd.param1);
- ooH323HangCall((char*)cmd.param1,
+ ooH323HangCall((char*)cmd.param1,
*(OOCallClearReason*)cmd.param2, *(int *) cmd.param3);
break;
-
+
case OO_CMD_SENDDIGIT:
if(call->jointDtmfMode & OO_CAP_DTMF_H245_alphanumeric) {
ooSendH245UserInputIndication_alphanumeric(
@@ -427,4 +427,3 @@ int ooReadAndProcessCallStackCommand(OOH323CallData* call)
return OO_OK;
}
-
diff --git a/addons/ooh323c/src/ooCmdChannel.h b/addons/ooh323c/src/ooCmdChannel.h
index b0767acc7..6627c9b4c 100644
--- a/addons/ooh323c/src/ooCmdChannel.h
+++ b/addons/ooh323c/src/ooCmdChannel.h
@@ -1,22 +1,22 @@
/*
* 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.
*
*****************************************************************************/
/**
- * @file ooCmdChannel.h
+ * @file ooCmdChannel.h
* This file contains stack commands which an user application can use to make
- * call, hang call etc.
+ * call, hang call etc.
*/
#ifndef OO_CMDCHANNEL_H
@@ -40,13 +40,13 @@ extern "C" {
#define OO_DEFAULT_CMDLISTENER_PORT 7575
/**
- * @addtogroup channels
+ * @addtogroup channels
* @{
*/
/**
- * This function is used to setup a command connection with the main stack
- * thread. The application commands are sent over this connection to stack
+ * This function is used to setup a command connection with the main stack
+ * thread. The application commands are sent over this connection to stack
* thread.
*
* @return OO_OK, on success; OO_FAILED, on failure
@@ -55,7 +55,7 @@ EXTERN int ooCreateCmdConnection(void);
EXTERN int ooCreateCallCmdConnection(OOH323CallData*);
/**
- * This function is used to close a command channel setup with the stack
+ * This function is used to close a command channel setup with the stack
* thread.
*
* @return OO_OK, on success; OO_FAILED, on failure
@@ -65,7 +65,7 @@ EXTERN int ooCloseCallCmdConnection(OOH323CallData*);
/**
- * This function is used by stack api to write stack commands to command
+ * This function is used by stack api to write stack commands to command
* channel.
*
* @return OO_OK, on success; OO_FAILED, on failure
@@ -74,7 +74,7 @@ EXTERN int ooWriteStackCommand(OOStackCommand *cmd);
EXTERN int ooWriteCallStackCommand(OOH323CallData* call, OOStackCommand *cmd);
/**
- * This function is used by stack thread to read and process stack commands
+ * This function is used by stack thread to read and process stack commands
* received over command channel.
*
* @return OO_OK, on success; OO_FAILED, on failure
@@ -83,8 +83,8 @@ EXTERN int ooReadAndProcessStackCommand(void);
EXTERN int ooReadAndProcessCallStackCommand(OOH323CallData*);
-/**
- * @}
+/**
+ * @}
*/
#ifdef __cplusplus
diff --git a/addons/ooh323c/src/ooCommon.h b/addons/ooh323c/src/ooCommon.h
index 91df7428f..e0d0b4338 100644
--- a/addons/ooh323c/src/ooCommon.h
+++ b/addons/ooh323c/src/ooCommon.h
@@ -1,20 +1,20 @@
/*
* 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 LICENSE.txt 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 LICENSE.txt 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.
*
*****************************************************************************/
-/**
- * @file ooCommon.h
+/**
+ * @file ooCommon.h
* Common runtime constant and type definitions.
*/
#ifndef _OOCOMMON_H_
@@ -43,7 +43,7 @@
#endif
#include <semaphore.h>
-/**
+/**
* @ingroup cruntime C Runtime Common Constant and Type Definitions.
* @{
*/
@@ -119,7 +119,7 @@ typedef struct _OOMsgBuf {
#endif /* _DLL */
#endif /* EXTERN */
-/**
- * @}
+/**
+ * @}
*/
#endif /* _OOCOMMON_H_ */
diff --git a/addons/ooh323c/src/ooDateTime.c b/addons/ooh323c/src/ooDateTime.c
index 0d7ee6811..7795b291e 100644
--- a/addons/ooh323c/src/ooDateTime.c
+++ b/addons/ooh323c/src/ooDateTime.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 LICENSE.txt 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 LICENSE.txt 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.
*
*****************************************************************************/
@@ -69,7 +69,7 @@ static uint64 calcEpocOffset() {
// Gets high resolution by spinning up to 15ms. Don't call this often!!!
static uint64 getRawCurMsSpin() {
- FILETIME tm;
+ FILETIME tm;
uint64 t_now;
static uint64 epocOffset = 0;
@@ -121,7 +121,7 @@ int gettimeofday(struct timeval* tv, void* null) {
baselineMs = getRawCurMsSpin();
tickBaseline = timeGetTime();
}
-
+
uint64 now_ms = (baselineMs + (curTicks - tickBaseline));
*tv = oo_ms_to_tv(now_ms);
return 0;
@@ -170,7 +170,6 @@ int ooGetTimeOfDay (struct timeval *tv, struct timezone *tz)
long ooGetTimeDiff(struct timeval *tv1, struct timeval *tv2)
{
- return ( ((tv2->tv_sec-tv1->tv_sec)*1000) +
+ return ( ((tv2->tv_sec-tv1->tv_sec)*1000) +
((tv2->tv_usec-tv1->tv_usec)/1000) );
}
-
diff --git a/addons/ooh323c/src/ooDateTime.h b/addons/ooh323c/src/ooDateTime.h
index b49c87230..9067d18c3 100644
--- a/addons/ooh323c/src/ooDateTime.h
+++ b/addons/ooh323c/src/ooDateTime.h
@@ -1,20 +1,20 @@
/*
* 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 LICENSE.txt 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 LICENSE.txt 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.
*
*****************************************************************************/
-/**
- * @file ooDateTime.h
+/**
+ * @file ooDateTime.h
* Time functions that reconcile differences between Windows and UNIX.
*/
#ifndef _OOTIME_H_
@@ -28,10 +28,10 @@ extern "C" {
#endif
/**
- * This function provides an abstraction for the UNIX 'gettimeofday'
+ * This function provides an abstraction for the UNIX 'gettimeofday'
* function which is not available on Windows.
*
- * @param tv Pointer to time value structure to receive
+ * @param tv Pointer to time value structure to receive
* current time value.
* @param tz Point to time zone information.
* @return Completion status of operation: 0 = success,
diff --git a/addons/ooh323c/src/ooGkClient.c b/addons/ooh323c/src/ooGkClient.c
index 1262f2914..a307f4eef 100644
--- a/addons/ooh323c/src/ooGkClient.c
+++ b/addons/ooh323c/src/ooGkClient.c
@@ -2,22 +2,22 @@
* Copyright (C) 2005 by Page Iberica, S.A.
* Copyright (C) 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.
*
*****************************************************************************/
/**
- * @file ooGkClient.c
- * This file contains functions to support RAS protocol.
+ * @file ooGkClient.c
+ * This file contains functions to support RAS protocol.
*
*/
#include "asterisk.h"
@@ -60,7 +60,7 @@ int ooGkClientInit(enum RasGatekeeperMode eGkMode,
OOTRACEERR1("Error: Failed to allocate memory to Gatekeeper Client.\n");
return OO_FAILED;
}
-
+
memset(pGkClient, 0, sizeof(ooGkClient));
ast_mutex_init(&pGkClient->Lock);
gH323ep.gkClient = pGkClient;
@@ -98,14 +98,14 @@ int ooGkClientInit(enum RasGatekeeperMode eGkMode,
return OO_FAILED;
}
}
-#endif
+#endif
if(OO_OK != ooGkClientSetGkMode(pGkClient, eGkMode, szGkAddr, iGkPort))
{
OOTRACEERR1("Error:Failed to set Gk mode\n");
memReset(&gH323ep.ctxt);
return OO_FAILED;
}
-
+
/* Create default parameter set */
pGkClient->grqTimeout = DEFAULT_GRQ_TIMEOUT;
pGkClient->rrqTimeout = DEFAULT_RRQ_TIMEOUT;
@@ -123,11 +123,11 @@ int ooGkClientInit(enum RasGatekeeperMode eGkMode,
int ooGkClientSetCallbacks
(ooGkClient *pGkClient, OOGKCLIENTCALLBACKS callbacks)
{
- pGkClient->callbacks.onReceivedRegistrationConfirm =
+ pGkClient->callbacks.onReceivedRegistrationConfirm =
callbacks.onReceivedRegistrationConfirm;
- pGkClient->callbacks.onReceivedUnregistrationConfirm =
+ pGkClient->callbacks.onReceivedUnregistrationConfirm =
callbacks.onReceivedUnregistrationConfirm;
- pGkClient->callbacks.onReceivedUnregistrationRequest =
+ pGkClient->callbacks.onReceivedUnregistrationRequest =
callbacks.onReceivedUnregistrationRequest;
return OO_OK;
}
@@ -143,7 +143,7 @@ int ooGkClientReInit(ooGkClient *pGkClient)
pGkClient->rrqRetries = 0;
pGkClient->grqRetries = 0;
pGkClient->requestSeqNum = 0;
-
+
dListFreeAll(&pGkClient->ctxt, &pGkClient->callsPendingList);
dListFreeAll(&pGkClient->ctxt, &pGkClient->callsAdmittedList);
dListFreeAll(&pGkClient->ctxt, &pGkClient->timerList);
@@ -157,7 +157,7 @@ void ooGkClientPrintConfig(ooGkClient *pGkClient)
if(pGkClient->gkMode == RasUseSpecificGatekeeper)
{
OOTRACEINFO1("\tGatekeeper mode - UseSpecificGatekeeper\n");
- OOTRACEINFO3("\tGatekeeper To Use - %s:%d\n", pGkClient->gkRasIP,
+ OOTRACEINFO3("\tGatekeeper To Use - %s:%d\n", pGkClient->gkRasIP,
pGkClient->gkRasPort);
}
else if(pGkClient->gkMode == RasDiscoverGatekeeper) {
@@ -203,7 +203,7 @@ int ooGkClientStart(ooGkClient *pGkClient)
OOTRACEERR1("Error: GkClient Channel Creation failed\n");
return OO_FAILED;
}
-
+
ast_mutex_lock(&pGkClient->Lock);
pGkClient->discoveryComplete = FALSE;
iRet = ooGkClientSendGRQ(pGkClient);
@@ -217,9 +217,9 @@ int ooGkClientStart(ooGkClient *pGkClient)
ast_mutex_unlock(&pGkClient->Lock);
return OO_OK;
}
-
-int ooGkClientSetGkMode(ooGkClient *pGkClient, enum RasGatekeeperMode eGkMode,
+
+int ooGkClientSetGkMode(ooGkClient *pGkClient, enum RasGatekeeperMode eGkMode,
char *szGkAddr, int iGkPort )
{
pGkClient->gkMode = eGkMode;
@@ -229,7 +229,7 @@ int ooGkClientSetGkMode(ooGkClient *pGkClient, enum RasGatekeeperMode eGkMode,
if(szGkAddr)
{
if(strlen(szGkAddr)>MAX_IP_LEN)
- {
+ {
OOTRACEERR2("Error:Invalid IP address specified - %s\n", szGkAddr);
return OO_FAILED;
}
@@ -240,7 +240,7 @@ int ooGkClientSetGkMode(ooGkClient *pGkClient, enum RasGatekeeperMode eGkMode,
else
pGkClient->gkRasPort = DEFAULT_GKPORT;
- OOTRACEINFO3("Gatekeeper IP:port set to - %s:%d\n",
+ OOTRACEINFO3("Gatekeeper IP:port set to - %s:%d\n",
szGkAddr, pGkClient->gkRasPort);
}
else if(eGkMode == RasDiscoverGatekeeper) {
@@ -253,7 +253,7 @@ int ooGkClientSetGkMode(ooGkClient *pGkClient, enum RasGatekeeperMode eGkMode,
return OO_OK;
}
-
+
/**
* Create the RAS channel (socket).
*
@@ -273,8 +273,8 @@ int ooGkClientCreateChannel(ooGkClient *pGkClient)
if(pGkClient->localRASPort)
{
inet_pton(AF_INET, pGkClient->localRASIP, &ipaddrs);
- if( (ret=ooSocketBind( pGkClient->rasSocket, ipaddrs,
- pGkClient->localRASPort))!=ASN_OK )
+ if( (ret=ooSocketBind( pGkClient->rasSocket, ipaddrs,
+ pGkClient->localRASPort))!=ASN_OK )
{
OOTRACEERR1("ERROR:Failed to create RAS channel\n");
pGkClient->state = GkClientFailed;
@@ -297,7 +297,7 @@ int ooGkClientCreateChannel(ooGkClient *pGkClient)
{
OOTRACEDBGA1("Determining ip address for RAS channel "
"multihomed mode. \n");
- ret = ooSocketGetIpAndPort(pGkClient->rasSocket, pGkClient->localRASIP,
+ ret = ooSocketGetIpAndPort(pGkClient->rasSocket, pGkClient->localRASIP,
20, &pGkClient->localRASPort, NULL);
if(ret != ASN_OK)
{
@@ -307,7 +307,7 @@ int ooGkClientCreateChannel(ooGkClient *pGkClient)
return OO_FAILED;
}
OOTRACEDBGA3("Using local ip %s and port %d for RAS channel"
- "(multihomedMode).\n", pGkClient->localRASIP,
+ "(multihomedMode).\n", pGkClient->localRASIP,
pGkClient->localRASPort);
}
/* End of Test code */
@@ -349,20 +349,20 @@ void ooGkClientFillVendor
if(gH323ep.productID)
{
pVendor->m.productIdPresent = TRUE;
- pVendor->productId.numocts = ASN1MIN(strlen(gH323ep.productID),
+ pVendor->productId.numocts = ASN1MIN(strlen(gH323ep.productID),
sizeof(pVendor->productId.data));
- memcpy(pVendor->productId.data, gH323ep.productID,
+ memcpy(pVendor->productId.data, gH323ep.productID,
pVendor->productId.numocts);
}
if(gH323ep.versionID)
{
pVendor->m.versionIdPresent = 1;
- pVendor->versionId.numocts = ASN1MIN(strlen(gH323ep.versionID),
+ pVendor->versionId.numocts = ASN1MIN(strlen(gH323ep.versionID),
sizeof(pVendor->versionId.data));
- memcpy(pVendor->versionId.data, gH323ep.versionID,
- pVendor->versionId.numocts);
+ memcpy(pVendor->versionId.data, gH323ep.versionID,
+ pVendor->versionId.numocts);
}
-}
+}
int ooGkClientReceive(ooGkClient *pGkClient)
@@ -374,7 +374,7 @@ int ooGkClientReceive(ooGkClient *pGkClient)
OOCTXT *pctxt=NULL;
H225RasMessage *pRasMsg=NULL;
int iRet=OO_OK;
-
+
ast_mutex_lock(&pGkClient->Lock);
pctxt = &pGkClient->msgCtxt;
@@ -387,7 +387,7 @@ int ooGkClientReceive(ooGkClient *pGkClient)
return OO_FAILED;
}
OOTRACEDBGA1("GkClient Received RAS Message\n");
-
+
/* Verify the gk */
if(pGkClient->discoveryComplete)
{
@@ -408,7 +408,7 @@ int ooGkClientReceive(ooGkClient *pGkClient)
pGkClient->state = GkClientFailed;
ast_mutex_unlock(&pGkClient->Lock);
return OO_FAILED;
- }
+ }
pRasMsg = (H225RasMessage*)memAlloc(pctxt, sizeof(H225RasMessage));
if(!pRasMsg)
{
@@ -460,40 +460,40 @@ int ooGkClientReceive(ooGkClient *pGkClient)
int ooGkClientHandleRASMessage(ooGkClient *pGkClient, H225RasMessage *pRasMsg)
{
- int iRet = OO_OK;
+ int iRet = OO_OK;
switch( pRasMsg->t)
{
case T_H225RasMessage_gatekeeperConfirm:
OOTRACEINFO1("Gatekeeper Confirmed (GCF) message received.\n");
- iRet = ooGkClientHandleGatekeeperConfirm(pGkClient,
+ iRet = ooGkClientHandleGatekeeperConfirm(pGkClient,
pRasMsg->u.gatekeeperConfirm);
break;
- case T_H225RasMessage_gatekeeperReject:
+ case T_H225RasMessage_gatekeeperReject:
OOTRACEINFO1("Gatekeeper Reject (GRJ) message received\n");
- iRet = ooGkClientHandleGatekeeperReject(pGkClient,
+ iRet = ooGkClientHandleGatekeeperReject(pGkClient,
pRasMsg->u.gatekeeperReject);
break;
- case T_H225RasMessage_registrationConfirm:
+ case T_H225RasMessage_registrationConfirm:
OOTRACEINFO1("Registration Confirm (RCF) message received\n");
- iRet = ooGkClientHandleRegistrationConfirm(pGkClient,
+ iRet = ooGkClientHandleRegistrationConfirm(pGkClient,
pRasMsg->u.registrationConfirm );
break;
case T_H225RasMessage_registrationReject:
OOTRACEINFO1("Registration Reject (RRJ) message received.\n");
- iRet = ooGkClientHandleRegistrationReject(pGkClient,
+ iRet = ooGkClientHandleRegistrationReject(pGkClient,
pRasMsg->u.registrationReject);
break;
- case T_H225RasMessage_infoRequest:
+ case T_H225RasMessage_infoRequest:
//ooRasSendIRR( psRasMsg->sMessage.u.infoRequest->requestSeqNum );
break;
case T_H225RasMessage_admissionConfirm:
OOTRACEINFO1("Admission Confirm (ACF) message received\n");
- iRet = ooGkClientHandleAdmissionConfirm(pGkClient,
+ iRet = ooGkClientHandleAdmissionConfirm(pGkClient,
pRasMsg->u.admissionConfirm);
break;
case T_H225RasMessage_unregistrationRequest:
OOTRACEINFO1("UnRegistration Request (URQ) message received.\n");
- iRet = ooGkClientHandleUnregistrationRequest(pGkClient,
+ iRet = ooGkClientHandleUnregistrationRequest(pGkClient,
pRasMsg->u.unregistrationRequest);
break;
case T_H225RasMessage_unregistrationConfirm:
@@ -504,11 +504,11 @@ int ooGkClientHandleRASMessage(ooGkClient *pGkClient, H225RasMessage *pRasMsg)
break;
case T_H225RasMessage_admissionReject:
OOTRACEINFO1("Admission Reject (ARJ) message received.\n");
- iRet = ooGkClientHandleAdmissionReject(pGkClient,
+ iRet = ooGkClientHandleAdmissionReject(pGkClient,
pRasMsg->u.admissionReject);
break;
case T_H225RasMessage_disengageConfirm:
- iRet = ooGkClientHandleDisengageConfirm(pGkClient,
+ iRet = ooGkClientHandleDisengageConfirm(pGkClient,
pRasMsg->u.disengageConfirm);
break;
case T_H225RasMessage_disengageReject:
@@ -542,7 +542,7 @@ void ooGkClientPrintMessage
{
OOCTXT ctxt;
H225RasMessage rasMsg;
- int ret;
+ int ret;
initContext(&ctxt);
setPERBuffer(&ctxt, msg, len, TRUE);
@@ -582,26 +582,26 @@ int ooGkClientSendMsg(ooGkClient *pGkClient, H225RasMessage *pRasMsg)
msgPtr = encodeGetMsgPtr( pctxt, &iLen );
/* If gatekeeper specified or have been discovered */
- if(pGkClient->gkMode == RasUseSpecificGatekeeper ||
+ if(pGkClient->gkMode == RasUseSpecificGatekeeper ||
pGkClient->discoveryComplete)
{
- if(ASN_OK != ooSocketSendTo( pGkClient->rasSocket, msgPtr, iLen,
+ if(ASN_OK != ooSocketSendTo( pGkClient->rasSocket, msgPtr, iLen,
pGkClient->gkRasIP, pGkClient->gkRasPort))
{
OOTRACEERR1("Error sending RAS message\n");
return OO_FAILED;
}
}
- else if(pGkClient->gkMode == RasDiscoverGatekeeper &&
- !pGkClient->discoveryComplete) {
- if(ASN_OK != ooSocketSendTo(pGkClient->rasSocket, msgPtr, iLen,
+ else if(pGkClient->gkMode == RasDiscoverGatekeeper &&
+ !pGkClient->discoveryComplete) {
+ if(ASN_OK != ooSocketSendTo(pGkClient->rasSocket, msgPtr, iLen,
MULTICAST_GKADDRESS, MULTICAST_GKPORT))
{
OOTRACEERR1("Error sending multicast RAS message\n" );
return OO_FAILED;
}
}
- else {/* should never go here */
+ else {/* should never go here */
OOTRACEERR1("Error: GkClient in invalid state.\n");
return OO_FAILED;
}
@@ -634,7 +634,7 @@ int ooGkClientSendGRQ(ooGkClient *pGkClient)
return OO_FAILED;
}
- pGkReq = (H225GatekeeperRequest*)memAlloc(pctxt,
+ pGkReq = (H225GatekeeperRequest*)memAlloc(pctxt,
sizeof(H225GatekeeperRequest));
if(!pGkReq)
{
@@ -656,7 +656,7 @@ int ooGkClientSendGRQ(ooGkClient *pGkClient)
pGkReq->protocolIdentifier = gProtocolID;
pGkReq->m.nonStandardDataPresent=0;
pGkReq->rasAddress.t=T_H225TransportAddress_ipAddress; /* IPv4 address */
- pRasAddress = (H225TransportAddress_ipAddress*)memAlloc(pctxt,
+ pRasAddress = (H225TransportAddress_ipAddress*)memAlloc(pctxt,
sizeof(H225TransportAddress_ipAddress));
if(!pRasAddress)
{
@@ -668,7 +668,7 @@ int ooGkClientSendGRQ(ooGkClient *pGkClient)
return OO_FAILED;
}
-
+
inet_pton(AF_INET, pGkClient->localRASIP, pRasAddress->ip.data);
pRasAddress->ip.numocts = 4;
@@ -688,7 +688,7 @@ int ooGkClientSendGRQ(ooGkClient *pGkClient)
pGkReq->m.endpointAliasPresent=TRUE;
- if(OO_OK != ooPopulateAliasList(&pGkClient->msgCtxt, gH323ep.aliases,
+ if(OO_OK != ooPopulateAliasList(&pGkClient->msgCtxt, gH323ep.aliases,
&pGkReq->endpointAlias, 0))
{
OOTRACEERR1("Error Failed to fill alias information for GRQ message\n");
@@ -718,9 +718,9 @@ int ooGkClientSendGRQ(ooGkClient *pGkClient)
}
cbData->timerType = OO_GRQ_TIMER;
cbData->pGkClient = pGkClient;
- if(!ooTimerCreate(&pGkClient->ctxt, &pGkClient->timerList,
- &ooGkClientGRQTimerExpired, pGkClient->grqTimeout,
- cbData, FALSE))
+ if(!ooTimerCreate(&pGkClient->ctxt, &pGkClient->timerList,
+ &ooGkClientGRQTimerExpired, pGkClient->grqTimeout,
+ cbData, FALSE))
{
OOTRACEERR1("Error:Unable to create GRQ timer.\n ");
memFreePtr(&pGkClient->ctxt, cbData);
@@ -754,7 +754,7 @@ int ooGkClientHandleGatekeeperReject
break;
}
}
-
+
pGkClient->state = GkClientGkErr;
switch(pGatekeeperReject->rejectReason.t)
{
@@ -809,7 +809,7 @@ int ooGkClientHandleGatekeeperConfirm
return OO_OK;
}
- if(pGatekeeperConfirm->m.gatekeeperIdentifierPresent)
+ if(pGatekeeperConfirm->m.gatekeeperIdentifierPresent)
{
pGkClient->gkId.nchars = pGatekeeperConfirm->gatekeeperIdentifier.nchars;
if (pGkClient->gkId.data) {
@@ -824,7 +824,7 @@ int ooGkClientHandleGatekeeperConfirm
return OO_FAILED;
}
- memcpy(pGkClient->gkId.data,
+ memcpy(pGkClient->gkId.data,
pGatekeeperConfirm->gatekeeperIdentifier.data,
sizeof(ASN116BITCHAR)* pGkClient->gkId.nchars);
}
@@ -833,7 +833,7 @@ int ooGkClientHandleGatekeeperConfirm
"message\n");
pGkClient->gkId.nchars = 0;
}
-
+
/* Extract Gatekeeper's RAS address */
if(pGatekeeperConfirm->rasAddress.t != T_H225TransportAddress_ipAddress)
{
@@ -845,10 +845,10 @@ int ooGkClientHandleGatekeeperConfirm
pRasAddress = pGatekeeperConfirm->rasAddress.u.ipAddress;
sprintf(pGkClient->gkRasIP, "%d.%d.%d.%d", pRasAddress->ip.data[0],
pRasAddress->ip.data[1],
- pRasAddress->ip.data[2],
+ pRasAddress->ip.data[2],
pRasAddress->ip.data[3]);
pGkClient->gkRasPort = pRasAddress->port;
-
+
pGkClient->discoveryComplete = TRUE;
pGkClient->state = GkClientDiscovered;
OOTRACEINFO1("Gatekeeper Confirmed\n");
@@ -905,7 +905,7 @@ int ooGkClientSendRRQ(ooGkClient *pGkClient, ASN1BOOL keepAlive)
return OO_FAILED;
}
- pRegReq = (H225RegistrationRequest*)memAlloc(pctxt,
+ pRegReq = (H225RegistrationRequest*)memAlloc(pctxt,
sizeof(H225RegistrationRequest));
if(!pRegReq)
{
@@ -918,11 +918,11 @@ int ooGkClientSendRRQ(ooGkClient *pGkClient, ASN1BOOL keepAlive)
memset(pRegReq, 0, sizeof(H225RegistrationRequest));
pRasMsg->t = T_H225RasMessage_registrationRequest;
pRasMsg->u.registrationRequest = pRegReq;
-
+
pRegReq->protocolIdentifier = gProtocolID;
pRegReq->m.nonStandardDataPresent=0;
/* Populate CallSignal Address List*/
- pTransportAddress = (H225TransportAddress*) memAlloc(pctxt,
+ pTransportAddress = (H225TransportAddress*) memAlloc(pctxt,
sizeof(H225TransportAddress));
pIpAddress = (H225TransportAddress_ipAddress*) memAlloc(pctxt,
sizeof(H225TransportAddress_ipAddress));
@@ -940,15 +940,15 @@ int ooGkClientSendRRQ(ooGkClient *pGkClient, ASN1BOOL keepAlive)
inet_pton(AF_INET, pGkClient->localRASIP, pIpAddress->ip.data);
pIpAddress->ip.numocts = 4;
pIpAddress->port = gH323ep.listenPort;
-
+
dListInit(&pRegReq->callSignalAddress);
- dListAppend(pctxt, &pRegReq->callSignalAddress,
+ dListAppend(pctxt, &pRegReq->callSignalAddress,
(void*)pTransportAddress);
/* Populate RAS Address List*/
pTransportAddress = NULL;
pIpAddress = NULL;
- pTransportAddress = (H225TransportAddress*) memAlloc(pctxt,
+ pTransportAddress = (H225TransportAddress*) memAlloc(pctxt,
sizeof(H225TransportAddress));
pIpAddress = (H225TransportAddress_ipAddress*) memAlloc(pctxt,
sizeof(H225TransportAddress_ipAddress));
@@ -964,16 +964,16 @@ int ooGkClientSendRRQ(ooGkClient *pGkClient, ASN1BOOL keepAlive)
pTransportAddress->t = T_H225TransportAddress_ipAddress;
pTransportAddress->u.ipAddress = pIpAddress;
-
+
inet_pton(AF_INET, pGkClient->localRASIP, pIpAddress->ip.data);
pIpAddress->ip.numocts = 4;
pIpAddress->port = pGkClient->localRASPort;
-
+
dListInit(&pRegReq->rasAddress);
- dListAppend(pctxt, &pRegReq->rasAddress,
+ dListAppend(pctxt, &pRegReq->rasAddress,
(void*)pTransportAddress);
-
+
/* Pose as gateway or terminal as per config */
if(gH323ep.isGateway)
pRegReq->terminalType.m.gatewayPresent = TRUE;
@@ -1005,23 +1005,23 @@ int ooGkClientSendRRQ(ooGkClient *pGkClient, ASN1BOOL keepAlive)
pProtocol->t = T_H225SupportedProtocols_voice;
pProtocol->u.voice = pVoiceCaps;
-
+
dListInit(&pRegReq->terminalType.gateway.protocol);
- dListAppend(pctxt, &pRegReq->terminalType.gateway.protocol,
+ dListAppend(pctxt, &pRegReq->terminalType.gateway.protocol,
(void*)pProtocol);
}
pRegReq->m.terminalAliasPresent=TRUE;
- if(OO_OK != ooPopulateAliasList(pctxt, gH323ep.aliases,
+ if(OO_OK != ooPopulateAliasList(pctxt, gH323ep.aliases,
&pRegReq->terminalAlias, 0)) {
OOTRACEERR1("Error filling alias for RRQ\n");
- memReset(pctxt);
+ memReset(pctxt);
pGkClient->state = GkClientFailed;
ast_mutex_unlock(&pGkClient->Lock);
return OO_FAILED;
}
-
+
if (pGkClient->gkId.nchars) {
pRegReq->m.gatekeeperIdentifierPresent=TRUE;
pRegReq->gatekeeperIdentifier.nchars = pGkClient->gkId.nchars;
@@ -1036,19 +1036,19 @@ int ooGkClientSendRRQ(ooGkClient *pGkClient, ASN1BOOL keepAlive)
ast_mutex_unlock(&pGkClient->Lock);
return OO_FAILED;
}
- memcpy(pRegReq->gatekeeperIdentifier.data, pGkClient->gkId.data,
+ memcpy(pRegReq->gatekeeperIdentifier.data, pGkClient->gkId.data,
pGkClient->gkId.nchars*sizeof(ASN116BITCHAR));
}
-
+
ooGkClientFillVendor(pGkClient, &pRegReq->endpointVendor);
-
+
pRegReq->m.willSupplyUUIEsPresent=TRUE;
pRegReq->willSupplyUUIEs=FALSE;
pRegReq->requestSeqNum = pGkClient->requestSeqNum++;
if(!pRegReq->requestSeqNum)
pRegReq->requestSeqNum = pGkClient->requestSeqNum++;
-
+
pRegReq->discoveryComplete= pGkClient->discoveryComplete;
pRegReq->m.keepAlivePresent=TRUE;
pRegReq->keepAlive= keepAlive;
@@ -1067,7 +1067,7 @@ int ooGkClientSendRRQ(ooGkClient *pGkClient, ASN1BOOL keepAlive)
/* KeepAlive, re-registration message...
allocate storage for endpoint-identifier, and populate it from what the
GK told us from the previous RCF. Only allocate on the first pass thru here */
- pRegReq->endpointIdentifier.data =
+ pRegReq->endpointIdentifier.data =
(ASN116BITCHAR*)memAlloc(pctxt, pGkClient->endpointId.nchars*sizeof(ASN116BITCHAR));
if (pRegReq->endpointIdentifier.data) {
pRegReq->endpointIdentifier.nchars = pGkClient->endpointId.nchars;
@@ -1109,9 +1109,9 @@ int ooGkClientSendRRQ(ooGkClient *pGkClient, ASN1BOOL keepAlive)
}
cbData->timerType = OO_RRQ_TIMER;
cbData->pGkClient = pGkClient;
- if(!ooTimerCreate(&pGkClient->ctxt, &pGkClient->timerList,
- &ooGkClientRRQTimerExpired, pGkClient->rrqTimeout,
- cbData, FALSE))
+ if(!ooTimerCreate(&pGkClient->ctxt, &pGkClient->timerList,
+ &ooGkClientRRQTimerExpired, pGkClient->rrqTimeout,
+ cbData, FALSE))
{
OOTRACEERR1("Error:Unable to create GRQ timer.\n ");
memFreePtr(&pGkClient->ctxt, cbData);
@@ -1119,7 +1119,7 @@ int ooGkClientSendRRQ(ooGkClient *pGkClient, ASN1BOOL keepAlive)
ast_mutex_unlock(&pGkClient->Lock);
return OO_FAILED;
}
-
+
ast_mutex_unlock(&pGkClient->Lock);
return OO_OK;
}
@@ -1143,7 +1143,7 @@ int ooGkClientHandleRegistrationConfirm
/* Extract Endpoint Id */
if (pGkClient->endpointId.data)
memFreePtr(&pGkClient->ctxt, pGkClient->endpointId.data);
- pGkClient->endpointId.nchars =
+ pGkClient->endpointId.nchars =
pRegistrationConfirm->endpointIdentifier.nchars;
pGkClient->endpointId.data = (ASN116BITCHAR*)memAlloc(&pGkClient->ctxt,
sizeof(ASN116BITCHAR)*pGkClient->endpointId.nchars);
@@ -1153,13 +1153,13 @@ int ooGkClientHandleRegistrationConfirm
pGkClient->state = GkClientFailed;
return OO_FAILED;
}
-
- memcpy(pGkClient->endpointId.data,
+
+ memcpy(pGkClient->endpointId.data,
pRegistrationConfirm->endpointIdentifier.data,
sizeof(ASN116BITCHAR)*pGkClient->endpointId.nchars);
/* Extract GK Identifier */
-
+
if(pRegistrationConfirm->m.gatekeeperIdentifierPresent && pGkClient->gkId.nchars == 0)
{
pGkClient->gkId.nchars = pRegistrationConfirm->gatekeeperIdentifier.nchars;
@@ -1172,7 +1172,7 @@ int ooGkClientHandleRegistrationConfirm
return OO_FAILED;
}
- memcpy(pGkClient->gkId.data,
+ memcpy(pGkClient->gkId.data,
pRegistrationConfirm->gatekeeperIdentifier.data,
sizeof(ASN116BITCHAR)* pGkClient->gkId.nchars);
}
@@ -1185,23 +1185,23 @@ int ooGkClientHandleRegistrationConfirm
{
OOTRACEERR1("Error:Invalid Registration confirmed message\n");
OOTRACEINFO1("Ignoring RCF, will retransmit RRQ after timeout\n");
- return OO_FAILED;
+ return OO_FAILED;
}
pCallSigAddr = (H225TransportAddress*)pNode->data;
if(pCallSigAddr->t != T_H225TransportAddress_ipAddress)
continue;
- sprintf(pGkClient->gkCallSignallingIP, "%d.%d.%d.%d",
+ sprintf(pGkClient->gkCallSignallingIP, "%d.%d.%d.%d",
pCallSigAddr->u.ipAddress->ip.data[0],
pCallSigAddr->u.ipAddress->ip.data[1],
pCallSigAddr->u.ipAddress->ip.data[2],
pCallSigAddr->u.ipAddress->ip.data[3]);
pGkClient->gkCallSignallingPort = pCallSigAddr->u.ipAddress->port;
}
-
+
/* Update list of registered aliases*/
if(pRegistrationConfirm->m.terminalAliasPresent)
{
- ooGkClientUpdateRegisteredAliases(pGkClient,
+ ooGkClientUpdateRegisteredAliases(pGkClient,
&pRegistrationConfirm->terminalAlias, TRUE);
}
else{/* Everything registered*/
@@ -1234,16 +1234,16 @@ int ooGkClientHandleRegistrationConfirm
}
cbData->timerType = OO_REG_TIMER;
cbData->pGkClient = pGkClient;
- if(!ooTimerCreate(&pGkClient->ctxt, &pGkClient->timerList,
- &ooGkClientREGTimerExpired, regTTL,
+ if(!ooTimerCreate(&pGkClient->ctxt, &pGkClient->timerList,
+ &ooGkClientREGTimerExpired, regTTL,
cbData, FALSE))
{
OOTRACEERR1("Error:Unable to create REG timer.\n ");
memFreePtr(&pGkClient->ctxt, cbData);
pGkClient->state = GkClientFailed;
return OO_FAILED;
- }
-
+ }
+
}
else{
pGkClient->regTimeout = 0;
@@ -1252,7 +1252,7 @@ int ooGkClientHandleRegistrationConfirm
/* Extract Pre-Granted ARQ */
if(pRegistrationConfirm->m.preGrantedARQPresent)
{
- memcpy(&pGkClient->gkInfo.preGrantedARQ,
+ memcpy(&pGkClient->gkInfo.preGrantedARQ,
&pRegistrationConfirm->preGrantedARQ,
sizeof(H225RegistrationConfirm_preGrantedARQ));
}
@@ -1437,7 +1437,7 @@ int ooGkClientSendURQ(ooGkClient *pGkClient, ooAliases *aliases)
return OO_FAILED;
}
- pUnregReq = (H225UnregistrationRequest*)memAlloc(pctxt,
+ pUnregReq = (H225UnregistrationRequest*)memAlloc(pctxt,
sizeof(H225UnregistrationRequest));
if(!pUnregReq)
{
@@ -1455,10 +1455,10 @@ int ooGkClientSendURQ(ooGkClient *pGkClient, ooAliases *aliases)
if(!pUnregReq->requestSeqNum)
pUnregReq->requestSeqNum = pGkClient->requestSeqNum++;
-
+
/* Populate CallSignal Address List*/
- pTransportAddress = (H225TransportAddress*) memAlloc(pctxt,
+ pTransportAddress = (H225TransportAddress*) memAlloc(pctxt,
sizeof(H225TransportAddress));
pIpAddress = (H225TransportAddress_ipAddress*) memAlloc(pctxt,
sizeof(H225TransportAddress_ipAddress));
@@ -1476,9 +1476,9 @@ int ooGkClientSendURQ(ooGkClient *pGkClient, ooAliases *aliases)
inet_pton(AF_INET, pGkClient->localRASIP, pIpAddress->ip.data);
pIpAddress->ip.numocts = 4;
pIpAddress->port = gH323ep.listenPort;
-
+
dListInit(&pUnregReq->callSignalAddress);
- dListAppend(pctxt, &pUnregReq->callSignalAddress,
+ dListAppend(pctxt, &pUnregReq->callSignalAddress,
(void*)pTransportAddress);
/* Populate Endpoint Identifier */
@@ -1495,7 +1495,7 @@ int ooGkClientSendURQ(ooGkClient *pGkClient, ooAliases *aliases)
ast_mutex_unlock(&pGkClient->Lock);
return OO_FAILED;
}
- memcpy((void*)pUnregReq->endpointIdentifier.data,
+ memcpy((void*)pUnregReq->endpointIdentifier.data,
(void*)pGkClient->endpointId.data,
sizeof(ASN116BITCHAR)*pGkClient->endpointId.nchars);
@@ -1513,9 +1513,9 @@ int ooGkClientSendURQ(ooGkClient *pGkClient, ooAliases *aliases)
ast_mutex_unlock(&pGkClient->Lock);
return OO_FAILED;
}
- memcpy((void*)pUnregReq->gatekeeperIdentifier.data,
- (void*)pGkClient->gkId.data,
- sizeof(ASN116BITCHAR)*pGkClient->gkId.nchars);
+ memcpy((void*)pUnregReq->gatekeeperIdentifier.data,
+ (void*)pGkClient->gkId.data,
+ sizeof(ASN116BITCHAR)*pGkClient->gkId.nchars);
}
/* Check whether specific aliases are to be unregistered*/
@@ -1525,7 +1525,7 @@ int ooGkClientSendURQ(ooGkClient *pGkClient, ooAliases *aliases)
ooPopulateAliasList(pctxt, aliases, &pUnregReq->endpointAlias, 0);
}
-
+
iRet = ooGkClientSendMsg(pGkClient, pRasMsg);
if(iRet != OO_OK)
{
@@ -1540,7 +1540,7 @@ int ooGkClientSendURQ(ooGkClient *pGkClient, ooAliases *aliases)
ast_mutex_unlock(&pGkClient->Lock);
return OO_OK;
-}
+}
@@ -1550,15 +1550,15 @@ int ooGkClientHandleUnregistrationRequest
int iRet=0, x;
OOTimer *pTimer = NULL;
DListNode *pNode = NULL;
-
+
/* Lets first send unregistration confirm message back to gatekeeper*/
- ooGkClientSendUnregistrationConfirm(pGkClient,
+ ooGkClientSendUnregistrationConfirm(pGkClient,
punregistrationRequest->requestSeqNum);
if(punregistrationRequest->m.endpointAliasPresent)
{
OOTRACEINFO1("Gatekeeper requested a list of aliases be unregistered\n");
- ooGkClientUpdateRegisteredAliases(pGkClient,
+ ooGkClientUpdateRegisteredAliases(pGkClient,
&punregistrationRequest->endpointAlias, FALSE);
}
else{
@@ -1590,7 +1590,7 @@ int ooGkClientHandleUnregistrationRequest
}
}
- iRet = ooGkClientSendRRQ(pGkClient, 0);
+ iRet = ooGkClientSendRRQ(pGkClient, 0);
if(iRet != OO_OK)
{
OOTRACEERR1("Error: Failed to send RRQ message\n");
@@ -1608,14 +1608,14 @@ int ooGkClientHandleUnregistrationRequest
int ooGkClientSendUnregistrationConfirm(ooGkClient *pGkClient, unsigned reqNo)
{
int iRet = OO_OK;
- OOCTXT *pctxt = &pGkClient->msgCtxt;
+ OOCTXT *pctxt = &pGkClient->msgCtxt;
H225RasMessage *pRasMsg=NULL;
H225UnregistrationConfirm *pUCF=NULL;
ast_mutex_lock(&pGkClient->Lock);
pRasMsg = (H225RasMessage*)memAlloc(pctxt, sizeof(H225RasMessage));
- pUCF = (H225UnregistrationConfirm*)memAlloc(pctxt,
+ pUCF = (H225UnregistrationConfirm*)memAlloc(pctxt,
sizeof(H225UnregistrationConfirm));
if(!pRasMsg || !pUCF)
{
@@ -1627,9 +1627,9 @@ int ooGkClientSendUnregistrationConfirm(ooGkClient *pGkClient, unsigned reqNo)
pRasMsg->t = T_H225RasMessage_unregistrationConfirm;
pRasMsg->u.unregistrationConfirm = pUCF;
memset(pUCF, 0, sizeof(H225UnregistrationConfirm));
-
+
pUCF->requestSeqNum = reqNo;
-
+
iRet = ooGkClientSendMsg(pGkClient, pRasMsg);
if(iRet != OO_OK)
{
@@ -1666,8 +1666,8 @@ int ooGkClientSendAdmissionRequest
ast_mutex_lock(&pGkClient->Lock);
- OOTRACEDBGA3("Building Admission Request for call (%s, %s)\n",
- call->callType, call->callToken);
+ OOTRACEDBGA3("Building Admission Request for call (%s, %s)\n",
+ call->callType, call->callToken);
pRasMsg = (H225RasMessage*)memAlloc(pctxt, sizeof(H225RasMessage));
if(!pRasMsg)
{
@@ -1678,7 +1678,7 @@ int ooGkClientSendAdmissionRequest
return OO_FAILED;
}
pRasMsg->t = T_H225RasMessage_admissionRequest;
- pAdmReq = (H225AdmissionRequest*) memAlloc(pctxt,
+ pAdmReq = (H225AdmissionRequest*) memAlloc(pctxt,
sizeof(H225AdmissionRequest));
if(!pAdmReq)
{
@@ -1691,12 +1691,12 @@ int ooGkClientSendAdmissionRequest
}
memset(pAdmReq, 0, sizeof(H225AdmissionRequest));
pRasMsg->u.admissionRequest = pAdmReq;
-
+
/* Populate call signalling addresses */
- pIpAddressLocal = (H225TransportAddress_ipAddress*)memAlloc(pctxt,
+ pIpAddressLocal = (H225TransportAddress_ipAddress*)memAlloc(pctxt,
sizeof(H225TransportAddress_ipAddress));
if(!ooUtilsIsStrEmpty(call->remoteIP))
- pIpAddressRemote = (H225TransportAddress_ipAddress*)memAlloc(pctxt,
+ pIpAddressRemote = (H225TransportAddress_ipAddress*)memAlloc(pctxt,
sizeof(H225TransportAddress_ipAddress));
if(!pIpAddressLocal || (!ooUtilsIsStrEmpty(call->remoteIP) && (!pIpAddressRemote)))
@@ -1751,7 +1751,7 @@ int ooGkClientSendAdmissionRequest
/* Populate call type - For now only PointToPoint supported*/
pAdmReq->callType.t = T_H225CallType_pointToPoint;
-
+
/* Add call model to message*/
pAdmReq->m.callModelPresent = 1;
if(OO_TESTFLAG(call->flags, OO_M_GKROUTED))
@@ -1766,32 +1766,32 @@ int ooGkClientSendAdmissionRequest
if(!pAdmReq->endpointIdentifier.data)
{
OOTRACEERR3("Error:Memory - ooGkClientSendAdmissionRequest - "
- "endpointIdentifier.data(%s, %s)\n", call->callType,
+ "endpointIdentifier.data(%s, %s)\n", call->callType,
call->callToken);
memReset(pctxt);
pGkClient->state = GkClientFailed;
ast_mutex_unlock(&pGkClient->Lock);
return OO_FAILED;
}
- memcpy((void*)pAdmReq->endpointIdentifier.data,
+ memcpy((void*)pAdmReq->endpointIdentifier.data,
(void*)pGkClient->endpointId.data,
sizeof(ASN116BITCHAR)*pGkClient->endpointId.nchars);
/* Get Destination And source aliases for call - */
if(!strcmp(call->callType, "incoming"))
{
- if(call->ourAliases)
+ if(call->ourAliases)
destAliases = call->ourAliases;
else
- destAliases = gH323ep.aliases;
+ destAliases = gH323ep.aliases;
srcAliases = call->remoteAliases;
}
else {
- if(call->ourAliases)
+ if(call->ourAliases)
srcAliases = call->ourAliases;
else
- srcAliases = gH323ep.aliases;
+ srcAliases = gH323ep.aliases;
destAliases = call->remoteAliases;
}
@@ -1826,12 +1826,12 @@ int ooGkClientSendAdmissionRequest
return OO_FAILED;
}
}
-
+
/* Populate bandwidth*/
pAdmReq->bandWidth = DEFAULT_BW_REQUEST;
/* Populate call Reference */
pAdmReq->callReferenceValue = call->callReference;
-
+
/* populate conferenceID */
memcpy((void*)&pAdmReq->conferenceID, (void*)&call->confIdentifier,
sizeof(H225ConferenceIdentifier));
@@ -1864,8 +1864,8 @@ int ooGkClientSendAdmissionRequest
ast_mutex_unlock(&pGkClient->Lock);
return OO_FAILED;
}
- memcpy((void*)pAdmReq->gatekeeperIdentifier.data,
- (void*)pGkClient->gkId.data,
+ memcpy((void*)pAdmReq->gatekeeperIdentifier.data,
+ (void*)pGkClient->gkId.data,
sizeof(ASN116BITCHAR)*pGkClient->gkId.nchars);
}
@@ -1875,7 +1875,7 @@ int ooGkClientSendAdmissionRequest
/* Create RasCallAdmissionInfo */
if(!retransmit)
{
- pCallAdmInfo = (RasCallAdmissionInfo*)memAlloc(&pGkClient->ctxt,
+ pCallAdmInfo = (RasCallAdmissionInfo*)memAlloc(&pGkClient->ctxt,
sizeof(RasCallAdmissionInfo));
if(!pCallAdmInfo)
{
@@ -1885,7 +1885,7 @@ int ooGkClientSendAdmissionRequest
pGkClient->state = GkClientFailed;
ast_mutex_unlock(&pGkClient->Lock);
return OO_FAILED;
- }
+ }
pCallAdmInfo->call = call;
pCallAdmInfo->retries = 0;
@@ -1904,7 +1904,7 @@ int ooGkClientSendAdmissionRequest
}
}
}
-
+
iRet = ooGkClientSendMsg(pGkClient, pRasMsg);
if(iRet != OO_OK)
{
@@ -1914,10 +1914,10 @@ int ooGkClientSendAdmissionRequest
ast_mutex_unlock(&pGkClient->Lock);
return OO_FAILED;
}
- OOTRACEINFO3("Admission Request message sent for (%s, %s)\n",
+ OOTRACEINFO3("Admission Request message sent for (%s, %s)\n",
call->callType, call->callToken);
memReset(pctxt);
-
+
/* Add ARQ timer */
cbData = (ooGkClientTimerCb*) memAlloc
(&pGkClient->ctxt, sizeof(ooGkClientTimerCb));
@@ -1932,8 +1932,8 @@ int ooGkClientSendAdmissionRequest
cbData->timerType = OO_ARQ_TIMER;
cbData->pGkClient = pGkClient;
cbData->pAdmInfo = pCallAdmInfo;
- if(!ooTimerCreate(&pGkClient->ctxt, &pGkClient->timerList,
- &ooGkClientARQTimerExpired, pGkClient->arqTimeout,
+ if(!ooTimerCreate(&pGkClient->ctxt, &pGkClient->timerList,
+ &ooGkClientARQTimerExpired, pGkClient->arqTimeout,
cbData, FALSE))
{
OOTRACEERR1("Error:Unable to create ARQ timer.\n ");
@@ -1941,8 +1941,8 @@ int ooGkClientSendAdmissionRequest
pGkClient->state = GkClientFailed;
ast_mutex_unlock(&pGkClient->Lock);
return OO_FAILED;
- }
-
+ }
+
ast_mutex_unlock(&pGkClient->Lock);
return OO_OK;
}
@@ -1970,14 +1970,14 @@ int ooGkClientHandleAdmissionConfirm
pCallAdmInfo = (RasCallAdmissionInfo*) pNode->data;
if(pCallAdmInfo->requestSeqNum == pAdmissionConfirm->requestSeqNum)
{
- OOTRACEDBGC3("Found Pending call(%s, %s)\n",
- pCallAdmInfo->call->callType,
+ OOTRACEDBGC3("Found Pending call(%s, %s)\n",
+ pCallAdmInfo->call->callType,
pCallAdmInfo->call->callToken);
ast_mutex_lock(&pCallAdmInfo->call->GkLock);
/* Populate Remote IP */
- if(pAdmissionConfirm->destCallSignalAddress.t !=
+ if(pAdmissionConfirm->destCallSignalAddress.t !=
T_H225TransportAddress_ipAddress)
{
OOTRACEERR1("Error:Destination Call Signal Address provided by"
@@ -1990,7 +1990,7 @@ int ooGkClientHandleAdmissionConfirm
return OO_FAILED;
}
ipAddress = pAdmissionConfirm->destCallSignalAddress.u.ipAddress;
-
+
sprintf(ip, "%d.%d.%d.%d", ipAddress->ip.data[0],
ipAddress->ip.data[1],
ipAddress->ip.data[2],
@@ -2012,13 +2012,13 @@ int ooGkClientHandleAdmissionConfirm
OO_CLRFLAG(pCallAdmInfo->call->flags, OO_M_GKROUTED);
}
}
-
+
if(pAdmissionConfirm->callModel.t == T_H225CallModel_gatekeeperRouted)
{
if(!OO_TESTFLAG(pCallAdmInfo->call->flags, OO_M_GKROUTED))
{
OOTRACEINFO3("Gatekeeper changed call model from direct to "
- "GkRouted. (%s, %s)\n",
+ "GkRouted. (%s, %s)\n",
pCallAdmInfo->call->callType,
pCallAdmInfo->call->callToken);
OO_SETFLAG(pCallAdmInfo->call->flags, OO_M_GKROUTED);
@@ -2032,25 +2032,25 @@ int ooGkClientHandleAdmissionConfirm
pTimer = (OOTimer*)pNode1->data;
if(((ooGkClientTimerCb*)pTimer->cbData)->timerType & OO_ARQ_TIMER)
{
- if(((ooGkClientTimerCb*)pTimer->cbData)->pAdmInfo ==
+ if(((ooGkClientTimerCb*)pTimer->cbData)->pAdmInfo ==
pCallAdmInfo)
{
memFreePtr(&pGkClient->ctxt, pTimer->cbData);
- ooTimerDelete(&pGkClient->ctxt, &pGkClient->timerList,
+ ooTimerDelete(&pGkClient->ctxt, &pGkClient->timerList,
pTimer);
OOTRACEDBGA1("Deleted ARQ Timer.\n");
break;
}
}
- }
- OOTRACEINFO3("Admission Confirm message received for (%s, %s)\n",
- pCallAdmInfo->call->callType,
+ }
+ OOTRACEINFO3("Admission Confirm message received for (%s, %s)\n",
+ pCallAdmInfo->call->callType,
pCallAdmInfo->call->callToken);
pCallAdmInfo->call->callState = OO_CALL_CONNECTING;
dListRemove(&pGkClient->callsPendingList, pNode);
- dListAppend(&pGkClient->ctxt, &pGkClient->callsAdmittedList,
+ dListAppend(&pGkClient->ctxt, &pGkClient->callsAdmittedList,
pNode->data);
memFreePtr(&pGkClient->ctxt, pNode);
ast_mutex_unlock(&pCallAdmInfo->call->GkLock);
@@ -2095,7 +2095,7 @@ int ooGkClientHandleAdmissionReject
if(!pCallAdmInfo)
{
OOTRACEWARN2("Received admission reject with request number %d can not"
- " be matched with any pending call.\n",
+ " be matched with any pending call.\n",
pAdmissionReject->requestSeqNum);
ast_mutex_unlock(&pGkClient->Lock);
return OO_OK;
@@ -2115,21 +2115,21 @@ int ooGkClientHandleAdmissionReject
pTimer = (OOTimer*)pNode1->data;
if(((ooGkClientTimerCb*)pTimer->cbData)->timerType & OO_ARQ_TIMER)
{
- if(((ooGkClientTimerCb*)pTimer->cbData)->pAdmInfo ==
+ if(((ooGkClientTimerCb*)pTimer->cbData)->pAdmInfo ==
pCallAdmInfo)
{
memFreePtr(&pGkClient->ctxt, pTimer->cbData);
- ooTimerDelete(&pGkClient->ctxt, &pGkClient->timerList,
+ ooTimerDelete(&pGkClient->ctxt, &pGkClient->timerList,
pTimer);
OOTRACEDBGA1("Deleted ARQ Timer.\n");
break;
}
}
- }
+ }
OOTRACEINFO4("Admission Reject message received with reason code %d for "
"(%s, %s)\n", pAdmissionReject->rejectReason.t, call->callType,
call->callToken);
-
+
call->callState = OO_CALL_CLEARED;
switch(pAdmissionReject->rejectReason.t)
@@ -2174,7 +2174,7 @@ int ooGkClientHandleAdmissionReject
ast_mutex_unlock(&pCallAdmInfo->call->GkLock);
ast_mutex_unlock(&pGkClient->Lock);
ast_cond_signal(&pCallAdmInfo->call->gkWait);
- return OO_OK;
+ return OO_OK;
}
@@ -2194,8 +2194,8 @@ int ooGkClientSendIRR
ast_mutex_lock(&pGkClient->Lock);
- OOTRACEDBGA3("Building Info Request Resp for call (%s, %s)\n",
- call->callType, call->callToken);
+ OOTRACEDBGA3("Building Info Request Resp for call (%s, %s)\n",
+ call->callType, call->callToken);
pRasMsg = (H225RasMessage*)memAlloc(pctxt, sizeof(H225RasMessage));
if(!pRasMsg)
{
@@ -2206,7 +2206,7 @@ int ooGkClientSendIRR
return OO_FAILED;
}
pRasMsg->t = T_H225RasMessage_infoRequestResponse;
- pIRR = (H225InfoRequestResponse*) memAlloc(pctxt,
+ pIRR = (H225InfoRequestResponse*) memAlloc(pctxt,
sizeof(H225InfoRequestResponse));
if(!pIRR)
{
@@ -2219,9 +2219,9 @@ int ooGkClientSendIRR
}
memset(pIRR, 0, sizeof(H225InfoRequestResponse));
pRasMsg->u.infoRequestResponse = pIRR;
-
+
/* Populate call signalling addresses */
- pIpAddressLocal = (H225TransportAddress_ipAddress*)memAlloc(pctxt,
+ pIpAddressLocal = (H225TransportAddress_ipAddress*)memAlloc(pctxt,
sizeof(H225TransportAddress_ipAddress));
pTransportAddress = (H225TransportAddress*) memAlloc(pctxt,
sizeof(H225TransportAddress));
@@ -2251,7 +2251,7 @@ int ooGkClientSendIRR
if(!pIRR->requestSeqNum)
pIRR->requestSeqNum = pGkClient->requestSeqNum++;
- pIpRasAddress = (H225TransportAddress_ipAddress*)memAlloc(pctxt,
+ pIpRasAddress = (H225TransportAddress_ipAddress*)memAlloc(pctxt,
sizeof(H225TransportAddress_ipAddress));
if(!pIpRasAddress)
{
@@ -2300,10 +2300,10 @@ int ooGkClientSendIRR
/* Populate call aliases */
- if(call->ourAliases)
+ if(call->ourAliases)
srcAliases = call->ourAliases;
else
- srcAliases = gH323ep.aliases;
+ srcAliases = gH323ep.aliases;
/* Populate Source Info */
if(srcAliases)
@@ -2326,12 +2326,12 @@ int ooGkClientSendIRR
pIRR->m.needResponsePresent = TRUE;
pIRR->unsolicited = TRUE;
pIRR->m.unsolicitedPresent = TRUE;
-
+
/* Populate perCallInfo */
pIRR->m.perCallInfoPresent = TRUE;
- perCallInfo =
+ perCallInfo =
(H225InfoRequestResponse_perCallInfo_element *)memAlloc(pctxt,
sizeof(H225InfoRequestResponse_perCallInfo_element));
memset(perCallInfo, 0, sizeof(H225InfoRequestResponse_perCallInfo_element));
@@ -2372,9 +2372,9 @@ int ooGkClientSendIRR
pRemoteAddr->port = call->remotePort;
perCallInfo->callSignaling.m.sendAddressPresent = TRUE;
- perCallInfo->callSignaling.sendAddress.t = T_H225TransportAddress_ipAddress;
+ perCallInfo->callSignaling.sendAddress.t = T_H225TransportAddress_ipAddress;
perCallInfo->callSignaling.m.recvAddressPresent = TRUE;
- perCallInfo->callSignaling.recvAddress.t = T_H225TransportAddress_ipAddress;
+ perCallInfo->callSignaling.recvAddress.t = T_H225TransportAddress_ipAddress;
if (!strcmp(call->callType, "incoming")) {
// terminator
@@ -2414,7 +2414,7 @@ int ooGkClientSendIRR
}
perCallInfo->usageInformation.m.endTimePresent = FALSE;
perCallInfo->m.usageInformationPresent = TRUE;
-
+
dListInit(&pIRR->perCallInfo);
dListAppend(pctxt, &pIRR->perCallInfo,
(void*)perCallInfo);
@@ -2428,25 +2428,25 @@ int ooGkClientSendIRR
ast_mutex_unlock(&pGkClient->Lock);
return OO_FAILED;
}
- OOTRACEINFO3("IRR message sent for (%s, %s)\n",
+ OOTRACEINFO3("IRR message sent for (%s, %s)\n",
call->callType, call->callToken);
memReset(pctxt);
-
+
ast_mutex_unlock(&pGkClient->Lock);
return OO_OK;
}
/**
- * This function is invoked to request call disengage to gatekeeper.
- *
- * @param szCallToken Call token.
+ * This function is invoked to request call disengage to gatekeeper.
+ *
+ * @param szCallToken Call token.
*
* @return Completion status - 0 on success, -1 on failure
*/
int ooGkClientSendDisengageRequest(ooGkClient *pGkClient, OOH323CallData *call)
{
- int iRet = 0;
+ int iRet = 0;
unsigned int x;
H225RasMessage *pRasMsg=NULL;
OOCTXT *pctxt = NULL;
@@ -2470,7 +2470,7 @@ int ooGkClientSendDisengageRequest(ooGkClient *pGkClient, OOH323CallData *call)
}
pRasMsg->t = T_H225RasMessage_disengageRequest;
- pDRQ = (H225DisengageRequest*) memAlloc(pctxt,
+ pDRQ = (H225DisengageRequest*) memAlloc(pctxt,
sizeof(H225DisengageRequest));
if(!pDRQ)
{
@@ -2483,12 +2483,12 @@ int ooGkClientSendDisengageRequest(ooGkClient *pGkClient, OOH323CallData *call)
memset(pDRQ, 0, sizeof(H225DisengageRequest));
pRasMsg->u.disengageRequest = pDRQ;
-
+
pDRQ->requestSeqNum = pGkClient->requestSeqNum++;
if(!pDRQ->requestSeqNum )
pDRQ->requestSeqNum = pGkClient->requestSeqNum++;
-
-
+
+
pDRQ->endpointIdentifier.nchars = pGkClient->endpointId.nchars;
pDRQ->endpointIdentifier.data = (ASN116BITCHAR*)memAlloc(pctxt,
sizeof(ASN116BITCHAR)*pGkClient->endpointId.nchars);
@@ -2501,15 +2501,15 @@ int ooGkClientSendDisengageRequest(ooGkClient *pGkClient, OOH323CallData *call)
ast_mutex_unlock(&pGkClient->Lock);
return OO_FAILED;
}
- memcpy((void*)pDRQ->endpointIdentifier.data,
- (void*)pGkClient->endpointId.data,
+ memcpy((void*)pDRQ->endpointIdentifier.data,
+ (void*)pGkClient->endpointId.data,
sizeof(ASN116BITCHAR)*pGkClient->endpointId.nchars);
memcpy((void*)&pDRQ->conferenceID, (void*)&call->confIdentifier,
sizeof(H225ConferenceIdentifier));
pDRQ->callReferenceValue = call->callReference;
-
+
pDRQ->disengageReason.t = T_H225DisengageReason_normalDrop;
pDRQ->m.answeredCallPresent = 1;
@@ -2534,13 +2534,13 @@ int ooGkClientSendDisengageRequest(ooGkClient *pGkClient, OOH323CallData *call)
ast_mutex_unlock(&pGkClient->Lock);
return OO_FAILED;
}
- memcpy(pDRQ->gatekeeperIdentifier.data, pGkClient->gkId.data,
+ memcpy(pDRQ->gatekeeperIdentifier.data, pGkClient->gkId.data,
pGkClient->gkId.nchars*sizeof(ASN116BITCHAR));
}
pDRQ->m.terminationCausePresent = 1;
pDRQ->terminationCause.t = T_H225CallTerminationCause_releaseCompleteCauseIE;
- pDRQ->terminationCause.u.releaseCompleteCauseIE =
+ pDRQ->terminationCause.u.releaseCompleteCauseIE =
(H225CallTerminationCause_releaseCompleteCauseIE*)memAlloc(pctxt,
sizeof(H225CallTerminationCause_releaseCompleteCauseIE));
if(!pDRQ->terminationCause.u.releaseCompleteCauseIE)
@@ -2551,7 +2551,7 @@ int ooGkClientSendDisengageRequest(ooGkClient *pGkClient, OOH323CallData *call)
ast_mutex_unlock(&pGkClient->Lock);
return OO_FAILED;
}
- pDRQ->terminationCause.u.releaseCompleteCauseIE->numocts =
+ pDRQ->terminationCause.u.releaseCompleteCauseIE->numocts =
strlen("Call Ended");
strcpy((char *)pDRQ->terminationCause.u.releaseCompleteCauseIE->data, "Call Ended");
@@ -2579,7 +2579,7 @@ int ooGkClientSendDisengageRequest(ooGkClient *pGkClient, OOH323CallData *call)
OOTRACEERR1("Error: Failed to send DRQ message\n");
pGkClient->state = GkClientGkErr;
}
-
+
/* Search call in admitted calls list */
@@ -2597,7 +2597,7 @@ int ooGkClientSendDisengageRequest(ooGkClient *pGkClient, OOH323CallData *call)
}
ast_mutex_unlock(&pGkClient->Lock);
return iRet;
-}
+}
int ooGkClientHandleDisengageConfirm
(ooGkClient *pGkClient, H225DisengageConfirm *pDCF)
@@ -2612,14 +2612,14 @@ int ooGkClientRRQTimerExpired(void*pdata)
ooGkClientTimerCb *cbData = (ooGkClientTimerCb*)pdata;
ooGkClient *pGkClient = cbData->pGkClient;
OOTRACEDBGA1("Gatekeeper client RRQ timer expired.\n");
-
+
if(pGkClient->rrqRetries < OO_MAX_RRQ_RETRIES)
{
- ret = ooGkClientSendRRQ(pGkClient, 0);
+ ret = ooGkClientSendRRQ(pGkClient, 0);
if(ret != OO_OK)
{
OOTRACEERR1("Error:Failed to send RRQ message\n");
-
+
return OO_FAILED;
}
pGkClient->rrqRetries++;
@@ -2676,11 +2676,11 @@ int ooGkClientGRQTimerExpired(void* pdata)
OOTRACEDBGA1("Gatekeeper client GRQ timer expired.\n");
- memFreePtr(&pGkClient->ctxt, cbData);
+ memFreePtr(&pGkClient->ctxt, cbData);
if(pGkClient->grqRetries < OO_MAX_GRQ_RETRIES)
{
- ret = ooGkClientSendGRQ(pGkClient);
+ ret = ooGkClientSendGRQ(pGkClient);
if(ret != OO_OK)
{
OOTRACEERR1("Error:Failed to send GRQ message\n");
@@ -2717,7 +2717,7 @@ int ooGkClientGRQTimerExpired(void* pdata)
ast_mutex_unlock(&pGkClient->Lock);
return OO_FAILED;
}
-
+
/* clear grq counter */
pGkClient->grqRetries = 0;
@@ -2725,15 +2725,15 @@ int ooGkClientGRQTimerExpired(void* pdata)
return OO_FAILED;
}
-
+
int ooGkClientREGTimerExpired(void *pdata)
{
int ret=0;
ooGkClientTimerCb *cbData = (ooGkClientTimerCb*)pdata;
ooGkClient *pGkClient = cbData->pGkClient;
OOTRACEDBGA1("Gatekeeper client additive registration timer expired\n");
- memFreePtr(&pGkClient->ctxt, cbData);
- ret = ooGkClientSendRRQ(pGkClient, TRUE);
+ memFreePtr(&pGkClient->ctxt, cbData);
+ ret = ooGkClientSendRRQ(pGkClient, TRUE);
if(ret != OO_OK)
{
OOTRACEERR1("Error:Failed to send Additive RRQ message\n");
@@ -2751,14 +2751,14 @@ int ooGkClientARQTimerExpired(void* pdata)
RasCallAdmissionInfo *pAdmInfo = cbData->pAdmInfo;
OOTRACEDBGA1("Gatekeeper client ARQ timer expired.\n");
- memFreePtr(&pGkClient->ctxt, cbData);
+ memFreePtr(&pGkClient->ctxt, cbData);
if(!pAdmInfo)
return OO_OK;
if(pAdmInfo->retries < OO_MAX_ARQ_RETRIES)
{
- ret = ooGkClientSendAdmissionRequest(pGkClient, pAdmInfo->call, TRUE);
+ ret = ooGkClientSendAdmissionRequest(pGkClient, pAdmInfo->call, TRUE);
if(ret != OO_OK)
{
OOTRACEERR1("Error:Failed to send ARQ message\n");
@@ -2870,13 +2870,13 @@ int ooGkClientHandleClientOrGkFailure(ooGkClient *pGkClient)
* TODO: This fuction might not work properly in case of additive registrations
* For example we registrered 10 aliases and gatekeeper accepted 8 of them.
* Now we want to register another two new aliases(not out of those first 10).
- * Gk responds with RCF with empty terminalAlias field thus indicating both
+ * Gk responds with RCF with empty terminalAlias field thus indicating both
* the aliases were accepted. If this function is called, it will even mark
* the earlier two unregistered aliases as registered. We will have to
* maintain a separete list of aliases being sent in RRQ for this.
*/
int ooGkClientUpdateRegisteredAliases
- (ooGkClient *pGkClient, H225_SeqOfH225AliasAddress *pAddresses,
+ (ooGkClient *pGkClient, H225_SeqOfH225AliasAddress *pAddresses,
OOBOOL registered)
{
int i=0, j, k;
@@ -2891,7 +2891,7 @@ int ooGkClientUpdateRegisteredAliases
{
/* All aliases registered/unregistsred */
pAlias = gH323ep.aliases;
-
+
while(pAlias)
{
pAlias->registered = registered?TRUE:FALSE;
@@ -2914,7 +2914,7 @@ int ooGkClientUpdateRegisteredAliases
continue;
}
pAliasAddress = (H225AliasAddress*)pNode->data;
-
+
if(!pAliasAddress){
OOTRACEERR1("Error:Invalid alias list passed to "
"ooGkClientUpdateRegisteredAliases\n");
@@ -2924,8 +2924,8 @@ int ooGkClientUpdateRegisteredAliases
switch(pAliasAddress->t)
{
case T_H225AliasAddress_dialedDigits:
- pAlias = ooH323GetAliasFromList(gH323ep.aliases,
- T_H225AliasAddress_dialedDigits,
+ pAlias = ooH323GetAliasFromList(gH323ep.aliases,
+ T_H225AliasAddress_dialedDigits,
(char*)pAliasAddress->u.dialedDigits);
if(pAlias)
{
@@ -2944,8 +2944,8 @@ int ooGkClientUpdateRegisteredAliases
}
}
value[k] = '\0';
- pAlias = ooH323GetAliasFromList(gH323ep.aliases,
- T_H225AliasAddress_h323_ID,
+ pAlias = ooH323GetAliasFromList(gH323ep.aliases,
+ T_H225AliasAddress_h323_ID,
value);
if(pAlias)
{
@@ -2956,8 +2956,8 @@ int ooGkClientUpdateRegisteredAliases
}
break;
case T_H225AliasAddress_url_ID:
- pAlias = ooH323GetAliasFromList(gH323ep.aliases,
- T_H225AliasAddress_url_ID,
+ pAlias = ooH323GetAliasFromList(gH323ep.aliases,
+ T_H225AliasAddress_url_ID,
(char*)pAliasAddress->u.url_ID);
if(pAlias)
{
@@ -2974,16 +2974,16 @@ int ooGkClientUpdateRegisteredAliases
OOTRACEERR1("Error:Alias transportID not IP address\n");
break;
}
-
- sprintf(value, "%d.%d.%d.%d:%d",
+
+ sprintf(value, "%d.%d.%d.%d:%d",
pTransportAddrss->u.ipAddress->ip.data[0],
pTransportAddrss->u.ipAddress->ip.data[1],
pTransportAddrss->u.ipAddress->ip.data[2],
pTransportAddrss->u.ipAddress->ip.data[3],
pTransportAddrss->u.ipAddress->port);
- pAlias = ooH323GetAliasFromList(gH323ep.aliases,
- T_H225AliasAddress_transportID,
+ pAlias = ooH323GetAliasFromList(gH323ep.aliases,
+ T_H225AliasAddress_transportID,
value);
if(pAlias)
{
@@ -2994,8 +2994,8 @@ int ooGkClientUpdateRegisteredAliases
}
break;
case T_H225AliasAddress_email_ID:
- pAlias = ooH323GetAliasFromList(gH323ep.aliases,
- T_H225AliasAddress_email_ID,
+ pAlias = ooH323GetAliasFromList(gH323ep.aliases,
+ T_H225AliasAddress_email_ID,
(char*) pAliasAddress->u.email_ID);
if(pAlias)
{
@@ -3011,7 +3011,7 @@ int ooGkClientUpdateRegisteredAliases
}
if(bAdd)
{
- pAlias = ooH323AddAliasToList(&gH323ep.aliases,
+ pAlias = ooH323AddAliasToList(&gH323ep.aliases,
&gH323ep.ctxt, pAliasAddress);
if(pAlias){
pAlias->registered = registered?TRUE:FALSE;
diff --git a/addons/ooh323c/src/ooGkClient.h b/addons/ooh323c/src/ooGkClient.h
index 59230e953..017380b5f 100644
--- a/addons/ooh323c/src/ooGkClient.h
+++ b/addons/ooh323c/src/ooGkClient.h
@@ -2,22 +2,22 @@
* Copyright (C) 2005 by Page Iberica, S.A.
* Copyright (C) 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.
*
*****************************************************************************/
/**
- * @file ooGkClient.h
- * This file contains functions to support RAS protocol.
+ * @file ooGkClient.h
+ * This file contains functions to support RAS protocol.
*
*
*/
@@ -73,7 +73,7 @@ extern "C" {
#define OO_ARQ_TIMER (1<<3)
#define OO_DRQ_TIMER (1<<4)
-/**
+/**
* @defgroup gkclient Gatekeeper client
* @{
*/
@@ -111,7 +111,7 @@ enum OOGkClientState {
GkClientFailed,
GkClientStopped
};
-
+
typedef struct RasGatekeeperInfo
{
@@ -136,9 +136,9 @@ struct OOAliases;
/**
* NOTE- This functionality is not yet fully completed.
- * This is a callback function which is triggered when registration confirm
+ * This is a callback function which is triggered when registration confirm
* message is received from the gatekeeper. The first parameter is the message
- * received. The second parameter provides updated list of aliases after the
+ * received. The second parameter provides updated list of aliases after the
* message was processed by the stack.
* @param rcf Handle to the received registration confirm message
*/
@@ -148,9 +148,9 @@ typedef int (*cb_OnReceivedRegistrationConfirm)
/**
* NOTE- This functionality is not yet fully completed.
- * This is a callback function which is triggered when unregistration confirm
+ * This is a callback function which is triggered when unregistration confirm
* message is received. The first parameter is the message received. The second
- * parameter provides updated list of aliases after the message was processed
+ * parameter provides updated list of aliases after the message was processed
* by the stack.
*/
typedef int (*cb_OnReceivedUnregistrationConfirm)
@@ -158,7 +158,7 @@ typedef int (*cb_OnReceivedUnregistrationConfirm)
/**
* NOTE- This functionality is not yet fully completed.
- * This is a callback function which is triggered when unregistration request
+ * This is a callback function which is triggered when unregistration request
* message is received. The first parameter is the message received. The second
* parameter provides the list of aliases requested to be unregistered.
*/
@@ -220,20 +220,20 @@ struct OOH323CallData;
* @param iGkPort Gk port.
*
* @return OO_OK, on success. OO_FAILED, on failure.
- *
+ *
*/
EXTERN int ooGkClientInit
(enum RasGatekeeperMode eGkMode, char *szGkAddr, int iGkPort );
/**
- * This function is used to print the gatekeeper client configuration
+ * This function is used to print the gatekeeper client configuration
* information to log.
* @param pGkClient Handle to gatekeeper client.
*/
EXTERN void ooGkClientPrintConfig(ooGkClient *pGkClient);
/**
- * This function is used to destroy Gatekeeper client. It releases all the
+ * This function is used to destroy Gatekeeper client. It releases all the
* associated memory.
*
* @return OO_OK, on success. OO_FAILED, on failure.
@@ -243,17 +243,17 @@ EXTERN int ooGkClientDestroy(void);
/**
* This function is used to start the Gatekeeper client functionality.
* @param pGkClient Pointer to the Gatekeeper Client.
- *
+ *
* @return OO_OK, on success. OO_FAILED, on failure.
*/
EXTERN int ooGkClientStart(ooGkClient *pGkClient);
/**
- * This function is invoked to set a gatekeeper mode.
- * @param pGkClient Handle to gatekeeper client.
- * @param eGkMode Gatekeeper mode selected. One of the following:
- * - RasNoGatekeeper (DEFAULT), No Gatekeeper.
- * - RasDiscoverGatekeeper, to discover a gatekeeper
+ * This function is invoked to set a gatekeeper mode.
+ * @param pGkClient Handle to gatekeeper client.
+ * @param eGkMode Gatekeeper mode selected. One of the following:
+ * - RasNoGatekeeper (DEFAULT), No Gatekeeper.
+ * - RasDiscoverGatekeeper, to discover a gatekeeper
* automatically.
* - RasUseSpecificGatekeeper, to use a specific gatekeeper.
* @param szGkAddr Gatekeeper address (only when using specific gatekeeper).
@@ -261,8 +261,8 @@ EXTERN int ooGkClientStart(ooGkClient *pGkClient);
*
* @return Completion status - OO_OK on success, OO_FAILED on failure
*/
-EXTERN int ooGkClientSetGkMode(ooGkClient *pGkClient,
- enum RasGatekeeperMode eGkMode, char *szGkAddr,
+EXTERN int ooGkClientSetGkMode(ooGkClient *pGkClient,
+ enum RasGatekeeperMode eGkMode, char *szGkAddr,
int iGkPort );
/**
@@ -288,7 +288,7 @@ EXTERN int ooGkClientCloseChannel(ooGkClient *pGkClient);
* identifier.
* @param pGkClient Pointer to gatekeeper client.
* @param psVendor Pointer to vendor identifier to be filled.
- *
+ *
*/
EXTERN void ooGkClientRasFillVendor
(ooGkClient *pGkClient, H225VendorIdentifier *psVendor);
@@ -299,14 +299,14 @@ EXTERN void ooGkClientRasFillVendor
* @param pGkClient Handle to Gatekeeper client for which message has to be
* received.
*
- * @return Completion status - OO_OK on success, OO_FAILED on
+ * @return Completion status - OO_OK on success, OO_FAILED on
* failure
*/
EXTERN int ooGkClientReceive(ooGkClient *pGkClient);
/**
- * This function is used to handle a received RAS message by a gatekeeper
+ * This function is used to handle a received RAS message by a gatekeeper
* client.
* @param pGkClient Handle to gatekeeper client.
* @param pRasMsg Handle to received Ras message.
@@ -322,14 +322,14 @@ EXTERN int ooGkClientHandleRASMessage
* @param pGkClient Handle to the gatekeeper client.
* @param pRasMsg Handle to Ras message to be sent.
*
- * @return OO_OK, on success. OO_FAILED, otherwise.
+ * @return OO_OK, on success. OO_FAILED, otherwise.
*/
EXTERN int ooGkClientSendMsg(ooGkClient *pGkClient, H225RasMessage *pRasMsg);
/**
* This function is used to send Gatekeeper request message.
- * @param pGkClient Handle to gatekeeper client for which GRQ message has to
+ * @param pGkClient Handle to gatekeeper client for which GRQ message has to
* be sent.
*
* @return OO_OK, on success. OO_FAILED, otherwise.
@@ -360,9 +360,9 @@ EXTERN int ooGkClientHandleGatekeeperConfirm
/**
* This function is used to send Registration request message.
- * @param pGkClient Handle to gatekeeper client for which RRQ message has to
+ * @param pGkClient Handle to gatekeeper client for which RRQ message has to
* be sent.
- * @param keepAlive Indicates whether keepalive lightweight registration has
+ * @param keepAlive Indicates whether keepalive lightweight registration has
* to be sent.
*
* @return OO_OK, on success. OO_FAILED, otherwise.
@@ -392,9 +392,9 @@ EXTERN int ooGkClientHandleRegistrationReject
/**
* This function is used to send UnRegistration request message.
- * @param pGkClient Handle to gatekeeper client for which URQ message has to
+ * @param pGkClient Handle to gatekeeper client for which URQ message has to
* be sent.
- * @param aliases List of aliases to be unregistered. NULL, if all the
+ * @param aliases List of aliases to be unregistered. NULL, if all the
* aliases have to be unregistered.
*
* @return OO_OK, on success. OO_FAILED, otherwise.
@@ -413,21 +413,21 @@ EXTERN int ooGkClientHandleUnregistrationRequest
/**
- * This function is used to send an unregistration confirm message to
+ * This function is used to send an unregistration confirm message to
* gatekeeper.
* @param pGkClient Handle to gatekeeper client.
* @param reqNo Request Sequence number for the confirm message.
*
* @return OO_OK, on success. OO_FAILED, on failure.
*/
-EXTERN int ooGkClientSendUnregistrationConfirm(ooGkClient *pGkClient,
+EXTERN int ooGkClientSendUnregistrationConfirm(ooGkClient *pGkClient,
unsigned reqNo);
/**
- * This function is invoked to request bandwith admission for a call.
+ * This function is invoked to request bandwith admission for a call.
* @param pGkClient Gatekeeper client to be used
* @param call Handle to the call.
- * @param retransmit Indicates whether new call or retransmitting for
+ * @param retransmit Indicates whether new call or retransmitting for
* existing call.
*
* @return OO_OK, on success. OO_FAILED, on failure.
@@ -447,8 +447,8 @@ EXTERN int ooGkClientHandleAdmissionConfirm
/**
- * This function is used to handle a received Admission Reject message. It
- * finds the associated call and marks it for cleaning with appropriate
+ * This function is used to handle a received Admission Reject message. It
+ * finds the associated call and marks it for cleaning with appropriate
* call end reason code.
* @param pGkClient Handle to Gatekeeper client.
* @param pAdmissionReject Handle to received admission reject message.
@@ -459,7 +459,7 @@ EXTERN int ooGkClientHandleAdmissionReject
(ooGkClient *pGkClient, H225AdmissionReject *pAdmissionReject);
/**
- * This function is invoked to request call disengage to gatekeeper.
+ * This function is invoked to request call disengage to gatekeeper.
* @param pGkClient Gatekeeper client to be used.
* @param call Call Handle
*
@@ -520,7 +520,7 @@ EXTERN int ooGkClientARQTimerExpired(void* pdata);
EXTERN int ooGkClientCleanCall(ooGkClient *pGkClient, struct OOH323CallData *call);
/**
- * This function is used to handle gatekeeper client failure or gatekeeper
+ * This function is used to handle gatekeeper client failure or gatekeeper
* failure which can be detected by unresponsiveness of gk.
* @param pGkClient Handle to gatekeeper client.
*
@@ -538,7 +538,7 @@ EXTERN int ooGkClientHandleClientOrGkFailure(ooGkClient *pGkClient);
* @return OO_OK, on success. OO_FAILED, on failure.
*/
EXTERN int ooGkClientUpdateRegisteredAliases
- (ooGkClient *pGkClient, H225_SeqOfH225AliasAddress *pAddresses,
+ (ooGkClient *pGkClient, H225_SeqOfH225AliasAddress *pAddresses,
OOBOOL registered);
/**
@@ -551,8 +551,8 @@ EXTERN int ooGkClientUpdateRegisteredAliases
*/
int ooGkClientSetCallbacks
(ooGkClient *pGkClient, OOGKCLIENTCALLBACKS callbacks);
-/**
- * @}
+/**
+ * @}
*/
int ooGkClientReInit(ooGkClient *pGkClient);
diff --git a/addons/ooh323c/src/ooLogChan.c b/addons/ooh323c/src/ooLogChan.c
index 004861cc9..05b152a86 100644
--- a/addons/ooh323c/src/ooLogChan.c
+++ b/addons/ooh323c/src/ooLogChan.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.
*
*****************************************************************************/
@@ -23,8 +23,8 @@
/** Global endpoint structure */
extern OOH323EndPoint gH323ep;
-OOLogicalChannel* ooAddNewLogicalChannel(OOH323CallData *call, int channelNo,
- int sessionID, char *dir,
+OOLogicalChannel* ooAddNewLogicalChannel(OOH323CallData *call, int channelNo,
+ int sessionID, char *dir,
ooH323EpCapability *epCap)
{
OOLogicalChannel *pNewChannel=NULL, *pChannel=NULL;
@@ -32,7 +32,7 @@ OOLogicalChannel* ooAddNewLogicalChannel(OOH323CallData *call, int channelNo,
OOTRACEDBGC5("Adding new media channel for cap %d dir %s (%s, %s)\n",
epCap->cap, dir, call->callType, call->callToken);
/* Create a new logical channel entry */
- pNewChannel = (OOLogicalChannel*)memAlloc(call->pctxt,
+ pNewChannel = (OOLogicalChannel*)memAlloc(call->pctxt,
sizeof(OOLogicalChannel));
if(!pNewChannel)
{
@@ -40,7 +40,7 @@ OOLogicalChannel* ooAddNewLogicalChannel(OOH323CallData *call, int channelNo,
"(%s, %s)\n", call->callType, call->callToken);
return NULL;
}
-
+
memset(pNewChannel, 0, sizeof(OOLogicalChannel));
pNewChannel->channelNo = channelNo;
pNewChannel->sessionID = sessionID;
@@ -51,12 +51,12 @@ OOLogicalChannel* ooAddNewLogicalChannel(OOH323CallData *call, int channelNo,
pNewChannel->chanCap = epCap;
OOTRACEDBGC4("Adding new channel with cap %d (%s, %s)\n", epCap->cap,
- call->callType, call->callToken);
- /* As per standards, media control port should be same for all
+ call->callType, call->callToken);
+ /* As per standards, media control port should be same for all
proposed channels with same session ID. However, most applications
use same media port for transmit and receive of audio streams. Infact,
- testing of OpenH323 based asterisk assumed that same ports are used.
- Hence we first search for existing media ports for same session and use
+ testing of OpenH323 based asterisk assumed that same ports are used.
+ Hence we first search for existing media ports for same session and use
them. This should take care of all cases.
*/
if(call->mediaInfo)
@@ -72,7 +72,7 @@ OOLogicalChannel* ooAddNewLogicalChannel(OOH323CallData *call, int channelNo,
pMediaInfo = pMediaInfo->next;
}
}
-
+
if(pMediaInfo)
{
OOTRACEDBGC3("Using configured media info (%s, %s)\n", call->callType,
@@ -80,7 +80,7 @@ OOLogicalChannel* ooAddNewLogicalChannel(OOH323CallData *call, int channelNo,
pNewChannel->localRtpPort = pMediaInfo->lMediaRedirPort ? pMediaInfo->lMediaRedirPort : pMediaInfo->lMediaPort;
/* check MediaRedirPort here because RedirCPort is ReditPort + 1 and can't be 0 ;) */
pNewChannel->localRtcpPort = pMediaInfo->lMediaRedirPort ? pMediaInfo->lMediaRedirCPort : pMediaInfo->lMediaCntrlPort;
- /* If user application has not specified a specific ip and is using
+ /* If user application has not specified a specific ip and is using
multihomed mode, substitute appropriate ip.
*/
if(!strcmp(pMediaInfo->lMediaIP, "0.0.0.0") || !strcmp(pMediaInfo->lMediaIP, "::"))
@@ -102,7 +102,7 @@ OOLogicalChannel* ooAddNewLogicalChannel(OOH323CallData *call, int channelNo,
pNewChannel->localRtcpPort = ooGetNextPort (OORTP);
strcpy(pNewChannel->localIP, call->localIP);
}
-
+
/* Add new channel to the list */
pNewChannel->next = NULL;
if(!call->logicalChans) {
@@ -113,7 +113,7 @@ OOLogicalChannel* ooAddNewLogicalChannel(OOH323CallData *call, int channelNo,
while(pChannel->next) pChannel = pChannel->next;
pChannel->next = pNewChannel;
}
-
+
/* increment logical channels */
call->noOfLogicalChannels++;
OOTRACEINFO3("Created new logical channel entry (%s, %s)\n", call->callType,
@@ -144,22 +144,22 @@ OOLogicalChannel* ooFindLogicalChannelByLogicalChannelNo(OOH323CallData *call,
return pLogicalChannel;
}
-OOLogicalChannel * ooFindLogicalChannelByOLC(OOH323CallData *call,
+OOLogicalChannel * ooFindLogicalChannelByOLC(OOH323CallData *call,
H245OpenLogicalChannel *olc)
{
H245DataType * psDataType=NULL;
H245H2250LogicalChannelParameters * pslcp=NULL;
- OOTRACEDBGC4("ooFindLogicalChannel by olc %d (%s, %s)\n",
+ OOTRACEDBGC4("ooFindLogicalChannel by olc %d (%s, %s)\n",
olc->forwardLogicalChannelNumber, call->callType, call->callToken);
if(olc->m.reverseLogicalChannelParametersPresent)
{
- OOTRACEDBGC3("Finding receive channel (%s,%s)\n", call->callType,
+ OOTRACEDBGC3("Finding receive channel (%s,%s)\n", call->callType,
call->callToken);
psDataType = &olc->reverseLogicalChannelParameters.dataType;
/* Only H2250LogicalChannelParameters are supported */
if(olc->reverseLogicalChannelParameters.multiplexParameters.t !=
T_H245OpenLogicalChannel_reverseLogicalChannelParameters_multiplexParameters_h2250LogicalChannelParameters){
- OOTRACEERR4("Error:Invalid olc %d received (%s, %s)\n",
+ OOTRACEERR4("Error:Invalid olc %d received (%s, %s)\n",
olc->forwardLogicalChannelNumber, call->callType, call->callToken);
return NULL;
}
@@ -168,14 +168,14 @@ OOLogicalChannel * ooFindLogicalChannelByOLC(OOH323CallData *call,
return ooFindLogicalChannel(call, pslcp->sessionID, "receive", psDataType);
}
else{
- OOTRACEDBGC3("Finding transmit channel (%s, %s)\n", call->callType,
+ OOTRACEDBGC3("Finding transmit channel (%s, %s)\n", call->callType,
call->callToken);
psDataType = &olc->forwardLogicalChannelParameters.dataType;
/* Only H2250LogicalChannelParameters are supported */
- if(olc->forwardLogicalChannelParameters.multiplexParameters.t !=
+ if(olc->forwardLogicalChannelParameters.multiplexParameters.t !=
T_H245OpenLogicalChannel_forwardLogicalChannelParameters_multiplexParameters_h2250LogicalChannelParameters)
{
- OOTRACEERR4("Error:Invalid olc %d received (%s, %s)\n",
+ OOTRACEERR4("Error:Invalid olc %d received (%s, %s)\n",
olc->forwardLogicalChannelNumber, call->callType, call->callToken);
return NULL;
}
@@ -184,7 +184,7 @@ OOLogicalChannel * ooFindLogicalChannelByOLC(OOH323CallData *call,
}
}
-OOLogicalChannel * ooFindLogicalChannel(OOH323CallData *call, int sessionID,
+OOLogicalChannel * ooFindLogicalChannel(OOH323CallData *call, int sessionID,
char *dir, H245DataType * dataType)
{
OOLogicalChannel * pChannel = NULL;
@@ -246,7 +246,7 @@ OOLogicalChannel* ooGetTransmitLogicalChannel
while(pChannel)
{
OOTRACEINFO6("Listing logical channel %d cap %d state %d for (%s, %s)\n",
- pChannel->channelNo, pChannel->chanCap->cap, pChannel->state,
+ pChannel->channelNo, pChannel->chanCap->cap, pChannel->state,
call->callType, call->callToken);
if(!strcmp(pChannel->dir, "transmit") && pChannel->state != OO_LOGICALCHAN_IDLE &&
pChannel->state != OO_LOGICALCHAN_PROPOSEDFS)
@@ -283,13 +283,13 @@ int ooClearAllLogicalChannels(OOH323CallData *call)
OOTRACEINFO3("Clearing all logical channels (%s, %s)\n", call->callType,
call->callToken);
-
+
temp = call->logicalChans;
while(temp)
{
prev = temp;
temp = temp->next;
- ooClearLogicalChannel(call, prev->channelNo);/* TODO: efficiency - This causes re-search
+ ooClearLogicalChannel(call, prev->channelNo);/* TODO: efficiency - This causes re-search
of logical channel in the list. Can be
easily improved.*/
}
@@ -321,7 +321,7 @@ int ooClearLogicalChannel(OOH323CallData *call, int channelNo)
if(epCap->stopReceiveChannel)
{
epCap->stopReceiveChannel(call, pLogicalChannel);
- OOTRACEINFO4("Stopped Receive channel %d (%s, %s)\n",
+ OOTRACEINFO4("Stopped Receive channel %d (%s, %s)\n",
channelNo, call->callType, call->callToken);
}
else{
@@ -336,12 +336,12 @@ int ooClearLogicalChannel(OOH323CallData *call, int channelNo)
if(epCap->stopTransmitChannel)
{
epCap->stopTransmitChannel(call, pLogicalChannel);
- OOTRACEINFO4("Stopped Transmit channel %d (%s, %s)\n",
+ OOTRACEINFO4("Stopped Transmit channel %d (%s, %s)\n",
channelNo, call->callType, call->callToken);
}
else{
OOTRACEERR4("ERROR:No callback registered for stopTransmitChannel"
- " %d (%s, %s)\n", channelNo, call->callType,
+ " %d (%s, %s)\n", channelNo, call->callType,
call->callToken);
}
}
@@ -355,11 +355,11 @@ int ooClearLogicalChannel(OOH323CallData *call, int channelNo)
int ooRemoveLogicalChannel(OOH323CallData *call, int ChannelNo)
{
- OOLogicalChannel * temp = NULL, *prev=NULL;
+ OOLogicalChannel * temp = NULL, *prev=NULL;
if(!call->logicalChans)
{
OOTRACEERR4("ERROR:Remove Logical Channel - Channel %d not found "
- "Empty channel List(%s, %s)\n", ChannelNo, call->callType,
+ "Empty channel List(%s, %s)\n", ChannelNo, call->callType,
call->callToken);
return OO_FAILED;
}
@@ -381,23 +381,23 @@ int ooRemoveLogicalChannel(OOH323CallData *call, int ChannelNo)
prev = temp;
temp = temp->next;
}
-
+
OOTRACEERR4("ERROR:Remove Logical Channel - Channel %d not found "
"(%s, %s)\n", ChannelNo, call->callType, call->callToken);
return OO_FAILED;
}
-/*
-Change the state of the channel as established and close all other
-channels with same session IDs. This is useful for handling fastStart,
+/*
+Change the state of the channel as established and close all other
+channels with same session IDs. This is useful for handling fastStart,
as the endpoint can open multiple logical channels for same sessionID.
-Once the remote endpoint confirms it's selection, all other channels for
+Once the remote endpoint confirms it's selection, all other channels for
the same sessionID must be closed.
*/
int ooOnLogicalChannelEstablished
(OOH323CallData *call, OOLogicalChannel * pChannel)
{
- OOLogicalChannel * temp = NULL, *prev=NULL;
+ OOLogicalChannel * temp = NULL, *prev=NULL;
OOTRACEDBGC3("In ooOnLogicalChannelEstablished (%s, %s)\n",
call->callType, call->callToken);
pChannel->state = OO_LOGICALCHAN_ESTABLISHED;
@@ -417,4 +417,3 @@ int ooOnLogicalChannelEstablished
}
return OO_OK;
}
-
diff --git a/addons/ooh323c/src/ooLogChan.h b/addons/ooh323c/src/ooLogChan.h
index c52e9a73d..cf9a05368 100644
--- a/addons/ooh323c/src/ooLogChan.h
+++ b/addons/ooh323c/src/ooLogChan.h
@@ -1,20 +1,20 @@
/*
* 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.
*
*****************************************************************************/
/**
- * @file ooLogChan.h
+ * @file ooLogChan.h
* This file contains structures and functions for maintaining information
* on logical channels within the stack.
*/
@@ -34,13 +34,13 @@ extern "C" {
struct ooH323EpCapability;
struct OOH323CallData;
-/**
+/**
* Logical channel states.
*/
typedef enum {
- OO_LOGICAL_CHAN_UNKNOWN,
- OO_LOGICALCHAN_IDLE,
- OO_LOGICALCHAN_PROPOSED,
+ OO_LOGICAL_CHAN_UNKNOWN,
+ OO_LOGICALCHAN_IDLE,
+ OO_LOGICALCHAN_PROPOSED,
OO_LOGICALCHAN_ESTABLISHED,
OO_LOGICALCHAN_PROPOSEDFS,
OO_LOGICALCHAN_CLOSEPENDING
@@ -60,7 +60,7 @@ typedef struct OOLogicalChannel {
int localRtpPort;
int localRtcpPort;
char localIP[2+8*4+7];
- OOLogicalChannelState state;
+ OOLogicalChannelState state;
struct ooH323EpCapability *chanCap;
struct OOLogicalChannel *next;
} OOLogicalChannel;
@@ -70,7 +70,7 @@ typedef struct OOLogicalChannel {
/**
* This function is used to add a new logical channel entry into the list
* of currently active logical channels.
- * @param call Pointer to the call for which new logical channel
+ * @param call Pointer to the call for which new logical channel
* entry has to be created.
* @param channelNo Channel number for the new channel entry.
* @param sessionID Session identifier for the new channel.
@@ -80,26 +80,26 @@ typedef struct OOLogicalChannel {
* @return Pointer to logical channel, on success. NULL, on failure
*/
EXTERN ooLogicalChannel* ooAddNewLogicalChannel
- (struct OOH323CallData *call, int channelNo, int sessionID,
+ (struct OOH323CallData *call, int channelNo, int sessionID,
char *dir, ooH323EpCapability *epCap);
/**
- * This function is used to find a logical channel using the logical
+ * This function is used to find a logical channel using the logical
* channel number as a key.
- * @param call Pointer to the call for which logical channel is
+ * @param call Pointer to the call for which logical channel is
* required.
* @param channelNo Forward Logical Channel number for the logical channel
*
- * @return Pointer to the logical channel if found, NULL
- * otherwise.
+ * @return Pointer to the logical channel if found, NULL
+ * otherwise.
*/
EXTERN ooLogicalChannel* ooFindLogicalChannelByLogicalChannelNo
(struct OOH323CallData *call, int channelNo);
/**
- * This function is called when a new logical channel is established. It is
- * particularly useful in case of faststart. When the remote endpoint selects
- * one of the proposed alternatives, other channels for the same session type
+ * This function is called when a new logical channel is established. It is
+ * particularly useful in case of faststart. When the remote endpoint selects
+ * one of the proposed alternatives, other channels for the same session type
* need to be closed. This function is used for that.
*
* @param call Handle to the call which owns the logical channel.
@@ -110,24 +110,24 @@ EXTERN int ooOnLogicalChannelEstablished
(struct OOH323CallData *call, OOLogicalChannel * pChannel);
/**
- * This function is used to retrieve a logical channel with a particular
- * sessionID. Note that there can be two entries of logical channel, one in
- * each direction. This function will return the first channel which has the
+ * This function is used to retrieve a logical channel with a particular
+ * sessionID. Note that there can be two entries of logical channel, one in
+ * each direction. This function will return the first channel which has the
* same session ID.
* @param call Handle to the call which owns the channels to be searched.
* @param sessionID Session id of the session which is to be searched for.
* @param dir Direction of the channel.(transmit/receive)
*
- * @return Returns a pointer to the logical channel if found, NULL
+ * @return Returns a pointer to the logical channel if found, NULL
* otherwise.
*/
EXTERN ooLogicalChannel* ooGetLogicalChannel
(struct OOH323CallData *call, int sessionID, char *dir);
/**
- * This function is used to remove a logical channel from the list of
+ * This function is used to remove a logical channel from the list of
* channels within the call structure.
- * @param call Pointer to the call from which logical channel has
+ * @param call Pointer to the call from which logical channel has
* to be removed.
* @param ChannelNo Forward logical channel number of the channel to be
* removed.
@@ -137,7 +137,7 @@ EXTERN int ooRemoveLogicalChannel (struct OOH323CallData *call, int ChannelNo);
/**
* This function is used to cleanup a logical channel. It first stops media if
- * it is still active and then removes the channel from the list, freeing up
+ * it is still active and then removes the channel from the list, freeing up
* all the associated memory.
* @param call Handle to the call which owns the logical channel.
* @param channelNo Channel number identifying the channel.
@@ -147,7 +147,7 @@ EXTERN int ooRemoveLogicalChannel (struct OOH323CallData *call, int ChannelNo);
EXTERN int ooClearLogicalChannel (struct OOH323CallData *call, int channelNo);
/**
- * This function is used to cleanup all the logical channels associated with
+ * This function is used to cleanup all the logical channels associated with
* the call.
* @param call Handle to the call which owns the channels.
*
@@ -184,8 +184,8 @@ EXTERN OOLogicalChannel * ooFindLogicalChannel
EXTERN OOLogicalChannel* ooGetTransmitLogicalChannel(struct OOH323CallData *call);
EXTERN OOLogicalChannel* ooGetReceiveLogicalChannel(struct OOH323CallData *call);
-/**
- * @}
+/**
+ * @}
*/
#ifdef __cplusplus
diff --git a/addons/ooh323c/src/ooSocket.c b/addons/ooh323c/src/ooSocket.c
index 6032dd0af..1a6a7dbe1 100644
--- a/addons/ooh323c/src/ooSocket.c
+++ b/addons/ooh323c/src/ooSocket.c
@@ -1,15 +1,15 @@
/*
* Copyright (C) 1997-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.
*
*****************************************************************************/
@@ -79,10 +79,10 @@ int ooSocketsInit ()
WSADATA wsaData;
int err;
- if (inited) return ASN_OK;
+ if (inited) return ASN_OK;
wVersionRequested = MAKEWORD( 1, 1 );
-
+
err = WSAStartup (wVersionRequested, &wsaData);
if ( err != 0 ) {
/* Tell the user that we could not find a usable */
@@ -100,58 +100,58 @@ int ooSocketsInit ()
// ws32 = LoadLibrary ("WSOCK32.DLL");
ws32 = LoadLibrary ("WS2_32.DLL");
if (ws32 == NULL) return ASN_E_NOTINIT;
-
+
wsaStartup = (LPFN_WSASTARTUP) GetProcAddress (ws32, "WSAStartup");
if (wsaStartup == NULL) return ASN_E_NOTINIT;
-
+
send = (LPFN_SEND) GetProcAddress (ws32, "send");
if (send == NULL) return ASN_E_NOTINIT;
-
+
socket = (LPFN_SOCKET) GetProcAddress (ws32, "socket");
if (socket == NULL) return ASN_E_NOTINIT;
-
+
setsockopt = (LPFN_SETSOCKOPT) GetProcAddress (ws32, "setsockopt");
if (setsockopt == NULL) return ASN_E_NOTINIT;
-
+
bind = (LPFN_BIND) GetProcAddress (ws32, "bind");
if (bind == NULL) return ASN_E_NOTINIT;
-
+
htonl = (LPFN_HTONL) GetProcAddress (ws32, "htonl");
if (htonl == NULL) return ASN_E_NOTINIT;
-
+
htons = (LPFN_HTONS) GetProcAddress (ws32, "htons");
if (htons == NULL) return ASN_E_NOTINIT;
-
+
connect = (LPFN_CONNECT) GetProcAddress (ws32, "connect");
if (connect == NULL) return ASN_E_NOTINIT;
-
+
listen = (LPFN_LISTEN) GetProcAddress (ws32, "listen");
if (listen == NULL) return ASN_E_NOTINIT;
-
+
accept = (LPFN_ACCEPT) GetProcAddress (ws32, "accept");
if (accept == NULL) return ASN_E_NOTINIT;
-
+
inet_addr = (LPFN_INET_ADDR) GetProcAddress (ws32, "inet_addr");
if (inet_addr == NULL) return ASN_E_NOTINIT;
-
+
ntohl = (LPFN_NTOHL) GetProcAddress (ws32, "ntohl");
if (ntohl == NULL) return ASN_E_NOTINIT;
-
+
ntohs = (LPFN_NTOHS) GetProcAddress (ws32, "ntohs");
if (ntohs == NULL) return ASN_E_NOTINIT;
-
+
recv = (LPFN_RECV) GetProcAddress (ws32, "recv");
if (recv == NULL) return ASN_E_NOTINIT;
-
+
shutdown = (LPFN_SHUTDOWN) GetProcAddress (ws32, "shutdown");
if (shutdown == NULL) return ASN_E_NOTINIT;
-
+
closesocket = (LPFN_CLOSESOCKET) GetProcAddress (ws32, "closesocket");
if (closesocket == NULL) return ASN_E_NOTINIT;
getsockname = (LPFN_GETSOCKNAME) GetProcAddress (ws32, "getsockname");
if (getsockname == NULL) return ASN_E_NOTINIT;
-
+
ioctlsocket = (LPFN_IOCTLSOCKET) GetProcAddress(ws32, "ioctlsocket");
if(ioctlsocket == NULL) return ASN_E_NOTINIT;
@@ -172,15 +172,15 @@ int ooSocketsInit ()
gethostbyname = (LPFN_GETHOSTBYNAME) GetProcAddress (ws32, "gethostbyname");
if (gethostbyname == NULL) return ASN_E_NOTINIT;
-
- WSAGetLastError = (LPFN_WSAGETLASTERROR) GetProcAddress (ws32,
+
+ WSAGetLastError = (LPFN_WSAGETLASTERROR) GetProcAddress (ws32,
"WSAGetLastError");
if (WSAGetLastError == NULL) return ASN_E_NOTINIT;
WSACleanup = (LPFN_WSACLEANUP) GetProcAddress (ws32, "WSACleanup");
if (WSACleanup == NULL) return ASN_E_NOTINIT;
-
-
+
+
if (wsaStartup (MAKEWORD(1, 1), &wsaData) == -1) return ASN_E_NOTINIT;
#endif
return ASN_OK;
@@ -193,7 +193,7 @@ typedef int OOSOCKLEN;
typedef socklen_t OOSOCKLEN;
#endif
-int ooSocketCreate (OOSOCKET* psocket, int family)
+int ooSocketCreate (OOSOCKET* psocket, int family)
{
int on;
OOSOCKET sock;
@@ -212,14 +212,14 @@ int ooSocketCreate (OOSOCKET* psocket, int family)
SOCK_STREAM,
0);
}
-
+
if (sock == OOSOCKET_INVALID){
OOTRACEERR1("Error:Failed to create TCP socket\n");
return ASN_E_INVSOCKET;
}
on = 1;
- if (setsockopt (sock, SOL_SOCKET, SO_REUSEADDR,
+ if (setsockopt (sock, SOL_SOCKET, SO_REUSEADDR,
(const char* ) &on, sizeof (on)) == -1)
{
OOTRACEERR1("Error:Failed to set socket option SO_REUSEADDR\n");
@@ -227,7 +227,7 @@ int ooSocketCreate (OOSOCKET* psocket, int family)
}
linger.l_onoff = 1;
linger.l_linger = 0;
- if (setsockopt (sock, SOL_SOCKET, SO_LINGER,
+ if (setsockopt (sock, SOL_SOCKET, SO_LINGER,
(const char* ) &linger, sizeof (linger)) == -1)
{
OOTRACEERR1("Error:Failed to set socket option linger\n");
@@ -244,7 +244,7 @@ int ooSocketCreate (OOSOCKET* psocket, int family)
return ASN_OK;
}
-int ooSocketCreateUDP (OOSOCKET* psocket, int family)
+int ooSocketCreateUDP (OOSOCKET* psocket, int family)
{
int on;
OOSOCKET sock;
@@ -264,7 +264,7 @@ int ooSocketCreateUDP (OOSOCKET* psocket, int family)
}
on = 1;
- if (setsockopt (sock, SOL_SOCKET, SO_REUSEADDR,
+ if (setsockopt (sock, SOL_SOCKET, SO_REUSEADDR,
(const char* ) &on, sizeof (on)) == -1)
{
OOTRACEERR1("Error:Failed to set socket option SO_REUSEADDR\n");
@@ -274,7 +274,7 @@ int ooSocketCreateUDP (OOSOCKET* psocket, int family)
/*
linger.l_onoff = 1;
linger.l_linger = 0;
- if (setsockopt (sock, SOL_SOCKET, SO_LINGER,
+ if (setsockopt (sock, SOL_SOCKET, SO_LINGER,
(const char* ) &linger, sizeof (linger)) == -1)
return ASN_E_INVSOCKET;
*/
@@ -290,7 +290,7 @@ int ooSocketClose (OOSOCKET socket)
return ASN_OK;
}
-int ooSocketBind (OOSOCKET socket, OOIPADDR addr, int port)
+int ooSocketBind (OOSOCKET socket, OOIPADDR addr, int port)
{
struct ast_sockaddr m_addr;
@@ -298,7 +298,7 @@ int ooSocketBind (OOSOCKET socket, OOIPADDR addr, int port)
if (socket == OOSOCKET_INVALID)
- {
+ {
OOTRACEERR1("Error:Invalid socket passed to bind\n");
return ASN_E_INVSOCKET;
}
@@ -343,7 +343,7 @@ int ooSocketGetIpAndPort(OOSOCKET socket, char *ip, int len, int *port, int *fam
host = ast_sockaddr_stringify_addr(&addr);
if(host && strlen(host) < (unsigned)len)
- strcpy(ip, host);
+ strcpy(ip, host);
else{
OOTRACEERR1("Error:Insufficient buffer for ip address - "
"ooSocketGetIpAndPort\n");
@@ -361,7 +361,7 @@ int ooSocketGetIpAndPort(OOSOCKET socket, char *ip, int len, int *port, int *fam
return ASN_OK;
}
-int ooSocketListen (OOSOCKET socket, int maxConnection)
+int ooSocketListen (OOSOCKET socket, int maxConnection)
{
if (socket == OOSOCKET_INVALID) return ASN_E_INVSOCKET;
@@ -371,8 +371,8 @@ int ooSocketListen (OOSOCKET socket, int maxConnection)
return ASN_OK;
}
-int ooSocketAccept (OOSOCKET socket, OOSOCKET *pNewSocket,
- char* destAddr, int* destPort)
+int ooSocketAccept (OOSOCKET socket, OOSOCKET *pNewSocket,
+ char* destAddr, int* destPort)
{
struct ast_sockaddr addr;
char* host = NULL;
@@ -393,15 +393,15 @@ int ooSocketAccept (OOSOCKET socket, OOSOCKET *pNewSocket,
return ASN_OK;
}
-int ooSocketConnect (OOSOCKET socket, const char* host, int port)
+int ooSocketConnect (OOSOCKET socket, const char* host, int port)
{
struct ast_sockaddr m_addr;
if (socket == OOSOCKET_INVALID)
- {
+ {
return ASN_E_INVSOCKET;
}
-
+
memset (&m_addr, 0, sizeof (m_addr));
ast_parse_arg(host, PARSE_ADDR, &m_addr);
ast_sockaddr_set_port(&m_addr, port);
@@ -414,13 +414,13 @@ int ooSocketConnect (OOSOCKET socket, const char* host, int port)
}
/*
// **Need to add check whether complete data was sent by checking the return
-// **value of send and if complete data is not sent then add mechanism to
+// **value of send and if complete data is not sent then add mechanism to
// **send remaining bytes. This will make ooSocketSend call atomic.
*/
int ooSocketSend (OOSOCKET socket, const ASN1OCTET* pdata, ASN1UINT size)
{
if (socket == OOSOCKET_INVALID) return ASN_E_INVSOCKET;
-
+
if (send (socket, (const char*) pdata, size, SEND_FLAGS) == -1)
return ASN_E_INVSOCKET;
return ASN_OK;
@@ -431,14 +431,14 @@ int ooSocketSendTo(OOSOCKET socket, const ASN1OCTET* pdata, ASN1UINT size,
{
struct sockaddr_in m_addr;
if (socket == OOSOCKET_INVALID) return ASN_E_INVSOCKET;
-
+
memset (&m_addr, 0, sizeof (m_addr));
m_addr.sin_family = AF_INET;
m_addr.sin_port = htons ((unsigned short)port);
m_addr.sin_addr.s_addr = inet_addr (host);
- if (sendto (socket, (const char*) pdata, size, SEND_FLAGS,
- (const struct sockaddr*)&m_addr,
+ if (sendto (socket, (const char*) pdata, size, SEND_FLAGS,
+ (const struct sockaddr*)&m_addr,
sizeof(m_addr)) == -1)
return ASN_E_INVSOCKET;
return ASN_OK;
@@ -476,8 +476,8 @@ int ooSocketRecvFrom (OOSOCKET socket, ASN1OCTET* pbuf, ASN1UINT bufsize,
addrlen = sizeof(m_addr);
memset (&m_addr, 0, sizeof (m_addr));
-
- if ((len = recvfrom (socket, (char*) pbuf, bufsize, 0,
+
+ if ((len = recvfrom (socket, (char*) pbuf, bufsize, 0,
(struct sockaddr*)&m_addr, (socklen_t *) &addrlen)) == -1)
return ASN_E_INVSOCKET;
@@ -494,12 +494,12 @@ int ooSocketRecvFrom (OOSOCKET socket, ASN1OCTET* pbuf, ASN1UINT bufsize,
return len;
}
-int ooSocketSelect(int nfds, fd_set *readfds, fd_set *writefds,
+int ooSocketSelect(int nfds, fd_set *readfds, fd_set *writefds,
fd_set *exceptfds, struct timeval * timeout)
{
- int ret;
+ int ret;
#if defined (_WIN32)
- ret = select(nfds, readfds, writefds, exceptfds,
+ ret = select(nfds, readfds, writefds, exceptfds,
(const struct timeval *) timeout);
#else
ret = select(nfds, readfds, writefds, exceptfds, timeout);
@@ -515,7 +515,7 @@ int ooSocketPoll(struct pollfd *pfds, int nfds, int timeout)
int ooPDRead(struct pollfd *pfds, int nfds, int fd)
{
int i;
- for (i=0;i<nfds;i++)
+ for (i=0;i<nfds;i++)
if (pfds[i].fd == fd && (pfds[i].revents & POLLIN))
return 1;
return 0;
@@ -546,8 +546,8 @@ int ooGetLocalIPAddress(char * pIPAddrs)
if (hp->h_addrtype == AF_INET6) {
struct in6_addr i;
memcpy(&i, hp->h_addr, sizeof(i));
- strcpy(pIPAddrs, (inet_ntop(AF_INET6, &i,
- hostname, sizeof(hostname))) == NULL ? "::1" :
+ strcpy(pIPAddrs, (inet_ntop(AF_INET6, &i,
+ hostname, sizeof(hostname))) == NULL ? "::1" :
inet_ntop(AF_INET6, &i, hostname, sizeof(hostname)));
} else {
struct in_addr i;
@@ -564,7 +564,7 @@ int ooGetLocalIPAddress(char * pIPAddrs)
return ASN_OK;
}
-/* int ooSocketStrToAddr (const char* pIPAddrStr, OOIPADDR* pIPAddr)
+/* int ooSocketStrToAddr (const char* pIPAddrStr, OOIPADDR* pIPAddr)
{
int b1, b2, b3, b4;
int rv = sscanf (pIPAddrStr, "%d.%d.%d.%d", &b1, &b2, &b3, &b4);
@@ -572,7 +572,7 @@ int ooGetLocalIPAddress(char * pIPAddrs)
(b1 < 0 || b1 > 256) || (b2 < 0 || b2 > 256) ||
(b3 < 0 || b3 > 256) || (b4 < 0 || b4 > 256))
return ASN_E_INVPARAM;
- *pIPAddr = ((b1 & 0xFF) << 24) | ((b2 & 0xFF) << 16) |
+ *pIPAddr = ((b1 & 0xFF) << 24) | ((b2 & 0xFF) << 16) |
((b3 & 0xFF) << 8) | (b4 & 0xFF);
return ASN_OK;
}
@@ -594,9 +594,9 @@ int ooSocketConvertIpToNwAddr(char *inetIp, unsigned char *netIp)
OOTRACEERR1("Error:Failed to convert address\n");
return -1;
}
-
+
#endif
-
+
memcpy(netIp, (char*)&sin.sin_addr.s_addr, sizeof(unsigned long));
return ASN_OK;
}
@@ -606,7 +606,7 @@ int ooSocketAddrToStr (OOIPADDR ipAddr, char* pbuf, int bufsize)
char buf1[5], buf2[5], buf3[5], buf4[5];
int cnt = 0;
- if (bufsize < 8)
+ if (bufsize < 8)
return ASN_E_BUFOVFLW;
cnt += sprintf (buf1, "%lu", (ipAddr >> 24) & 0xFF);
@@ -654,7 +654,7 @@ int ooSocketGetInterfaceList(OOCTXT *pctxt, OOInterface **ifList)
if(ooSocketCreateUDP(&sock, 4)!= ASN_OK)
{
OOTRACEERR1("Error:Failed to create udp socket - "
- "ooSocketGetInterfaceList\n");
+ "ooSocketGetInterfaceList\n");
return -1;
}
#ifdef SIOCGIFNUM
@@ -666,7 +666,7 @@ int ooSocketGetInterfaceList(OOCTXT *pctxt, OOInterface **ifList)
#else
ifNum = 50;
#endif
-
+
ifc.ifc_len = ifNum * sizeof(struct ifreq);
ifc.ifc_req = (struct ifreq *)memAlloc(pctxt, ifNum *sizeof(struct ifreq));
if(!ifc.ifc_req)
@@ -686,7 +686,7 @@ int ooSocketGetInterfaceList(OOCTXT *pctxt, OOInterface **ifList)
#ifdef ifr_netmask
char mask[50];
#endif
-
+
pIf = (struct OOInterface*)memAlloc(pctxt, sizeof(struct OOInterface));
pName = (char*)memAlloc(pctxt, strlen(ifName->ifr_name)+1);
if(!pIf)
@@ -696,15 +696,15 @@ int ooSocketGetInterfaceList(OOCTXT *pctxt, OOInterface **ifList)
return -1;
}
OOTRACEDBGA2("\tInterface name: %s\n", ifName->ifr_name);
-
-
+
+
strcpy(ifReq.ifr_name, ifName->ifr_name);
strcpy(pName, ifName->ifr_name);
pIf->name = pName;
/* Check whether the interface is up*/
if (ioctl(sock, SIOCGIFFLAGS, &ifReq) < 0) {
- OOTRACEERR2("Error:Unable to determine status of interface %s\n",
+ OOTRACEERR2("Error:Unable to determine status of interface %s\n",
pName);
memFreePtr(pctxt, pIf->name);
memFreePtr(pctxt, pIf);
@@ -719,9 +719,9 @@ int ooSocketGetInterfaceList(OOCTXT *pctxt, OOInterface **ifList)
}
/* Retrieve interface address */
- if (ioctl(sock, SIOCGIFADDR, &ifReq) < 0)
+ if (ioctl(sock, SIOCGIFADDR, &ifReq) < 0)
{
- OOTRACEWARN2("Warn:Unable to determine address of interface %s\n",
+ OOTRACEWARN2("Warn:Unable to determine address of interface %s\n",
pName);
memFreePtr(pctxt, pIf->name);
memFreePtr(pctxt, pIf);
@@ -740,11 +740,11 @@ int ooSocketGetInterfaceList(OOCTXT *pctxt, OOInterface **ifList)
return -1;
}
strcpy(pIf->addr, addr);
-
+
#ifdef ifr_netmask
- if (ioctl(sock, SIOCGIFNETMASK, &ifReq) < 0)
+ if (ioctl(sock, SIOCGIFNETMASK, &ifReq) < 0)
{
- OOTRACEWARN2("Warn:Unable to determine mask for interface %s\n",
+ OOTRACEWARN2("Warn:Unable to determine mask for interface %s\n",
pName);
memFreePtr(pctxt, pIf->name);
memFreePtr(pctxt, pIf->addr);
@@ -793,7 +793,7 @@ int ooSocketGetInterfaceList(OOCTXT *pctxt, OOInterface **ifList)
*/
}
- }
+ }
return ASN_OK;
}
#endif
diff --git a/addons/ooh323c/src/ooSocket.h b/addons/ooh323c/src/ooSocket.h
index dca390ffa..b4cbf881b 100644
--- a/addons/ooh323c/src/ooSocket.h
+++ b/addons/ooh323c/src/ooSocket.h
@@ -1,21 +1,21 @@
/*
* Copyright (C) 1997-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.
*
*****************************************************************************/
-/**
- * @file ooSocket.h
+/**
+ * @file ooSocket.h
* Common runtime constants, data structure definitions, and run-time functions
* to support the sockets' operations.
*/
@@ -60,7 +60,7 @@ extern "C" {
#endif /* MAKE_DLL */
#endif /* EXTERN */
-/**
+/**
* @defgroup sockets Socket Layer
* @{
*/
@@ -75,7 +75,7 @@ typedef int OOSOCKET; /**< Socket's handle */
#define OOSOCKET_INVALID ((OOSOCKET)-1)
-/**
+/**
* The IP address represented as unsigned long value. The most significant 8
* bits in this unsigned long value represent the first number of the IP
* address. The least significant 8 bits represent the last number of the IP
@@ -115,7 +115,7 @@ typedef struct OOInterface{
* @return Completion status of operation: 0 (ASN_OK) = success,
* negative return value is error.
*/
-EXTERN int ooSocketAccept (OOSOCKET socket, OOSOCKET *pNewSocket,
+EXTERN int ooSocketAccept (OOSOCKET socket, OOSOCKET *pNewSocket,
char* destAddr, int* destPort);
/**
@@ -185,7 +185,7 @@ EXTERN int ooSocketConnect (OOSOCKET socket, const char* host, int port);
EXTERN int ooSocketCreate (OOSOCKET* psocket, int family);
/**
- * This function creates a UDP datagram socket.
+ * This function creates a UDP datagram socket.
*
* @param psocket The pointer to the socket's handle variable to receive
* the handle of new socket.
@@ -204,7 +204,7 @@ EXTERN int ooSocketCreateUDP (OOSOCKET* psocket, int family);
EXTERN int ooSocketsInit (void);
/**
- * This function terminates use of sockets by an application. This function
+ * This function terminates use of sockets by an application. This function
* must be called after done with sockets.
*
* @return Completion status of operation: 0 (ASN_OK) = success,
@@ -256,17 +256,17 @@ EXTERN int ooSocketRecvPeek
* @return If no error occurs, returns the number of bytes
* received. Otherwise, the negative value is error code.
*/
-EXTERN int ooSocketRecv (OOSOCKET socket, ASN1OCTET* pbuf,
+EXTERN int ooSocketRecv (OOSOCKET socket, ASN1OCTET* pbuf,
ASN1UINT bufsize);
/**
* This function receives data from a connected/unconnected socket. It is used
- * to read incoming data on sockets. It populates the remotehost and
- * remoteport parameters with information of remote host. See description of
+ * to read incoming data on sockets. It populates the remotehost and
+ * remoteport parameters with information of remote host. See description of
* 'recvfrom' socket function for further details.
*
* @param socket The socket's handle created by call to ooSocketCreate
- *
+ *
* @param pbuf Pointer to the buffer for the incoming data.
* @param bufsize Length of the buffer.
* @param remotehost Pointer to a buffer in which remote ip address
@@ -279,7 +279,7 @@ EXTERN int ooSocketRecv (OOSOCKET socket, ASN1OCTET* pbuf,
* received. Otherwise, negative value.
*/
EXTERN int ooSocketRecvFrom (OOSOCKET socket, ASN1OCTET* pbuf,
- ASN1UINT bufsize, char * remotehost,
+ ASN1UINT bufsize, char * remotehost,
ASN1UINT hostBufLen, int * remoteport);
/**
* This function sends data on a connected socket. It is used to write outgoing
@@ -293,47 +293,47 @@ EXTERN int ooSocketRecvFrom (OOSOCKET socket, ASN1OCTET* pbuf,
* @return Completion status of operation: 0 (ASN_OK) = success,
* negative return value is error.
*/
-EXTERN int ooSocketSend (OOSOCKET socket, const ASN1OCTET* pdata,
+EXTERN int ooSocketSend (OOSOCKET socket, const ASN1OCTET* pdata,
ASN1UINT size);
/**
- * This function sends data on a connected or unconnected socket. See
+ * This function sends data on a connected or unconnected socket. See
* description of 'sendto' socket function for further details.
*
* @param socket The socket's handle created by call to ::rtSocketCreate
* or ::rtSocketAccept function.
* @param pdata Buffer containing the data to be transmitted.
* @param size Length of the data in pdata.
- * @param remotehost Remote host ip address to which data has to
+ * @param remotehost Remote host ip address to which data has to
* be sent.
- * @param remoteport Remote port ip address to which data has to
+ * @param remoteport Remote port ip address to which data has to
* be sent.
*
* @return Completion status of operation: 0 (ASN_OK) = success,
* negative return value is error.
*/
-EXTERN int ooSocketSendTo(OOSOCKET socket, const ASN1OCTET* pdata,
+EXTERN int ooSocketSendTo(OOSOCKET socket, const ASN1OCTET* pdata,
ASN1UINT size, const char* remotehost,
int remoteport);
/**
* This function is used for synchronous monitoring of multiple sockets.
- * For more information refer to documnetation of "select" system call.
+ * For more information refer to documnetation of "select" system call.
*
- * @param nfds The highest numbered descriptor to be monitored
+ * @param nfds The highest numbered descriptor to be monitored
* plus one.
- * @param readfds The descriptors listed in readfds will be watched for
+ * @param readfds The descriptors listed in readfds will be watched for
* whether read would block on them.
* @param writefds The descriptors listed in writefds will be watched for
* whether write would block on them.
* @param exceptfds The descriptors listed in exceptfds will be watched for
* exceptions.
- * @param timeout Upper bound on amout of time elapsed before select
- * returns.
+ * @param timeout Upper bound on amout of time elapsed before select
+ * returns.
* @return Completion status of operation: 0 (ASN_OK) = success,
* negative return value is error.
*/
-EXTERN int ooSocketSelect(int nfds, fd_set *readfds, fd_set *writefds,
+EXTERN int ooSocketSelect(int nfds, fd_set *readfds, fd_set *writefds,
fd_set *exceptfds, struct timeval * timeout) attribute_deprecated;
EXTERN int ooSocketPoll(struct pollfd *pfds, int nfds, int timeout);
@@ -379,7 +379,7 @@ EXTERN int ooPDWrite(struct pollfd *pfds, int nfds, int fd);
EXTERN int ooGetLocalIPAddress(char * pIPAddrs);
-EXTERN int ooSocketGetSockName(OOSOCKET socket, struct sockaddr_in *name,
+EXTERN int ooSocketGetSockName(OOSOCKET socket, struct sockaddr_in *name,
socklen_t *size);
@@ -389,7 +389,7 @@ EXTERN short ooSocketHTONS(short val);
/**
* This function is used to retrieve the ip and port number used by the socket
- * passed as parameter. It internally uses getsockname system call for this
+ * passed as parameter. It internally uses getsockname system call for this
* purpose.
* @param socket Socket for which ip and port has to be determined.
* @param ip Buffer in which ip address will be returned.
@@ -403,12 +403,11 @@ EXTERN int ooSocketGetIpAndPort(OOSOCKET socket, char *ip, int len, int *port, i
EXTERN int ooSocketGetInterfaceList(OOCTXT *pctxt, OOInterface **ifList);
-/**
- * @}
+/**
+ * @}
*/
#ifdef __cplusplus
}
#endif
#endif /* _OOSOCKET_H_ */
-
diff --git a/addons/ooh323c/src/ooStackCmds.c b/addons/ooh323c/src/ooStackCmds.c
index 771b3c6af..a0c65750b 100644
--- a/addons/ooh323c/src/ooStackCmds.c
+++ b/addons/ooh323c/src/ooStackCmds.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.
*
*****************************************************************************/
@@ -57,14 +57,14 @@ int isRunning(char *callToken) {
return 0;
}
-OOStkCmdStat ooMakeCall
+OOStkCmdStat ooMakeCall
(const char* dest, char* callToken, size_t bufsiz, ooCallOptions *opts)
{
OOStackCommand cmd;
if(!callToken)
return OO_STKCMD_INVALIDPARAM;
-
+
/* Generate call token*/
if (ooGenerateOutgoingCallToken (callToken, bufsiz) != OO_OK){
@@ -86,14 +86,14 @@ OOStkCmdStat ooMakeCall
}
strcpy((char*)cmd.param1, dest);
-
+
cmd.param2 = ast_malloc(strlen(callToken)+1);
if(!cmd.param2)
{
ast_free(cmd.param1);
return OO_STKCMD_MEMERR;
}
-
+
strcpy((char*)cmd.param2, callToken);
if(!opts)
@@ -122,7 +122,7 @@ OOStkCmdStat ooMakeCall
return OO_STKCMD_SUCCESS;
}
-OOStkCmdStat ooRunCall
+OOStkCmdStat ooRunCall
(const char* dest, char* callToken, size_t bufsiz, ooCallOptions *opts)
{
OOStackCommand cmd;
@@ -145,7 +145,7 @@ OOStkCmdStat ooRunCall
if(!callToken)
return OO_STKCMD_INVALIDPARAM;
-
+
memset(&cmd, 0, sizeof(OOStackCommand));
cmd.type = OO_CMD_MAKECALL;
@@ -157,14 +157,14 @@ OOStkCmdStat ooRunCall
strcpy((char*)cmd.param1, dest);
cmd.plen1 = strlen(dest);
-
+
cmd.param2 = ast_malloc(strlen(callToken)+1);
if(!cmd.param2)
{
ast_free(cmd.param1);
return OO_STKCMD_MEMERR;
}
-
+
strcpy((char*)cmd.param2, callToken);
cmd.plen2 = strlen(callToken);
@@ -230,7 +230,7 @@ OOStkCmdStat ooManualRingback(const char *callToken)
}
strcpy((char*)cmd.param1, callToken);
cmd.plen1 = strlen(callToken);
-
+
if(ooWriteCallStackCommand(call,&cmd) != OO_OK)
{
ast_free(cmd.param1);
@@ -274,7 +274,7 @@ OOStkCmdStat ooManualProgress(const char *callToken)
}
strcpy((char*)cmd.param1, callToken);
cmd.plen1 = strlen(callToken);
-
+
if(ooWriteCallStackCommand(call, &cmd) != OO_OK)
{
ast_free(cmd.param1);
@@ -315,7 +315,7 @@ OOStkCmdStat ooAnswerCall(const char *callToken)
return OO_STKCMD_MEMERR;
}
strcpy((char*)cmd.param1, callToken);
- cmd.plen1 = strlen(callToken);
+ cmd.plen1 = strlen(callToken);
if(ooWriteCallStackCommand(call, &cmd) != OO_OK)
{
@@ -426,7 +426,7 @@ OOStkCmdStat ooHangCall(const char* callToken, OOCallClearReason reason, int q93
ast_free(cmd.param1);
ast_free(cmd.param2);
ast_free(cmd.param3);
-
+
return OO_STKCMD_SUCCESS;
}
@@ -443,7 +443,7 @@ OOStkCmdStat ooStopMonitor()
memset(&cmd, 0, sizeof(OOStackCommand));
cmd.type = OO_CMD_STOPMONITOR;
-
+
if(ooWriteStackCommand(&cmd) != OO_OK)
return OO_STKCMD_WRITEERR;
@@ -485,7 +485,7 @@ OOStkCmdStat ooSendDTMFDigit(const char *callToken, const char* dtmf)
cmd.plen1 = strlen(callToken);
strcpy((char*)cmd.param2, dtmf);
cmd.plen2 = strlen(dtmf);
-
+
if(ooWriteCallStackCommand(call,&cmd) != OO_OK)
{
ast_free(cmd.param1);
@@ -533,7 +533,7 @@ OOStkCmdStat ooSetANI(const char *callToken, const char* ani)
cmd.plen1 = strlen(callToken);
strcpy((char*)cmd.param2, ani);
cmd.plen2 = strlen(ani);
-
+
if(ooWriteCallStackCommand(call,&cmd) != OO_OK)
{
ast_free(cmd.param1);
@@ -643,7 +643,7 @@ OOStkCmdStat ooRequestChangeMode(const char *callToken, int isT38Mode)
cmd.plen1 = strlen(callToken);
*((int *) cmd.param2) = isT38Mode;
cmd.plen2 = sizeof(int);
-
+
if(ooWriteCallStackCommand(call,&cmd) != OO_OK)
{
ast_free(cmd.param1);
@@ -672,11 +672,10 @@ const char* ooGetStkCmdStatusCodeTxt(OOStkCmdStat stat)
case OO_STKCMD_WRITEERR:
return "Stack command - write error";
- case OO_STKCMD_CONNECTIONERR:
+ case OO_STKCMD_CONNECTIONERR:
return "Stack command - Failed to create command channel";
default:
return "Invalid status code";
}
}
-
diff --git a/addons/ooh323c/src/ooStackCmds.h b/addons/ooh323c/src/ooStackCmds.h
index df7767ce9..6b9cb88be 100644
--- a/addons/ooh323c/src/ooStackCmds.h
+++ b/addons/ooh323c/src/ooStackCmds.h
@@ -1,22 +1,22 @@
/*
* 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.
*
*****************************************************************************/
/**
- * @file ooStackCmds.h
+ * @file ooStackCmds.h
* This file contains stack commands which an user application can use to make
- * call, hang call etc.
+ * call, hang call etc.
*/
#ifndef OO_STACKCMDS_H
@@ -38,7 +38,7 @@ extern "C" {
-/**
+/**
* @defgroup stackcmds Stack Control Commands
* @{
*/
@@ -70,11 +70,11 @@ typedef enum OOStackCmdID {
OO_CMD_REQMODE, /*!< Request new mode */
OO_CMD_SETANI, /*! <Set conncted info */
OO_CMD_UPDLC /*! <Update Logical channels */
-
+
} OOStackCmdID;
/**
- * This structure is used to queue a stack command for processing in
+ * This structure is used to queue a stack command for processing in
* the event handler loop.
*/
typedef struct OOStackCommand {
@@ -99,7 +99,7 @@ typedef struct OOStackCommand {
*
* @return Returns OOStkCmdStat value indication success or failure.
*/
-EXTERN OOStkCmdStat ooMakeCall
+EXTERN OOStkCmdStat ooMakeCall
(const char* dest, char *callToken, size_t bufsiz, ooCallOptions *opts);
@@ -108,7 +108,7 @@ EXTERN OOStkCmdStat ooMakeCall
* This function is used to send a manual ringback message (alerting message)
* for a call. Effective only when manual-ringback is enabled.
* @param callToken Unique token for the call.
- *
+ *
* @return Returns OOStkCmdStat value indication success or failure.
*/
EXTERN OOStkCmdStat ooManualRingback(const char *callToken);
@@ -117,7 +117,7 @@ EXTERN OOStkCmdStat ooManualProgress(const char *callToken);
/**
* This function is used to answer a call
* @param callToken Unique token for the call
- *
+ *
* @return Returns OOStkCmdStat value indication success or failure.
*/
EXTERN OOStkCmdStat ooAnswerCall(const char *callToken);
@@ -142,7 +142,7 @@ EXTERN OOStkCmdStat ooForwardCall(const char* callToken, char *dest);
EXTERN OOStkCmdStat ooHangCall(const char* callToken, OOCallClearReason reason, int q931cause);
/**
- * This command function can be used by an user application to send a DTMF
+ * This command function can be used by an user application to send a DTMF
* sequence using H.245 UserInputIndication message.
* @param callToken Unique token for the call
* @param alpha Alphanumeric string reperesenting dtmf sequence
@@ -168,8 +168,8 @@ EXTERN OOStkCmdStat ooStopMonitor(void);
* @return Text description corresponding to the code.
*/
EXTERN const char* ooGetStkCmdStatusCodeTxt(OOStkCmdStat stat);
-/**
- * @}
+/**
+ * @}
*/
EXTERN OOStkCmdStat ooRequestChangeMode(const char *callToken, int isT38Mode);
diff --git a/addons/ooh323c/src/ooTimer.c b/addons/ooh323c/src/ooTimer.c
index efb863ef4..226ec9130 100644
--- a/addons/ooh323c/src/ooTimer.c
+++ b/addons/ooh323c/src/ooTimer.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 LICENSE.txt 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 LICENSE.txt 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.
*
*****************************************************************************/
@@ -29,13 +29,13 @@
#endif
/**
- * This is a timer list used by test application chansetup only.
+ * This is a timer list used by test application chansetup only.
*/
DList g_TimerList;
-OOTimer* ooTimerCreate
-(OOCTXT* pctxt, DList *pList, OOTimerCbFunc cb, OOUINT32 deltaSecs, void *data,
+OOTimer* ooTimerCreate
+(OOCTXT* pctxt, DList *pList, OOTimerCbFunc cb, OOUINT32 deltaSecs, void *data,
OOBOOL reRegister)
{
OOTimer* pTimer = (OOTimer*) memAlloc (pctxt, sizeof(OOTimer));
@@ -108,7 +108,7 @@ void ooTimerFireExpired (OOCTXT* pctxt, DList *pList)
if (ooTimerExpired (pTimer)) {
/*
* Re-register before calling callback function in case it is
- * a long duration callback.
+ * a long duration callback.
*/
if (pTimer->reRegister) ooTimerReset (pctxt, pList, pTimer);
@@ -150,8 +150,8 @@ struct timeval* ooTimerNextTimeout (DList *pList, struct timeval* ptimeout)
ooGetTimeOfDay (&tvstr, 0);
- ptimeout->tv_sec =
- OOMAX ((int) 0, (int) (ptimer->expireTime.tv_sec - tvstr.tv_sec));
+ ptimeout->tv_sec =
+ OOMAX ((int) 0, (int) (ptimer->expireTime.tv_sec - tvstr.tv_sec));
ptimeout->tv_usec = ptimer->expireTime.tv_usec - tvstr.tv_usec;
@@ -166,7 +166,7 @@ struct timeval* ooTimerNextTimeout (DList *pList, struct timeval* ptimeout)
return (ptimeout);
}
-/*
+/*
* Reregister a timer entry. This function is responsible for moving
* the current pointer in the timer list to the next element to be
* processed..
diff --git a/addons/ooh323c/src/ooTimer.h b/addons/ooh323c/src/ooTimer.h
index 2283ba4d9..66d9f6faf 100644
--- a/addons/ooh323c/src/ooTimer.h
+++ b/addons/ooh323c/src/ooTimer.h
@@ -1,20 +1,20 @@
/*
* 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 LICENSE.txt 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 LICENSE.txt 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.
*
*****************************************************************************/
-/**
- * @file ooTimer.h
+/**
+ * @file ooTimer.h
* Timer structures and functions.
*/
#ifndef _OOTIMER_H_
@@ -41,7 +41,7 @@ extern "C" {
#endif
/**
- * This function computes the relative expiration time from the current
+ * This function computes the relative expiration time from the current
* time for the given timer object.
*
* @param pTimer Pointer to timer object.
@@ -59,7 +59,7 @@ EXTERN void ooTimerComputeExpireTime (OOTimer* pTimer);
* @param reRegister Should timer be re-registered after it expires?
* @return Pointer to created timer object.
*/
-EXTERN OOTimer* ooTimerCreate
+EXTERN OOTimer* ooTimerCreate
(OOCTXT* pctxt, DList *pList, OOTimerCbFunc cb, OOUINT32 deltaSecs, void *data,
OOBOOL reRegister);
@@ -80,13 +80,13 @@ EXTERN void ooTimerDelete (OOCTXT* pctxt, DList* pList, OOTimer* pTimer);
EXTERN OOBOOL ooTimerExpired (OOTimer* pTimer);
/**
- * This function loops through the global timer list and fires all
+ * This function loops through the global timer list and fires all
* expired timers by calling the registered callback functions.
*/
EXTERN void ooTimerFireExpired (OOCTXT* pctxt, DList* pList);
/**
- * This function inserts the given timer object into the correct
+ * This function inserts the given timer object into the correct
* chronological position in the global timer list.
* @param pctxt Pointer to OOCTXT structure used for memory allocation.
* @param pList List in which timer has to be inserted.
@@ -96,7 +96,7 @@ EXTERN void ooTimerFireExpired (OOCTXT* pctxt, DList* pList);
EXTERN int ooTimerInsertEntry (OOCTXT* pctxt, DList* pList, OOTimer* pTimer);
/**
- * This function calculates the relative time from the current time
+ * This function calculates the relative time from the current time
* that the first timer in global timer list will expire.
* @param pList Handle to timer list
* @param ptimeout timeval structure to receive timeout value.
@@ -105,7 +105,7 @@ EXTERN int ooTimerInsertEntry (OOCTXT* pctxt, DList* pList, OOTimer* pTimer);
EXTERN struct timeval* ooTimerNextTimeout (DList* pList, struct timeval* ptimeout);
/**
- * This function resets the given timer object if its reregister flag
+ * This function resets the given timer object if its reregister flag
* is set. Otherwise, it is deleted.
* @param pctxt Pointer to OOCTXT structre used for memory allocation.
* @param pList Pointer to timer list.
diff --git a/addons/ooh323c/src/ooUtils.c b/addons/ooh323c/src/ooUtils.c
index 7b5321b6d..c71933cb7 100644
--- a/addons/ooh323c/src/ooUtils.c
+++ b/addons/ooh323c/src/ooUtils.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.
*
*****************************************************************************/
@@ -30,7 +30,7 @@ OOBOOL ooUtilsIsStrEmpty (const char* str)
}
-OOBOOL ooIsDailedDigit(const char* str)
+OOBOOL ooIsDailedDigit(const char* str)
{
if(str == NULL || *str =='\0') { return FALSE; }
while(*str != '\0')
diff --git a/addons/ooh323c/src/ooUtils.h b/addons/ooh323c/src/ooUtils.h
index 1a84dd42e..78aee325c 100644
--- a/addons/ooh323c/src/ooUtils.h
+++ b/addons/ooh323c/src/ooUtils.h
@@ -1,21 +1,21 @@
/*
* 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.
*
*****************************************************************************/
/**
- * @file ooUtils.h
- * This file contains general utility functions.
+ * @file ooUtils.h
+ * This file contains general utility functions.
*/
#ifndef _OOUTILS_H_
#define _OOUTILS_H_
@@ -29,11 +29,11 @@
* @param tabsiz Number of items in the table
* @return Text for item or '?' if idx outside bounds of table
*/
-EXTERN const char* ooUtilsGetText
+EXTERN const char* ooUtilsGetText
(OOUINT32 idx, const char** table, size_t tabsiz);
/**
- * Test if given string value is empty. String is considered to empty
+ * Test if given string value is empty. String is considered to empty
* if value is NULL or there are no characters in string (strlen == 0).
*
* @param str String to test
@@ -43,7 +43,7 @@ EXTERN OOBOOL ooUtilsIsStrEmpty (const char * str);
/**
- * Test if given string value is digit string.
+ * Test if given string value is digit string.
*
* @param str String to test
* @return TRUE if string contains all digits; FALSE otherwise
diff --git a/addons/ooh323c/src/ooasn1.h b/addons/ooh323c/src/ooasn1.h
index e75ff6d63..8355c54d0 100644
--- a/addons/ooh323c/src/ooasn1.h
+++ b/addons/ooh323c/src/ooasn1.h
@@ -1,22 +1,22 @@
/*
* Copyright (C) 1997-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.
*
*****************************************************************************/
-/**
- * @file ooasn1.h
+/**
+ * @file ooasn1.h
* Common ASN.1 runtime constants, data structure definitions, and run-time
- * functions to support ASN.1 PER encoding/decoding as defined in the
+ * functions to support ASN.1 PER encoding/decoding as defined in the
* ITU-T standards.
*/
#ifndef _OOASN1_H_
@@ -31,8 +31,8 @@
#include <stddef.h>
#include "dlist.h"
#include "ootrace.h"
-/**
- * @defgroup cruntime C Runtime Common Functions
+/**
+ * @defgroup cruntime C Runtime Common Functions
* @{
*/
@@ -237,7 +237,7 @@ defined(_WIN32)
#elif defined(__IBMC__) || defined(__GNUC__) || defined(__SUNPRO_C) || \
defined(__SUNPRO_CC) || defined(__CC_ARM) || \
-defined(__HPUX_CC__) || defined(__HP_aCC)
+defined(__HPUX_CC__) || defined(__HP_aCC)
#define ASN1INT64 long long
#else /* !MSC_VER && !__IBMC__ etc */
@@ -423,7 +423,7 @@ typedef struct OOCTXT { /* context block */
#endif
/**
- * @defgroup mem Memory Allocation Macros and Functions
+ * @defgroup mem Memory Allocation Macros and Functions
* @ingroup cruntime
*
* Memory allocation functions and macros handle memory management for the
@@ -570,7 +570,7 @@ decodeConstrainedStringEx (pctxt, pvalue, permCharSet, 8, 7, 7)
/* Context management functions */
/**
- * @defgroup cmfun Context Management Functions
+ * @defgroup cmfun Context Management Functions
* @{
*
* Context initialization functions handle the allocation, initialization, and
@@ -601,7 +601,7 @@ decodeConstrainedStringEx (pctxt, pvalue, permCharSet, 8, 7, 7)
* - 0 (ASN_OK) = success,
* - negative return value is error.
*/
-EXTERN int initContextBuffer
+EXTERN int initContextBuffer
(OOCTXT* pctxt, const ASN1OCTET* bufaddr, ASN1UINT bufsiz);
/**
@@ -643,17 +643,17 @@ EXTERN int initSubContext (OOCTXT* pctxt, OOCTXT* psrc);
EXTERN void setCtxtFlag (OOCTXT* pctxt, ASN1USINT mask);
EXTERN void clearCtxtFlag (OOCTXT* pctxt, ASN1USINT mask);
-EXTERN int setPERBuffer
+EXTERN int setPERBuffer
(OOCTXT* pctxt, ASN1OCTET* bufaddr, ASN1UINT bufsiz, ASN1BOOL aligned);
EXTERN int setPERBufferUsingCtxt (OOCTXT* pTarget, OOCTXT* pSource);
#define ZEROCONTEXT(pctxt) memset(pctxt,0,sizeof(OOCTXT))
-/**
+/**
* @} cmfun
*/
/**
- * @defgroup errfp Error Formatting and Print Functions
+ * @defgroup errfp Error Formatting and Print Functions
* @{
*
* Error formatting and print functions allow information about the
@@ -691,7 +691,7 @@ EXTERN int errAddIntParm (ASN1ErrInfo* pErrInfo, int errParm);
* @param errprm_p The typed error parameter.
* @return The status of the operation.
*/
-EXTERN int errAddStrParm (ASN1ErrInfo* pErrInfo,
+EXTERN int errAddStrParm (ASN1ErrInfo* pErrInfo,
const char* errprm_p);
/**
@@ -711,7 +711,7 @@ EXTERN int errAddStrParm (ASN1ErrInfo* pErrInfo,
EXTERN int errAddUIntParm (ASN1ErrInfo* pErrInfo, unsigned int errParm);
-EXTERN int errCopyData (ASN1ErrInfo* pSrcErrInfo,
+EXTERN int errCopyData (ASN1ErrInfo* pSrcErrInfo,
ASN1ErrInfo* pDestErrInfo);
/**
@@ -764,7 +764,7 @@ EXTERN void errPrint (ASN1ErrInfo* pErrInfo);
*/
EXTERN int errReset (ASN1ErrInfo* pErrInfo);
-/**
+/**
* This function sets error information in an error information structure. The
* information set includes status code, module name, and line number. Location
* information (i.e. module name and line number) is pushed onto a stack within
@@ -787,7 +787,7 @@ EXTERN int errReset (ASN1ErrInfo* pErrInfo);
* information and return the status value in one line of
* code.
*/
-EXTERN int errSetData (ASN1ErrInfo* pErrInfo, int status,
+EXTERN int errSetData (ASN1ErrInfo* pErrInfo, int status,
const char* module, int lno);
#ifndef _COMPACT
@@ -802,8 +802,8 @@ errSetData(&(ctxt)->errInfo,stat,__FILE__,__LINE__)
#define LOG_ASN1ERR_AND_FREE(pctxt,stat,lctxt) \
freeContext ((lctxt)), LOG_ASN1ERR(pctxt, stat)
-/**
- * @}
+/**
+ * @}
*/
#define RT_MH_DONTKEEPFREE 0x1
@@ -819,12 +819,12 @@ freeContext ((lctxt)), LOG_ASN1ERR(pctxt, stat)
* @{
*/
/**
- * Allocate memory. This macro allocates the given number of bytes. It is
+ * Allocate memory. This macro allocates the given number of bytes. It is
* similar to the C \c malloc run-time function.
- *
+ *
* @param pctxt - Pointer to a context block
* @param nbytes - Number of bytes of memory to allocate
- * @return - Void pointer to allocated memory or NULL if insufficient memory
+ * @return - Void pointer to allocated memory or NULL if insufficient memory
* was available to fulfill the request.
*/
#define memAlloc(pctxt,nbytes) \
@@ -833,41 +833,41 @@ memHeapAlloc(&(pctxt)->pTypeMemHeap,nbytes)
/**
* Allocate and zero memory. This macro allocates the given number of bytes
* and then initializes the memory block to zero.
- *
+ *
* @param pctxt - Pointer to a context block
* @param nbytes - Number of bytes of memory to allocate
- * @return - Void pointer to allocated memory or NULL if insufficient memory
+ * @return - Void pointer to allocated memory or NULL if insufficient memory
* was available to fulfill the request.
*/
#define memAllocZ(pctxt,nbytes) \
memHeapAllocZ(&(pctxt)->pTypeMemHeap,nbytes)
/**
- * Reallocate memory. This macro reallocates a memory block (either
- * expands or contracts) to the given number of bytes. It is
+ * Reallocate memory. This macro reallocates a memory block (either
+ * expands or contracts) to the given number of bytes. It is
* similar to the C \c realloc run-time function.
- *
+ *
* @param pctxt - Pointer to a context block
- * @param mem_p - Pointer to memory block to reallocate. This must have been
+ * @param mem_p - Pointer to memory block to reallocate. This must have been
* allocated using the memHeapAlloc macro or the memHeapAlloc function.
- * @param nbytes - Number of bytes of memory to which the block is to be
+ * @param nbytes - Number of bytes of memory to which the block is to be
* resized.
- * @return - Void pointer to allocated memory or NULL if insufficient memory
- * was available to fulfill the request. This may be the same as the pmem
+ * @return - Void pointer to allocated memory or NULL if insufficient memory
+ * was available to fulfill the request. This may be the same as the pmem
* pointer that was passed in if the block did not need to be relocated.
*/
#define memRealloc(pctxt,mem_p,nbytes) \
memHeapRealloc(&(pctxt)->pTypeMemHeap, (void*)mem_p, nbytes)
/**
- * Free memory pointer. This macro frees memory at the given pointer.
- * The memory must have been allocated using the memHeapAlloc (or similar)
- * macros or the mem memory allocation macros. This macro is
+ * Free memory pointer. This macro frees memory at the given pointer.
+ * The memory must have been allocated using the memHeapAlloc (or similar)
+ * macros or the mem memory allocation macros. This macro is
* similar to the C \c free function.
- *
+ *
* @param pctxt - Pointer to a context block
- * @param mem_p - Pointer to memory block to free. This must have
- * been allocated using the memHeapAlloc or memAlloc macro or the
+ * @param mem_p - Pointer to memory block to free. This must have
+ * been allocated using the memHeapAlloc or memAlloc macro or the
* memHeapAlloc function.
*/
#define memFreePtr(pctxt,mem_p) \
@@ -875,34 +875,34 @@ if (memHeapCheckPtr (&(pctxt)->pTypeMemHeap, (void*)mem_p)) \
memHeapFreePtr(&(pctxt)->pTypeMemHeap, (void*)mem_p)
/**
- * Free memory associated with a context. This macro frees all memory
- * held within a context. This is all memory allocated using the
- * memHeapAlloc (and similar macros) and the mem memory allocation
+ * Free memory associated with a context. This macro frees all memory
+ * held within a context. This is all memory allocated using the
+ * memHeapAlloc (and similar macros) and the mem memory allocation
* functions using the given context variable.
- *
+ *
* @param pctxt - Pointer to a context block
*/
#define memFree(pctxt) \
memHeapFreeAll(&(pctxt)->pTypeMemHeap)
/**
- * Reset memory associated with a context. This macro resets all memory
- * held within a context. This is all memory allocated using the memHeapAlloc
- * (and similar macros) and the mem memory allocation functions using the
+ * Reset memory associated with a context. This macro resets all memory
+ * held within a context. This is all memory allocated using the memHeapAlloc
+ * (and similar macros) and the mem memory allocation functions using the
* given context variable.
*
- * <p>The difference between this and the ASN1MEMFREE macro is that the
- * memory blocks held within the context are not actually freed. Internal
- * pointers are reset so the existing blocks can be reused. This can
- * provide a performace improvement for repetitive tasks such as decoding
+ * <p>The difference between this and the ASN1MEMFREE macro is that the
+ * memory blocks held within the context are not actually freed. Internal
+ * pointers are reset so the existing blocks can be reused. This can
+ * provide a performace improvement for repetitive tasks such as decoding
* messages in a loop.
- *
+ *
* @param pctxt - Pointer to a context block
*/
#define memReset(pctxt) \
memHeapReset(&(pctxt)->pTypeMemHeap)
-/* Alias for __cdecl modifier; if __cdecl keyword is not supported,
+/* Alias for __cdecl modifier; if __cdecl keyword is not supported,
* redefine it as empty macro. */
#if !defined(OSCDECL)
@@ -931,10 +931,10 @@ EXTERN void* memHeapRealloc (void** ppvMemHeap, void* mem_p, int nbytes_);
EXTERN void memHeapRelease (void** ppvMemHeap);
EXTERN void memHeapReset (void** ppvMemHeap);
-EXTERN void* memHeapMarkSaved
+EXTERN void* memHeapMarkSaved
(void** ppvMemHeap, const void* mem_p, ASN1BOOL saved);
-EXTERN void memHeapSetProperty
+EXTERN void memHeapSetProperty
(void** ppvMemHeap, ASN1UINT propId, void* pProp);
@@ -1049,7 +1049,7 @@ csetvar.charSetAlignedBits = abits;
* - 0 (ASN_OK) = success,
* - negative return value is error.
*/
-EXTERN int decodeBits
+EXTERN int decodeBits
(OOCTXT* pctxt, ASN1UINT* pvalue, ASN1UINT nbits);
/**
@@ -1072,7 +1072,7 @@ EXTERN int decodeBits
* - 0 (ASN_OK) = success,
* - negative return value is error.
*/
-EXTERN int decodeBitString
+EXTERN int decodeBitString
(OOCTXT* pctxt, ASN1UINT* numbits_p, ASN1OCTET* buffer,
ASN1UINT bufsiz);
@@ -1100,7 +1100,7 @@ EXTERN int decodeBitString
* - 0 (ASN_OK) = success,
* - negative return value is error.
*/
-EXTERN int decodeBMPString
+EXTERN int decodeBMPString
(OOCTXT* pctxt, ASN1BMPString* pvalue, Asn116BitCharSet* permCharSet);
/**
@@ -1128,7 +1128,7 @@ EXTERN int decodeByteAlign (OOCTXT* pctxt);
* - 0 (ASN_OK) = success,
* - negative return value is error.
*/
-EXTERN int decodeConsInteger
+EXTERN int decodeConsInteger
(OOCTXT* pctxt, ASN1INT* pvalue, ASN1INT lower, ASN1INT upper);
/**
@@ -1144,7 +1144,7 @@ EXTERN int decodeConsInteger
* - 0 (ASN_OK) = success,
* - negative return value is error.
*/
-EXTERN int decodeConsUnsigned
+EXTERN int decodeConsUnsigned
(OOCTXT* pctxt, ASN1UINT* pvalue, ASN1UINT lower, ASN1UINT upper);
/**
@@ -1160,7 +1160,7 @@ EXTERN int decodeConsUnsigned
* - 0 (ASN_OK) = success,
* - negative return value is error.
*/
-EXTERN int decodeConsUInt8 (OOCTXT* pctxt,
+EXTERN int decodeConsUInt8 (OOCTXT* pctxt,
ASN1UINT8* pvalue, ASN1UINT lower, ASN1UINT upper);
/**
@@ -1176,7 +1176,7 @@ EXTERN int decodeConsUInt8 (OOCTXT* pctxt,
* - 0 (ASN_OK) = success,
* - negative return value is error.
*/
-EXTERN int decodeConsUInt16
+EXTERN int decodeConsUInt16
(OOCTXT* pctxt, ASN1USINT* pvalue, ASN1UINT lower, ASN1UINT upper);
/**
@@ -1196,7 +1196,7 @@ EXTERN int decodeConsUInt16
* - 0 (ASN_OK) = success,
* - negative return value is error.
*/
-EXTERN int decodeConsWholeNumber
+EXTERN int decodeConsWholeNumber
(OOCTXT* pctxt, ASN1UINT* padjusted_value, ASN1UINT range_value);
/**
@@ -1218,7 +1218,7 @@ EXTERN int decodeConsWholeNumber
* - 0 (ASN_OK) = success,
* - negative return value is error.
*/
-EXTERN int decodeConstrainedStringEx
+EXTERN int decodeConstrainedStringEx
(OOCTXT* pctxt, const char** string, const char* charSet,
ASN1UINT abits, ASN1UINT ubits, ASN1UINT canSetBits);
@@ -1262,7 +1262,7 @@ EXTERN int decodeDynBitString (OOCTXT* pctxt, ASN1DynBitStr* pBitStr);
* - 0 (ASN_OK) = success,
* - negative return value is error.
*/
-EXTERN int decodeDynOctetString
+EXTERN int decodeDynOctetString
(OOCTXT* pctxt, ASN1DynOctStr* pOctStr);
/**
@@ -1321,14 +1321,14 @@ EXTERN int decodeObjectIdentifier (OOCTXT* pctxt, ASN1OBJID* pvalue);
* - 0 (ASN_OK) = success,
* - negative return value is error.
*/
-EXTERN int decodeOctetString
+EXTERN int decodeOctetString
(OOCTXT* pctxt, ASN1UINT* numocts_p, ASN1OCTET* buffer,
ASN1UINT bufsiz);
/**
* This function will decode an ASN.1 open type. This used to be the ASN.1 ANY
- * type, but now is used in a variety of applications requiring an encoding
- * that can be interpreted by a decoder without prior knowledge of the type
+ * type, but now is used in a variety of applications requiring an encoding
+ * that can be interpreted by a decoder without prior knowledge of the type
* of the variable.
*
* @param pctxt Pointer to a context structure. This provides a storage
@@ -1342,7 +1342,7 @@ EXTERN int decodeOctetString
* - 0 (ASN_OK) = success,
* - negative return value is error.
*/
-EXTERN int decodeOpenType
+EXTERN int decodeOpenType
(OOCTXT* pctxt, const ASN1OCTET** object_p2, ASN1UINT* numocts_p);
/**
@@ -1360,7 +1360,7 @@ EXTERN int decodeOpenType
* - 0 (ASN_OK) = success,
* - negative return value is error.
*/
-EXTERN int decodeSmallNonNegWholeNumber
+EXTERN int decodeSmallNonNegWholeNumber
(OOCTXT* pctxt, ASN1UINT* pvalue);
/**
@@ -1374,7 +1374,7 @@ EXTERN int decodeSmallNonNegWholeNumber
* - 0 (ASN_OK) = success,
* - negative return value is error.
*/
-EXTERN int decodeSemiConsInteger
+EXTERN int decodeSemiConsInteger
(OOCTXT* pctxt, ASN1INT* pvalue, ASN1INT lower);
/**
@@ -1389,7 +1389,7 @@ EXTERN int decodeSemiConsInteger
* - 0 (ASN_OK) = success,
* - negative return value is error.
*/
-EXTERN int decodeSemiConsUnsigned
+EXTERN int decodeSemiConsUnsigned
(OOCTXT* pctxt, ASN1UINT* pvalue, ASN1UINT lower);
/**
@@ -1420,7 +1420,7 @@ decodeSemiConsUnsigned(pctxt, pvalue, 0U)
EXTERN int decodeVarWidthCharString (OOCTXT* pctxt, const char** pvalue);
/**
- * This function will encode a variable of the ASN.1 BOOLEAN type in
+ * This function will encode a variable of the ASN.1 BOOLEAN type in
* a single bit.
*
* @param pctxt Pointer to a context structure. This provides a storage
@@ -1440,7 +1440,7 @@ EXTERN int encodeBit (OOCTXT* pctxt, ASN1BOOL value);
* - 0 (ASN_OK) = success,
* - negative return value is error.
*/
-EXTERN int encodeBits
+EXTERN int encodeBits
(OOCTXT* pctxt, ASN1UINT value, ASN1UINT nbits);
/**
@@ -1456,7 +1456,7 @@ EXTERN int encodeBits
* - 0 (ASN_OK) = success,
* - negative return value is error.
*/
-EXTERN int encodeBitString
+EXTERN int encodeBitString
(OOCTXT* pctxt, ASN1UINT numocts, const ASN1OCTET* data);
/**
@@ -1482,7 +1482,7 @@ EXTERN int encodeBitString
* - 0 (ASN_OK) = success,
* - negative return value is error.
*/
-EXTERN int encodeBMPString
+EXTERN int encodeBMPString
(OOCTXT* pctxt, ASN1BMPString value, Asn116BitCharSet* permCharSet);
/**
@@ -1532,7 +1532,7 @@ EXTERN int encodeCheckBuffer (OOCTXT* pctxt, ASN1UINT nbytes);
* - 0 (ASN_OK) = success,
* - negative return value is error.
*/
-EXTERN int encodeConstrainedStringEx
+EXTERN int encodeConstrainedStringEx
(OOCTXT* pctxt, const char* string, const char* charSet,
ASN1UINT abits, ASN1UINT ubits, ASN1UINT canSetBits);
@@ -1548,7 +1548,7 @@ EXTERN int encodeConstrainedStringEx
* - 0 (ASN_OK) = success,
* - negative return value is error.
*/
-EXTERN int encodeConsInteger
+EXTERN int encodeConsInteger
(OOCTXT* pctxt, ASN1INT value, ASN1INT lower, ASN1INT upper);
/**
@@ -1566,7 +1566,7 @@ EXTERN int encodeConsInteger
* - 0 (ASN_OK) = success,
* - negative return value is error.
*/
-EXTERN int encodeConsUnsigned
+EXTERN int encodeConsUnsigned
(OOCTXT* pctxt, ASN1UINT value, ASN1UINT lower, ASN1UINT upper);
/**
@@ -1584,7 +1584,7 @@ EXTERN int encodeConsUnsigned
* - 0 (ASN_OK) = success,
* - negative return value is error.
*/
-EXTERN int encodeConsWholeNumber
+EXTERN int encodeConsWholeNumber
(OOCTXT* pctxt, ASN1UINT adjusted_value, ASN1UINT range_value);
/**
@@ -1608,7 +1608,7 @@ EXTERN int encodeExpandBuffer (OOCTXT* pctxt, ASN1UINT nbytes);
* to get the pointer and length of the message. It is normally used when
* dynamic encoding is specified because the message pointer is not known until
* encoding is complete. If static encoding is used, the message starts at the
- * beginning of the specified buffer adn the encodeGetMsgLen function can be
+ * beginning of the specified buffer adn the encodeGetMsgLen function can be
* used to obtain the lenght of the message.
*
* @param pctxt Pointer to a context structure. This provides a storage
@@ -1675,7 +1675,7 @@ EXTERN int encodebitsFromOctet (OOCTXT* pctxt, ASN1OCTET value, ASN1UINT nbits);
* - 0 (ASN_OK) = success,
* - negative return value is error.
*/
-EXTERN int encodeOctets
+EXTERN int encodeOctets
(OOCTXT* pctxt, const ASN1OCTET* pvalue, ASN1UINT nbits);
/**
@@ -1690,7 +1690,7 @@ EXTERN int encodeOctets
* - 0 (ASN_OK) = success,
* - negative return value is error.
*/
-EXTERN int encodeOctetString
+EXTERN int encodeOctetString
(OOCTXT* pctxt, ASN1UINT numocts, const ASN1OCTET* data);
/**
@@ -1708,7 +1708,7 @@ EXTERN int encodeOctetString
* - 0 (ASN_OK) = success,
* - negative return value is error.
*/
-EXTERN int encodeOpenType
+EXTERN int encodeOpenType
(OOCTXT* pctxt, ASN1UINT numocts, const ASN1OCTET* data);
/**
@@ -1729,10 +1729,10 @@ EXTERN int encodeOpenType
* - 0 (ASN_OK) = success,
* - negative return value is error.
*/
-EXTERN int encodeOpenTypeExt
+EXTERN int encodeOpenTypeExt
(OOCTXT* pctxt, DList* pElemList);
-EXTERN int encodeOpenTypeExtBits
+EXTERN int encodeOpenTypeExtBits
(OOCTXT* pctxt, DList* pElemList);
/**
@@ -1762,7 +1762,7 @@ EXTERN int encodeSmallNonNegWholeNumber (OOCTXT* pctxt, ASN1UINT value);
* - 0 (ASN_OK) = success,
* - negative return value is error.
*/
-EXTERN int encodeSemiConsInteger
+EXTERN int encodeSemiConsInteger
(OOCTXT* pctxt, ASN1INT value, ASN1INT lower);
/**
@@ -1776,7 +1776,7 @@ EXTERN int encodeSemiConsInteger
* - 0 (ASN_OK) = success,
* - negative return value is error.
*/
-EXTERN int encodeSemiConsUnsigned
+EXTERN int encodeSemiConsUnsigned
(OOCTXT* pctxt, ASN1UINT value, ASN1UINT lower);
/**
@@ -1791,15 +1791,15 @@ EXTERN int encodeSemiConsUnsigned
#define encodeUnconsInteger(pctxt,value) \
encodeSemiConsInteger(pctxt,value,ASN1INT_MIN)
-EXTERN int encodeVarWidthCharString (OOCTXT* pctxt, const char* value);
+EXTERN int encodeVarWidthCharString (OOCTXT* pctxt, const char* value);
EXTERN int addSizeConstraint (OOCTXT* pctxt, Asn1SizeCnst* pSize);
-EXTERN ASN1BOOL alignCharStr
+EXTERN ASN1BOOL alignCharStr
(OOCTXT* pctxt, ASN1UINT len, ASN1UINT nbits, Asn1SizeCnst* pSize);
-EXTERN int bitAndOctetStringAlignmentTest
-(Asn1SizeCnst* pSizeList, ASN1UINT itemCount,
+EXTERN int bitAndOctetStringAlignmentTest
+(Asn1SizeCnst* pSizeList, ASN1UINT itemCount,
ASN1BOOL bitStrFlag, ASN1BOOL* pAlignFlag);
EXTERN int getPERMsgLen (OOCTXT* pctxt);
@@ -1811,20 +1811,20 @@ EXTERN Asn1SizeCnst* getSizeConstraint (OOCTXT* pctxt, ASN1BOOL extbit);
EXTERN int checkSizeConstraint(OOCTXT* pctxt, int size);
EXTERN ASN1UINT getUIntBitCount (ASN1UINT value);
-EXTERN Asn1SizeCnst* checkSize
+EXTERN Asn1SizeCnst* checkSize
(Asn1SizeCnst* pSizeList, ASN1UINT value, ASN1BOOL* pExtendable);
-EXTERN void init16BitCharSet
+EXTERN void init16BitCharSet
(Asn116BitCharSet* pCharSet, ASN116BITCHAR first,
ASN116BITCHAR last, ASN1UINT abits, ASN1UINT ubits);
EXTERN ASN1BOOL isExtendableSize (Asn1SizeCnst* pSizeList);
-EXTERN void set16BitCharSet
+EXTERN void set16BitCharSet
(OOCTXT* pctxt, Asn116BitCharSet* pCharSet, Asn116BitCharSet* pAlphabet);
#ifdef __cplusplus
}
#endif
-#endif
+#endif
diff --git a/addons/ooh323c/src/oochannels.c b/addons/ooh323c/src/oochannels.c
index 0501882a9..ca7b09c99 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;
-}
+}
diff --git a/addons/ooh323c/src/oochannels.h b/addons/ooh323c/src/oochannels.h
index 76ce8ef30..9d3ecd58b 100644
--- a/addons/ooh323c/src/oochannels.h
+++ b/addons/ooh323c/src/oochannels.h
@@ -1,22 +1,22 @@
/*
* 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.
*
*****************************************************************************/
/**
- * @file oochannels.h
- * This file contains functions to create and use channels.
+ * @file oochannels.h
+ * This file contains functions to create and use channels.
*/
#ifndef _OOCHANNELS_H_
#define _OOCHANNELS_H_
@@ -46,7 +46,7 @@ extern "C" {
struct OOH323CallData;
struct Q931Message;
-/**
+/**
* @defgroup channels Channel Management
* @{
*/
@@ -60,7 +60,7 @@ EXTERN int ooCreateH323Listener(void);
/**
* This function is used to create a listener for incoming H.245 connections.
* @param call Pointer to call for which H.245 listener has to be created
- *
+ *
* @return OO_OK, on success. OO_FAILED, on failure.
*/
EXTERN int ooCreateH245Listener(struct OOH323CallData *call);
@@ -75,7 +75,7 @@ EXTERN int ooCloseH245Listener(struct OOH323CallData *call);
/**
* This function is used to accept incoming H.225 connections.
- *
+ *
* @return OO_OK, on success. OO_FAILED, on failure.
*/
EXTERN int ooAcceptH225Connection(void);
@@ -84,16 +84,16 @@ EXTERN int ooAcceptH225Connection(void);
* This function is used to accept an incoming H.245 connection.
* @param call Pointer to a call for which H.245 connection request has
* arrived.
- *
+ *
* @return OO_OK, on succes. OO_FAILED, on failure.
*/
EXTERN int ooAcceptH245Connection(struct OOH323CallData *call);
/**
* This function is used to create an H.225 connection to the remote end point.
- * @param call Pointer to the call for which H.225 connection has to be
+ * @param call Pointer to the call for which H.225 connection has to be
* setup.
- * @return OO_OK, on succes. OO_FAILED, on failure.
+ * @return OO_OK, on succes. OO_FAILED, on failure.
*/
EXTERN int ooCreateH225Connection(struct OOH323CallData *call);
@@ -108,17 +108,17 @@ EXTERN int ooCreateH245Connection(struct OOH323CallData *call);
/**
* This function is used to close an H.225 connection
- * @param call Pointer to the call for which H.225 connection has to be
+ * @param call Pointer to the call for which H.225 connection has to be
* closed.
- *
+ *
* @return OO_OK, on success. OO_FAILED, on failure.
*/
EXTERN int ooCloseH225Connection(struct OOH323CallData *call);
/**
- * This function is used to close an H.245 connection for a call.
+ * This function is used to close an H.245 connection for a call.
*
- * @param call Pointer to call for which H.245 connection has
+ * @param call Pointer to call for which H.245 connection has
* to be closed.
* @return OO_OK, on success. OO_FAILED, on failure.
*/
@@ -127,7 +127,7 @@ EXTERN int ooCloseH245Connection(struct OOH323CallData *call);
/**
* This function is used to start monitoring channels for the calls. It has
* an infinite loop which uses select to monitor various channels.
- *
+ *
*/
EXTERN int ooMonitorChannels(void);
EXTERN int ooMonitorCmdChannels(void);
@@ -144,22 +144,22 @@ EXTERN void ooStopMonitorCallChannels(OOH323CallData *);
/**
* This function is used to receive an H.2250 message received on a calls
- * H.225 channel. It receives the message, decodes it and calls
+ * H.225 channel. It receives the message, decodes it and calls
* 'ooHandleH2250Message' to process the message.
- * @param call Pointer to the call for which the message has to be
+ * @param call Pointer to the call for which the message has to be
* received.
- *
+ *
* @return OO_OK, on success. OO_FAILED, on failure.
*/
EXTERN int ooH2250Receive(struct OOH323CallData *call);
/**
* This function is used to receive an H.245 message received on a calls
- * H.245 channel. It receives the message, decodes it and calls
+ * H.245 channel. It receives the message, decodes it and calls
* 'ooHandleH245Message' to process it.
- * @param call Pointer to the call for which the message has to be
+ * @param call Pointer to the call for which the message has to be
* received.
- *
+ *
* @return OO_OK, on success. OO_FAILED, on failure.
*/
EXTERN int ooH245Receive(struct OOH323CallData *call);
@@ -175,7 +175,7 @@ EXTERN int ooH245Receive(struct OOH323CallData *call);
EXTERN int ooSendH225Msg(struct OOH323CallData *call, struct Q931Message *msg);
/**
- * This function is used to Send a message on the channel, when channel is
+ * This function is used to Send a message on the channel, when channel is
* available for write.
* @param call Pointer to call for which message has to be sent.
* @param type Type of the message.
@@ -197,11 +197,11 @@ EXTERN int ooSendMsg(struct OOH323CallData *call, int type);
* @return OO_OK, on success. OO_FAILED, on failure
*/
EXTERN int ooOnSendMsg
- (struct OOH323CallData *call, int msgType, int tunneledMsgType,
+ (struct OOH323CallData *call, int msgType, int tunneledMsgType,
int associatedChan);
/**
- * This function is used to check the status of tcp connection.
+ * This function is used to check the status of tcp connection.
* @param call Handle to the call to which connection belongs.
* @param sock Connected socket.
*
@@ -209,11 +209,10 @@ EXTERN int ooOnSendMsg
*/
EXTERN OOBOOL ooChannelsIsConnectionOK(OOH323CallData *call, OOSOCKET sock);
-/**
- * @}
+/**
+ * @}
*/
#ifdef __cplusplus
}
#endif
#endif
-
diff --git a/addons/ooh323c/src/ooh245.c b/addons/ooh323c/src/ooh245.c
index 39b399452..adff91790 100644
--- a/addons/ooh323c/src/ooh245.c
+++ b/addons/ooh323c/src/ooh245.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.
*
*****************************************************************************/
@@ -55,7 +55,7 @@ int ooCreateH245Message(OOH323CallData* call, H245Message **pph245msg, int type)
switch(type)
{
case T_H245MultimediaSystemControlMessage_request:
- (*pph245msg)->h245Msg.u.request = (H245RequestMessage*)
+ (*pph245msg)->h245Msg.u.request = (H245RequestMessage*)
memAllocZ (pctxt, sizeof(H245RequestMessage));
/*Check for successful mem allocation, and if successful initialize
@@ -135,7 +135,7 @@ int ooFreeH245Message(OOH323CallData *call, H245Message *pmsg)
}
#ifndef _COMPACT
-static void ooPrintH245Message
+static void ooPrintH245Message
(OOH323CallData* call, ASN1OCTET* msgbuf, ASN1UINT msglen)
{
OOCTXT ctxt;
@@ -154,12 +154,12 @@ static void ooPrintH245Message
ret = asn1PD_H245MultimediaSystemControlMessage(&ctxt, &mmMsg);
if(ret != ASN_OK)
{
- OOTRACEERR3("Error decoding H245 message (%s, %s)\n",
+ OOTRACEERR3("Error decoding H245 message (%s, %s)\n",
call->callType, call->callToken);
OOTRACEERR1 (errGetText (&ctxt));
}
finishPrint();
- freeContext(&ctxt);
+ freeContext(&ctxt);
}
#endif
@@ -177,7 +177,7 @@ int ooEncodeH245Message
if(!msgbuf || size<200)
{
OOTRACEERR3("Error: Invalid message buffer/size for "
- "ooEncodeH245Message. (%s, %s)\n",
+ "ooEncodeH245Message. (%s, %s)\n",
call->callType, call->callToken);
return OO_FAILED;
}
@@ -188,7 +188,7 @@ int ooEncodeH245Message
/* This will contain the total length of the encoded message */
msgbuf[i++] = 0;
msgbuf[i++] = 0;
-
+
if(!OO_TESTFLAG (call->flags, OO_M_TUNNELING))
{
/* Populate message buffer to be returned */
@@ -196,25 +196,25 @@ int ooEncodeH245Message
msgbuf[i++] = 3; /* TPKT version */
msgbuf[i++] = 0; /* TPKT resevred */
/* 1st octet of length, will be populated once len is determined */
- msgbuf[i++] = 0;
+ msgbuf[i++] = 0;
/* 2nd octet of length, will be populated once len is determined */
msgbuf[i++] = 0;
}
-
+
setPERBuffer (pctxt, (unsigned char*) msgbuf+i, (size-i), TRUE);
/* stat = asn1PE_H245MultimediaSystemControlMessage (&gH323ep.msgctxt, */
- stat = asn1PE_H245MultimediaSystemControlMessage (call->msgctxt,
+ stat = asn1PE_H245MultimediaSystemControlMessage (call->msgctxt,
multimediaMsg);
if (stat != ASN_OK) {
- OOTRACEERR3 ("ERROR: H245 Message encoding failed (%s, %s)\n",
+ OOTRACEERR3 ("ERROR: H245 Message encoding failed (%s, %s)\n",
call->callType, call->callToken);
/* OOTRACEERR1 (errGetText (&gH323ep.msgctxt)); */
OOTRACEERR1 (errGetText (call->msgctxt));
return OO_FAILED;
}
-
+
encodePtr = encodeGetMsgPtr(pctxt, &encodeLen);
len +=encodeLen;
msgbuf[3] = (len>>8);
@@ -250,14 +250,14 @@ int ooSendH245Msg(OOH323CallData *call, H245Message *msg)
if(iRet != OO_OK)
{
- OOTRACEERR3("Error:Failed to encode H245 message. (%s, %s)\n",
+ OOTRACEERR3("Error:Failed to encode H245 message. (%s, %s)\n",
call->callType, call->callToken);
memFreePtr (call->pctxt, encodebuf);
return OO_FAILED;
}
if(!call->pH245Channel)
{
- call->pH245Channel =
+ call->pH245Channel =
(OOH323Channel*) memAllocZ (call->pctxt, sizeof(OOH323Channel));
if(!call->pH245Channel)
{
@@ -268,7 +268,7 @@ int ooSendH245Msg(OOH323CallData *call, H245Message *msg)
}
}
- /* We need to send EndSessionCommand immediately.*/
+ /* We need to send EndSessionCommand immediately.*/
if(!OO_TESTFLAG(call->flags, OO_M_TUNNELING)){
if(encodebuf[0]== OOEndSessionCommand) /* High priority message */
{
@@ -278,9 +278,9 @@ int ooSendH245Msg(OOH323CallData *call, H245Message *msg)
}
else{
dListAppend (call->pctxt, &call->pH245Channel->outQueue, encodebuf);
- OOTRACEDBGC4("Queued H245 messages %d. (%s, %s)\n",
- call->pH245Channel->outQueue.count,
- call->callType, call->callToken);
+ OOTRACEDBGC4("Queued H245 messages %d. (%s, %s)\n",
+ call->pH245Channel->outQueue.count,
+ call->callType, call->callToken);
}
}
else{
@@ -340,10 +340,10 @@ int ooSendTermCapMsg(OOH323CallData *call)
"progress. (%s, %s)\n", call->callType, call->callToken);
return OO_OK;
}
-
- ret = ooCreateH245Message(call, &ph245msg,
+
+ ret = ooCreateH245Message(call, &ph245msg,
T_H245MultimediaSystemControlMessage_request);
-
+
if(ret == OO_FAILED)
{
OOTRACEERR3("Error:Failed to create H245 message for Terminal "
@@ -363,16 +363,16 @@ int ooSendTermCapMsg(OOH323CallData *call)
call->callType, call->callToken);
return OO_FAILED;
}
-
+
request->t = T_H245RequestMessage_terminalCapabilitySet;
request->u.terminalCapabilitySet = (H245TerminalCapabilitySet*)
- memAlloc(pctxt, sizeof(H245TerminalCapabilitySet));
+ memAlloc(pctxt, sizeof(H245TerminalCapabilitySet));
termCap = request->u.terminalCapabilitySet;
memset(termCap, 0, sizeof(H245TerminalCapabilitySet));
termCap->m.multiplexCapabilityPresent = 0;
termCap->m.capabilityTablePresent = 1;
termCap->m.capabilityDescriptorsPresent = 1;
- termCap->sequenceNumber = ++(call->localTermCapSeqNo);
+ termCap->sequenceNumber = ++(call->localTermCapSeqNo);
termCap->protocolIdentifier = gh245ProtocolID; /* protocol id */
/* Initialize alternate sets */
@@ -394,7 +394,7 @@ int ooSendTermCapMsg(OOH323CallData *call)
/* Add audio Capabilities */
-
+
dListInit(&(termCap->capabilityTable));
for(k=0; k<(int)call->capPrefs.index; k++)
{
@@ -402,8 +402,8 @@ int ooSendTermCapMsg(OOH323CallData *call)
epCap = call->ourCaps;
else
epCap = gH323ep.myCaps;
- while(epCap) {
- if(epCap->cap == call->capPrefs.order[k])
+ while(epCap) {
+ if(epCap->cap == call->capPrefs.order[k])
break;
epCap = epCap->next;
}
@@ -417,8 +417,8 @@ int ooSendTermCapMsg(OOH323CallData *call)
if(epCap->capType == OO_CAP_TYPE_AUDIO)
{
- /* Create audio capability. If capability supports receive, we only
- add it as receive capability in TCS. However, if it supports only
+ /* Create audio capability. If capability supports receive, we only
+ add it as receive capability in TCS. However, if it supports only
transmit, we add it as transmit capability in TCS.
*/
if((epCap->dir & OORX))
@@ -431,7 +431,7 @@ int ooSendTermCapMsg(OOH323CallData *call)
if(!audioCap)
{
OOTRACEWARN4("WARN:Failed to create audio capability %s "
- "(%s, %s)\n", ooGetCapTypeText(epCap->cap),
+ "(%s, %s)\n", ooGetCapTypeText(epCap->cap),
call->callType, call->callToken);
continue;
}
@@ -447,11 +447,11 @@ int ooSendTermCapMsg(OOH323CallData *call)
"(%s, %s)\n", ooGetCapTypeText(epCap->cap),
call->callType, call->callToken);
continue;
- }
+ }
}
else{
OOTRACEWARN3("Warn:Capability is not RX/TX/RXANDTX. Symmetric "
- "capabilities are not supported.(%s, %s)\n",
+ "capabilities are not supported.(%s, %s)\n",
call->callType, call->callToken);
continue;
}
@@ -484,8 +484,8 @@ int ooSendTermCapMsg(OOH323CallData *call)
else if(epCap->capType == OO_CAP_TYPE_DATA)
{
- /* Create t.38 capability. If capability supports receive, we only
- add it as receive capability in TCS. However, if it supports only
+ /* Create t.38 capability. If capability supports receive, we only
+ add it as receive capability in TCS. However, if it supports only
transmit, we add it as transmit capability in TCS.
*/
if((epCap->dir & OORX) && !(epCap->dir & OOTX))
@@ -514,7 +514,7 @@ int ooSendTermCapMsg(OOH323CallData *call)
"(%s, %s)\n",
call->callType, call->callToken);
continue;
- }
+ }
}
else{
OOTRACEDBGC3("Sending transmit&recevie capability t38 in TCS.(%s, %s)\n",
@@ -526,7 +526,7 @@ int ooSendTermCapMsg(OOH323CallData *call)
"(%s, %s)\n",
call->callType, call->callToken);
continue;
- }
+ }
}
/* Add Capabilities to Capability Table */
entry = (H245CapabilityTableEntry*) memAlloc(pctxt,
@@ -581,11 +581,11 @@ int ooSendTermCapMsg(OOH323CallData *call)
"(%s, %s)\n", ooGetCapTypeText(epCap->cap),
call->callType, call->callToken);
continue;
- }
+ }
}
else{
OOTRACEWARN3("Warn:Capability is not RX/TX/RXANDTX. Symmetric "
- "capabilities are not supported.(%s, %s)\n",
+ "capabilities are not supported.(%s, %s)\n",
call->callType, call->callToken);
continue;
}
@@ -632,18 +632,18 @@ int ooSendTermCapMsg(OOH323CallData *call)
if(!entry)
{
OOTRACEERR3("Error:Failed to allocate memory for new capability "
- "table entry. (%s, %s)\n", call->callType,
+ "table entry. (%s, %s)\n", call->callType,
call->callToken);
ooFreeH245Message(call, ph245msg);
return OO_FAILED;
}
-
+
memset(entry, 0, sizeof(H245CapabilityTableEntry));
entry->m.capabilityPresent = 1;
entry->capability.t = T_H245Capability_receiveRTPAudioTelephonyEventCapability;
entry->capability.u.receiveRTPAudioTelephonyEventCapability = ateCap;
-
+
entry->capabilityTableEntryNumber = i+1;
dListAppend(pctxt , &(termCap->capabilityTable), entry);
altSetDtmf->elem[altSetDtmf->n] = i+1;
@@ -668,18 +668,18 @@ int ooSendTermCapMsg(OOH323CallData *call)
if(!entry)
{
OOTRACEERR3("Error:Failed to allocate memory for new capability "
- "table entry. (%s, %s)\n", call->callType,
+ "table entry. (%s, %s)\n", call->callType,
call->callToken);
ooFreeH245Message(call, ph245msg);
return OO_FAILED;
}
-
+
memset(entry, 0, sizeof(H245CapabilityTableEntry));
entry->m.capabilityPresent = 1;
entry->capability.t = T_H245Capability_receiveDataApplicationCapability;
entry->capability.u.receiveDataApplicationCapability = rtdCap;
-
+
entry->capabilityTableEntryNumber = i+1;
dListAppend(pctxt , &(termCap->capabilityTable), entry);
altSetDtmf->elem[altSetDtmf->n] = i+1;
@@ -704,18 +704,18 @@ int ooSendTermCapMsg(OOH323CallData *call)
if(!entry)
{
OOTRACEERR3("Error:Failed to allocate memory for new capability "
- "table entry. (%s, %s)\n", call->callType,
+ "table entry. (%s, %s)\n", call->callType,
call->callToken);
ooFreeH245Message(call, ph245msg);
return OO_FAILED;
}
-
+
memset(entry, 0, sizeof(H245CapabilityTableEntry));
entry->m.capabilityPresent = 1;
entry->capability.t = T_H245Capability_receiveAndTransmitUserInputCapability;
entry->capability.u.receiveAndTransmitUserInputCapability = userInputCap;
-
+
entry->capabilityTableEntryNumber = i+1;
dListAppend(pctxt , &(termCap->capabilityTable), entry);
altSetDtmf->elem[altSetDtmf->n] = i+1;
@@ -740,18 +740,18 @@ int ooSendTermCapMsg(OOH323CallData *call)
if(!entry)
{
OOTRACEERR3("Error:Failed to allocate memory for new capability "
- "table entry. (%s, %s)\n", call->callType,
+ "table entry. (%s, %s)\n", call->callType,
call->callToken);
ooFreeH245Message(call, ph245msg);
return OO_FAILED;
}
-
+
memset(entry, 0, sizeof(H245CapabilityTableEntry));
entry->m.capabilityPresent = 1;
entry->capability.t = T_H245Capability_receiveAndTransmitUserInputCapability;
entry->capability.u.receiveAndTransmitUserInputCapability = userInputCap;
-
+
entry->capabilityTableEntryNumber = i+1;
dListAppend(pctxt , &(termCap->capabilityTable), entry);
altSetDtmf->elem[altSetDtmf->n] = i+1;
@@ -761,7 +761,7 @@ int ooSendTermCapMsg(OOH323CallData *call)
}
}
-
+
/*TODO:Add Video and Data capabilities, if required*/
if(i==0)
{
@@ -770,7 +770,7 @@ int ooSendTermCapMsg(OOH323CallData *call)
ooFreeH245Message(call,ph245msg);
return OO_FAILED;
}
-
+
/* Define capability descriptior */
capDesc = (H245CapabilityDescriptor*)
memAlloc(pctxt, sizeof(H245CapabilityDescriptor));
@@ -790,7 +790,7 @@ int ooSendTermCapMsg(OOH323CallData *call)
memset(altSet, 0, sizeof(H245AlternativeCapabilitySet));
altSet->n = 1;
altSet->elem[0] = j+1;
-
+
dListAppend(pctxt, &(capDesc->simultaneousCapabilities), altSet);
} */
@@ -801,7 +801,7 @@ int ooSendTermCapMsg(OOH323CallData *call)
dListInit(&(termCap->capabilityDescriptors));
dListAppend(pctxt, &(termCap->capabilityDescriptors), capDesc);
- OOTRACEDBGA3("Built terminal capability set message (%s, %s)\n",
+ OOTRACEDBGA3("Built terminal capability set message (%s, %s)\n",
call->callType, call->callToken);
ret = ooSendH245Msg(call, ph245msg);
if(ret != OO_OK)
@@ -882,11 +882,11 @@ ASN1UINT ooGenerateStatusDeterminationNumber()
statusDeterminationNumber = rand()%16777215;
return statusDeterminationNumber;
}
-/* TODO: Should Send MasterSlave Release when no response from
+/* TODO: Should Send MasterSlave Release when no response from
Remote endpoint after MasterSlaveDetermination sent within
timeout.
*/
-int ooHandleMasterSlave(OOH323CallData *call, void * pmsg,
+int ooHandleMasterSlave(OOH323CallData *call, void * pmsg,
int msgType)
{
H245MasterSlaveDetermination *masterSlave;
@@ -898,10 +898,10 @@ int ooHandleMasterSlave(OOH323CallData *call, void * pmsg,
case OOMasterSlaveDetermination:
OOTRACEINFO3("Master Slave Determination received (%s, %s)\n",
call->callType, call->callToken);
-
+
masterSlave = (H245MasterSlaveDetermination*)pmsg;
- if(call->masterSlaveState != OO_MasterSlave_DetermineSent &&
+ if(call->masterSlaveState != OO_MasterSlave_DetermineSent &&
OO_TESTFLAG(gH323ep.flags, OO_M_TRYBEMASTER))
{
ooSendMasterSlaveDeterminationAck(call, "slave");
@@ -929,21 +929,21 @@ int ooHandleMasterSlave(OOH323CallData *call, void * pmsg,
/* Since term types are same, master slave determination will
be done based on statusdetermination number
*/
-
+
OOTRACEDBGA3("Determining master-slave based on StatusDetermination"
"Number (%s, %s)\n", call->callType, call->callToken);
if(call->masterSlaveState == OO_MasterSlave_DetermineSent)
statusDeterminationNumber = call->statusDeterminationNumber;
else
- if (OO_TESTFLAG(gH323ep.flags, OO_M_TRYBEMASTER))
+ if (OO_TESTFLAG(gH323ep.flags, OO_M_TRYBEMASTER))
statusDeterminationNumber = masterSlave->statusDeterminationNumber - 1;
else
statusDeterminationNumber = ooGenerateStatusDeterminationNumber();
moduloDiff = (masterSlave->statusDeterminationNumber - statusDeterminationNumber)
&0xffffff;
-
- /* if(masterSlave->statusDeterminationNumber >
+
+ /* if(masterSlave->statusDeterminationNumber >
statusDeterminationNumber) */
if (moduloDiff < 0x800000 && moduloDiff != 0)
{
@@ -953,7 +953,7 @@ int ooHandleMasterSlave(OOH323CallData *call, void * pmsg,
call->callType, call->callToken);
return OO_OK;
}
- /* if(masterSlave->statusDeterminationNumber <
+ /* if(masterSlave->statusDeterminationNumber <
statusDeterminationNumber) */
if (moduloDiff > 0x800000)
{
@@ -963,7 +963,7 @@ int ooHandleMasterSlave(OOH323CallData *call, void * pmsg,
call->callType, call->callToken);
return OO_OK;
}
- /* if(masterSlave->statusDeterminationNumber ==
+ /* if(masterSlave->statusDeterminationNumber ==
statusDeterminationNumber) */
if (moduloDiff == 0 || moduloDiff == 0x800000)
{
@@ -978,7 +978,7 @@ int ooHandleMasterSlave(OOH323CallData *call, void * pmsg,
masterSlaveAck = (H245MasterSlaveDeterminationAck*)pmsg;
if(call->masterSlaveState == OO_MasterSlave_DetermineSent)
{
- if(masterSlaveAck->decision.t ==
+ if(masterSlaveAck->decision.t ==
T_H245MasterSlaveDeterminationAck_decision_master)
{
ooSendMasterSlaveDeterminationAck(call, "slave");
@@ -996,7 +996,7 @@ int ooHandleMasterSlave(OOH323CallData *call, void * pmsg,
}
call->msAckStatus = OO_msAck_remoteReceived;
-
+
if(call->localTermCapState == OO_LocalTermCapSetAckRecvd &&
call->remoteTermCapState == OO_RemoteTermCapSetAckSent)
{
@@ -1025,7 +1025,7 @@ int ooHandleMasterSlave(OOH323CallData *call, void * pmsg,
OOTRACEWARN3("Warn:Unhandled Master Slave message received - %s - "
"%s\n", call->callType, call->callToken);
}
- return OO_OK;
+ return OO_OK;
}
int ooSendMasterSlaveDetermination(OOH323CallData *call)
@@ -1059,27 +1059,27 @@ int ooSendMasterSlaveDetermination(OOH323CallData *call)
request->u.masterSlaveDetermination = (H245MasterSlaveDetermination*)
ASN1MALLOC(pctxt, sizeof(H245MasterSlaveDetermination));
-
+
pMasterSlave = request->u.masterSlaveDetermination;
- memset(pMasterSlave, 0, sizeof(H245MasterSlaveDetermination));
- pMasterSlave->terminalType = gH323ep.termType;
- pMasterSlave->statusDeterminationNumber =
+ memset(pMasterSlave, 0, sizeof(H245MasterSlaveDetermination));
+ pMasterSlave->terminalType = gH323ep.termType;
+ pMasterSlave->statusDeterminationNumber =
ooGenerateStatusDeterminationNumber();
call->statusDeterminationNumber = pMasterSlave->statusDeterminationNumber;
OOTRACEDBGA3("Built MasterSlave Determination (%s, %s)\n", call->callType,
- call->callToken);
+ call->callToken);
ret = ooSendH245Msg(call, ph245msg);
if(ret != OO_OK)
{
OOTRACEERR3("Error:Failed to enqueue MasterSlaveDetermination message to"
- " outbound queue. (%s, %s)\n", call->callType,
+ " outbound queue. (%s, %s)\n", call->callType,
call->callToken);
}
else
call->masterSlaveState = OO_MasterSlave_DetermineSent;
-
+
ooFreeH245Message(call, ph245msg);
return ret;
@@ -1094,12 +1094,12 @@ int ooSendMasterSlaveDeterminationAck(OOH323CallData* call,
/* OOCTXT *pctxt=&gH323ep.msgctxt; */
OOCTXT *pctxt=call->msgctxt;
- ret = ooCreateH245Message(call, &ph245msg,
+ ret = ooCreateH245Message(call, &ph245msg,
T_H245MultimediaSystemControlMessage_response);
if(ret != OO_OK)
{
OOTRACEERR3("Error:H245 message creation failed for - MasterSlave "
- "Determination Ack (%s, %s)\n",call->callType,
+ "Determination Ack (%s, %s)\n",call->callType,
call->callToken);
return OO_FAILED;
}
@@ -1109,25 +1109,25 @@ int ooSendMasterSlaveDeterminationAck(OOH323CallData* call,
response->t = T_H245ResponseMessage_masterSlaveDeterminationAck;
response->u.masterSlaveDeterminationAck = (H245MasterSlaveDeterminationAck*)
ASN1MALLOC(pctxt, sizeof(H245MasterSlaveDeterminationAck));
- memset(response->u.masterSlaveDeterminationAck, 0,
+ memset(response->u.masterSlaveDeterminationAck, 0,
sizeof(H245MasterSlaveDeterminationAck));
if(!strcmp("master", status))
- response->u.masterSlaveDeterminationAck->decision.t =
+ response->u.masterSlaveDeterminationAck->decision.t =
T_H245MasterSlaveDeterminationAck_decision_master;
else
- response->u.masterSlaveDeterminationAck->decision.t =
+ response->u.masterSlaveDeterminationAck->decision.t =
T_H245MasterSlaveDeterminationAck_decision_slave;
-
- OOTRACEDBGA3("Built MasterSlave determination Ack (%s, %s)\n",
+
+ OOTRACEDBGA3("Built MasterSlave determination Ack (%s, %s)\n",
call->callType, call->callToken);
ret = ooSendH245Msg(call, ph245msg);
if(ret != OO_OK)
{
OOTRACEERR3("Error:Failed to enqueue MasterSlaveDeterminationAck message"
- " to outbound queue. (%s, %s)\n", call->callType,
+ " to outbound queue. (%s, %s)\n", call->callType,
call->callToken);
}
-
+
ooFreeH245Message(call, ph245msg);
call->msAckStatus = OO_msAck_localSent;
return ret;
@@ -1146,7 +1146,7 @@ int ooSendMasterSlaveDeterminationReject (OOH323CallData* call)
if (ret != OO_OK) {
OOTRACEERR3("Error:H245 message creation failed for - MasterSlave "
- "Determination Reject (%s, %s)\n",call->callType,
+ "Determination Reject (%s, %s)\n",call->callType,
call->callToken);
return OO_FAILED;
}
@@ -1155,25 +1155,25 @@ int ooSendMasterSlaveDeterminationReject (OOH323CallData* call)
response->t = T_H245ResponseMessage_masterSlaveDeterminationReject;
- response->u.masterSlaveDeterminationReject =
+ response->u.masterSlaveDeterminationReject =
(H245MasterSlaveDeterminationReject*)
memAlloc (pctxt, sizeof(H245MasterSlaveDeterminationReject));
response->u.masterSlaveDeterminationReject->cause.t =
T_H245MasterSlaveDeterminationReject_cause_identicalNumbers;
- OOTRACEDBGA3 ("Built MasterSlave determination reject (%s, %s)\n",
+ OOTRACEDBGA3 ("Built MasterSlave determination reject (%s, %s)\n",
call->callType, call->callToken);
ret = ooSendH245Msg (call, ph245msg);
if (ret != OO_OK) {
- OOTRACEERR3
+ OOTRACEERR3
("Error:Failed to enqueue MasterSlaveDeterminationReject "
- "message to outbound queue.(%s, %s)\n", call->callType,
+ "message to outbound queue.(%s, %s)\n", call->callType,
call->callToken);
}
-
+
ooFreeH245Message (call, ph245msg);
return ret;
@@ -1192,7 +1192,7 @@ int ooSendMasterSlaveDeterminationRelease(OOH323CallData * call)
if (ret != OO_OK) {
OOTRACEERR3("Error:H245 message creation failed for - MasterSlave "
- "Determination Release (%s, %s)\n",call->callType,
+ "Determination Release (%s, %s)\n",call->callType,
call->callToken);
return OO_FAILED;
}
@@ -1201,7 +1201,7 @@ int ooSendMasterSlaveDeterminationRelease(OOH323CallData * call)
indication->t = T_H245IndicationMessage_masterSlaveDeterminationRelease;
- indication->u.masterSlaveDeterminationRelease =
+ indication->u.masterSlaveDeterminationRelease =
(H245MasterSlaveDeterminationRelease*)
memAlloc (pctxt, sizeof(H245MasterSlaveDeterminationRelease));
@@ -1212,18 +1212,18 @@ int ooSendMasterSlaveDeterminationRelease(OOH323CallData * call)
ooFreeH245Message(call, ph245msg);
return OO_FAILED;
}
- OOTRACEDBGA3 ("Built MasterSlave determination Release (%s, %s)\n",
+ OOTRACEDBGA3 ("Built MasterSlave determination Release (%s, %s)\n",
call->callType, call->callToken);
ret = ooSendH245Msg (call, ph245msg);
if (ret != OO_OK) {
- OOTRACEERR3
+ OOTRACEERR3
("Error:Failed to enqueue MasterSlaveDeterminationRelease "
- "message to outbound queue.(%s, %s)\n", call->callType,
+ "message to outbound queue.(%s, %s)\n", call->callType,
call->callToken);
}
-
+
ooFreeH245Message (call, ph245msg);
return ret;
}
@@ -1234,7 +1234,7 @@ int ooHandleMasterSlaveReject
if(call->msdRetries < DEFAULT_MAX_RETRIES)
{
call->msdRetries++;
- OOTRACEDBGA3("Retrying MasterSlaveDetermination. (%s, %s)\n",
+ OOTRACEDBGA3("Retrying MasterSlaveDetermination. (%s, %s)\n",
call->callType, call->callToken);
call->masterSlaveState = OO_MasterSlave_Idle;
ooSendMasterSlaveDetermination(call);
@@ -1260,12 +1260,12 @@ int ooSendRequestModeAck(OOH323CallData* call,
H245Message *ph245msg=NULL;
OOCTXT *pctxt=call->msgctxt;
- ret = ooCreateH245Message(call, &ph245msg,
+ ret = ooCreateH245Message(call, &ph245msg,
T_H245MultimediaSystemControlMessage_response);
if(ret != OO_OK)
{
OOTRACEERR3("Error:H245 message creation failed for - RequestMode "
- "Ack (%s, %s)\n",call->callType,
+ "Ack (%s, %s)\n",call->callType,
call->callToken);
return OO_FAILED;
}
@@ -1275,23 +1275,23 @@ int ooSendRequestModeAck(OOH323CallData* call,
response->t = T_H245ResponseMessage_requestModeAck;
response->u.requestModeAck = (H245RequestModeAck *)
ASN1MALLOC(pctxt, sizeof(H245RequestModeAck));
- memset(response->u.requestModeAck, 0,
+ memset(response->u.requestModeAck, 0,
sizeof(H245RequestModeAck));
response->u.requestModeAck->sequenceNumber = sequenceNumber;
- response->u.requestModeAck->response.t =
+ response->u.requestModeAck->response.t =
T_H245RequestModeAck_response_willTransmitMostPreferredMode;
- OOTRACEDBGA3("Built RequestModeAck (%s, %s)\n",
+ OOTRACEDBGA3("Built RequestModeAck (%s, %s)\n",
call->callType, call->callToken);
ret = ooSendH245Msg(call, ph245msg);
if(ret != OO_OK)
{
OOTRACEERR3("Error:Failed to enqueue RequestModeAck message"
- " to outbound queue. (%s, %s)\n", call->callType,
+ " to outbound queue. (%s, %s)\n", call->callType,
call->callToken);
}
-
+
ooFreeH245Message(call, ph245msg);
return ret;
}
@@ -1304,12 +1304,12 @@ int ooSendRequestModeReject(OOH323CallData* call,
H245Message *ph245msg=NULL;
OOCTXT *pctxt=call->msgctxt;
- ret = ooCreateH245Message(call, &ph245msg,
+ ret = ooCreateH245Message(call, &ph245msg,
T_H245MultimediaSystemControlMessage_response);
if(ret != OO_OK)
{
OOTRACEERR3("Error:H245 message creation failed for - RequstMode "
- "Reject (%s, %s)\n",call->callType,
+ "Reject (%s, %s)\n",call->callType,
call->callToken);
return OO_FAILED;
}
@@ -1319,23 +1319,23 @@ int ooSendRequestModeReject(OOH323CallData* call,
response->t = T_H245ResponseMessage_requestModeReject;
response->u.requestModeReject = (H245RequestModeReject *)
ASN1MALLOC(pctxt, sizeof(H245RequestModeReject));
- memset(response->u.requestModeReject, 0,
+ memset(response->u.requestModeReject, 0,
sizeof(H245RequestModeReject));
response->u.requestModeReject->sequenceNumber = sequenceNumber;
- response->u.requestModeReject->cause.t =
+ response->u.requestModeReject->cause.t =
T_H245RequestModeReject_cause_modeUnavailable;
- OOTRACEDBGA3("Built RequestModeReject (%s, %s)\n",
+ OOTRACEDBGA3("Built RequestModeReject (%s, %s)\n",
call->callType, call->callToken);
ret = ooSendH245Msg(call, ph245msg);
if(ret != OO_OK)
{
OOTRACEERR3("Error:Failed to enqueue RequestModeReject message"
- " to outbound queue. (%s, %s)\n", call->callType,
+ " to outbound queue. (%s, %s)\n", call->callType,
call->callToken);
}
-
+
ooFreeH245Message(call, ph245msg);
return ret;
}
@@ -1355,12 +1355,12 @@ int ooSendRequestMode(OOH323CallData* call,
if (isT38Mode && !OO_TESTFLAG(call->flags, OO_M_T38SUPPORTED)) /* t38 req but we dont support */
return OO_OK;
- ret = ooCreateH245Message(call, &ph245msg,
+ ret = ooCreateH245Message(call, &ph245msg,
T_H245MultimediaSystemControlMessage_request);
if(ret != OO_OK)
{
OOTRACEERR3("Error:H245 message creation failed for - RequstMode "
- "(%s, %s)\n",call->callType,
+ "(%s, %s)\n",call->callType,
call->callToken);
return OO_FAILED;
}
@@ -1371,7 +1371,7 @@ int ooSendRequestMode(OOH323CallData* call,
request->u.requestMode = (H245RequestMode *)
ASN1MALLOC(pctxt, sizeof(H245RequestMode));
- memset(request->u.requestMode, 0,
+ memset(request->u.requestMode, 0,
sizeof(H245RequestMode));
call->requestSequence++;
@@ -1390,7 +1390,7 @@ int ooSendRequestMode(OOH323CallData* call,
pModeElem.type.u.dataMode->bitRate = 144;
if (!ooCreateT38ApplicationData(pctxt,&(pModeElem.type.u.dataMode->application))) {
OOTRACEERR3("Error:Memory - ooCapabilityCreateT38Capability - (%s, %s)\n",
- call->callType,
+ call->callType,
call->callToken);
}
} else {
@@ -1414,10 +1414,10 @@ int ooSendRequestMode(OOH323CallData* call,
if(ret != OO_OK)
{
OOTRACEERR3("Error:Failed to enqueue RequestMode message"
- " to outbound queue. (%s, %s)\n", call->callType,
+ " to outbound queue. (%s, %s)\n", call->callType,
call->callToken);
}
-
+
ooFreeH245Message(call, ph245msg);
return ret;
}
@@ -1451,7 +1451,7 @@ void ooOnReceivedRequestModeAck(OOH323CallData* call, H245RequestModeAck * reque
int ooHandleRequestMode(OOH323CallData* call,
H245RequestMode *requestMode)
{
-
+
H245ModeDescription** pModeRef;
H245ModeElement** pModeElem;
H245ModeElementType* pMode;
@@ -1461,7 +1461,7 @@ int ooHandleRequestMode(OOH323CallData* call,
pMode = &((*pModeElem)->type);
OOTRACEDBGA5("Handle RequestMode: "
" modetype: %d/%d for (%s, %s)\n", pMode->t, pMode->u.dataMode->application.t,
- call->callType,
+ call->callType,
call->callToken);
switch (pMode->t) {
case T_H245ModeElementType_dataMode:
@@ -1483,7 +1483,7 @@ int ooHandleRequestMode(OOH323CallData* call,
}
break;
case T_H245ModeElementType_audioMode:
- if (ooSendRequestModeAck(call, requestMode->sequenceNumber) == OO_OK &&
+ if (ooSendRequestModeAck(call, requestMode->sequenceNumber) == OO_OK &&
OO_TESTFLAG(call->flags, OO_M_DATASESSION)) {
OO_CLRFLAG(call->flags, OO_M_DATASESSION);
@@ -1499,22 +1499,22 @@ int ooHandleRequestMode(OOH323CallData* call,
;
}
return OO_OK;
-
+
}
-int ooHandleOpenLogicalChannel(OOH323CallData* call,
+int ooHandleOpenLogicalChannel(OOH323CallData* call,
H245OpenLogicalChannel *olc)
{
H245OpenLogicalChannel_forwardLogicalChannelParameters *flcp =
&(olc->forwardLogicalChannelParameters);
-
+
#if 0
if(!call->logicalChans)
ooOpenLogicalChannels(call);
#endif
- /* Check whether channel type is supported. Only supported channel
+ /* Check whether channel type is supported. Only supported channel
type for now is g711ulaw audio channel.
*/
switch(flcp->dataType.t)
@@ -1587,17 +1587,17 @@ int ooHandleOpenLogicalChannel(OOH323CallData* call,
T_H245OpenLogicalChannelReject_cause_dataTypeNotSupported);
break;
default:
- OOTRACEERR3("ERROR:Unknown media channel data type (%s, %s)\n",
+ OOTRACEERR3("ERROR:Unknown media channel data type (%s, %s)\n",
call->callType, call->callToken);
ooSendOpenLogicalChannelReject(call, olc->forwardLogicalChannelNumber,
T_H245OpenLogicalChannelReject_cause_dataTypeNotSupported);
}
-
+
return OO_OK;
-}
+}
/*TODO: Need to clean logical channel in case of failure after creating one */
-int ooHandleOpenLogicalChannel_helper(OOH323CallData *call,
+int ooHandleOpenLogicalChannel_helper(OOH323CallData *call,
H245OpenLogicalChannel*olc)
{
int ret=0;
@@ -1618,7 +1618,7 @@ int ooHandleOpenLogicalChannel_helper(OOH323CallData *call,
if(!flcp || flcp->multiplexParameters.t != T_H245OpenLogicalChannel_forwardLogicalChannelParameters_multiplexParameters_h2250LogicalChannelParameters)
{
OOTRACEERR3("Error:ooHandleOpenLogicalChannel_helper - invalid forward "
- "logical channel parameters. (%s, %s)\n", call->callType,
+ "logical channel parameters. (%s, %s)\n", call->callType,
call->callToken);
ooSendOpenLogicalChannelReject(call, olc->forwardLogicalChannelNumber,
T_H245OpenLogicalChannelReject_cause_unspecified);
@@ -1641,7 +1641,7 @@ int ooHandleOpenLogicalChannel_helper(OOH323CallData *call,
if(ret != OO_OK)
{
OOTRACEERR3("Error: H245 message creation failed for - "
- "OpenLogicalChannel Ack (%s, %s)\n", call->callType,
+ "OpenLogicalChannel Ack (%s, %s)\n", call->callType,
call->callToken);
memFreePtr(call->pctxt, epCap);
epCap = NULL;
@@ -1656,18 +1656,18 @@ int ooHandleOpenLogicalChannel_helper(OOH323CallData *call,
memset(response, 0, sizeof(H245ResponseMessage));
response->t = T_H245ResponseMessage_openLogicalChannelAck;
response->u.openLogicalChannelAck = (H245OpenLogicalChannelAck*)
- memAlloc(pctxt, sizeof(H245OpenLogicalChannelAck));
+ memAlloc(pctxt, sizeof(H245OpenLogicalChannelAck));
olcAck = response->u.openLogicalChannelAck;
memset(olcAck, 0, sizeof(H245OpenLogicalChannelAck));
olcAck->forwardLogicalChannelNumber = olc->forwardLogicalChannelNumber;
olcAck->m.forwardMultiplexAckParametersPresent = 1;
- olcAck->forwardMultiplexAckParameters.t =
+ olcAck->forwardMultiplexAckParameters.t =
T_H245OpenLogicalChannelAck_forwardMultiplexAckParameters_h2250LogicalChannelAckParameters;
- olcAck->forwardMultiplexAckParameters.u.h2250LogicalChannelAckParameters =
- (H245H2250LogicalChannelAckParameters*)ASN1MALLOC(pctxt,
+ olcAck->forwardMultiplexAckParameters.u.h2250LogicalChannelAckParameters =
+ (H245H2250LogicalChannelAckParameters*)ASN1MALLOC(pctxt,
sizeof(H245H2250LogicalChannelAckParameters));
- h2250lcap =
+ h2250lcap =
olcAck->forwardMultiplexAckParameters.u.h2250LogicalChannelAckParameters;
memset(h2250lcap, 0, sizeof(H245H2250LogicalChannelAckParameters));
@@ -1679,8 +1679,8 @@ int ooHandleOpenLogicalChannel_helper(OOH323CallData *call,
h2250lcap->sessionID = ooCallGenerateSessionID(call, epCap->capType, "receive");
else
h2250lcap->sessionID = h2250lcp->sessionID;
-
- h2250lcap->mediaChannel.t =
+
+ h2250lcap->mediaChannel.t =
T_H245TransportAddress_unicastAddress;
h2250lcap->mediaChannel.u.unicastAddress = (H245UnicastAddress*)
ASN1MALLOC(pctxt, sizeof(H245UnicastAddress));
@@ -1702,12 +1702,12 @@ int ooHandleOpenLogicalChannel_helper(OOH323CallData *call,
memset(iPAddress, 0, sizeof(H245UnicastAddress_iPAddress));
}
- pLogicalChannel = ooAddNewLogicalChannel(call,
+ pLogicalChannel = ooAddNewLogicalChannel(call,
olc->forwardLogicalChannelNumber, h2250lcap->sessionID,
"receive", epCap);
if(!pLogicalChannel)
{
- OOTRACEERR3("ERROR:Failed to add new logical channel entry to call "
+ OOTRACEERR3("ERROR:Failed to add new logical channel entry to call "
"(%s, %s)\n", call->callType, call->callToken);
return OO_FAILED;
}
@@ -1723,7 +1723,7 @@ int ooHandleOpenLogicalChannel_helper(OOH323CallData *call,
}
/* media contrcol channel */
- h2250lcap->mediaControlChannel.t =
+ h2250lcap->mediaControlChannel.t =
T_H245TransportAddress_unicastAddress;
h2250lcap->mediaControlChannel.u.unicastAddress = (H245UnicastAddress*)
ASN1MALLOC(pctxt, sizeof(H245UnicastAddress));
@@ -1752,13 +1752,13 @@ int ooHandleOpenLogicalChannel_helper(OOH323CallData *call,
iPAddress1->tsapIdentifier = pLogicalChannel->localRtcpPort;
}
- OOTRACEDBGA3("Built OpenLogicalChannelAck (%s, %s)\n", call->callType,
+ OOTRACEDBGA3("Built OpenLogicalChannelAck (%s, %s)\n", call->callType,
call->callToken);
ret = ooSendH245Msg(call, ph245msg);
if(ret != OO_OK)
{
OOTRACEERR3("Error:Failed to enqueue OpenLogicalChannelAck message to "
- "outbound queue. (%s, %s)\n", call->callType,
+ "outbound queue. (%s, %s)\n", call->callType,
call->callToken);
}
ooFreeH245Message(call, ph245msg);
@@ -1766,10 +1766,10 @@ int ooHandleOpenLogicalChannel_helper(OOH323CallData *call,
if(epCap->startReceiveChannel)
{
- epCap->startReceiveChannel(call, pLogicalChannel);
- OOTRACEINFO6("Receive channel of type %s started at %s:%d(%s, %s)\n",
+ epCap->startReceiveChannel(call, pLogicalChannel);
+ OOTRACEINFO6("Receive channel of type %s started at %s:%d(%s, %s)\n",
ooGetCapTypeText(epCap->cap), pLogicalChannel->localIP,
- pLogicalChannel->localRtpPort, call->callType,
+ pLogicalChannel->localRtpPort, call->callType,
call->callToken);
}
else{
@@ -1795,7 +1795,7 @@ int ooSendOpenLogicalChannelReject
if (ret != OO_OK) {
OOTRACEERR3("Error:H245 message creation failed for - OpenLogicalChannel"
- "Reject (%s, %s)\n",call->callType,
+ "Reject (%s, %s)\n",call->callType,
call->callToken);
return OO_FAILED;
}
@@ -1804,34 +1804,34 @@ int ooSendOpenLogicalChannelReject
response->t = T_H245ResponseMessage_openLogicalChannelReject;
- response->u.openLogicalChannelReject =
+ response->u.openLogicalChannelReject =
(H245OpenLogicalChannelReject*)
memAlloc (pctxt, sizeof(H245OpenLogicalChannelReject));
if(!response->u.openLogicalChannelReject)
{
OOTRACEERR3("Error: Failed to allocate memory for OpenLogicalChannel"
- "Reject message. (%s, %s)\n", call->callType,
+ "Reject message. (%s, %s)\n", call->callType,
call->callToken);
ooFreeH245Message(call, ph245msg);
return OO_FAILED;
}
- response->u.openLogicalChannelReject->forwardLogicalChannelNumber =
+ response->u.openLogicalChannelReject->forwardLogicalChannelNumber =
channelNum;
response->u.openLogicalChannelReject->cause.t = cause;
- OOTRACEDBGA3 ("Built OpenLogicalChannelReject (%s, %s)\n",
+ OOTRACEDBGA3 ("Built OpenLogicalChannelReject (%s, %s)\n",
call->callType, call->callToken);
ret = ooSendH245Msg (call, ph245msg);
if (ret != OO_OK) {
- OOTRACEERR3
+ OOTRACEERR3
("Error:Failed to enqueue OpenLogicalChannelReject "
- "message to outbound queue.(%s, %s)\n", call->callType,
+ "message to outbound queue.(%s, %s)\n", call->callType,
call->callToken);
}
-
+
ooFreeH245Message (call, ph245msg);
return ret;
@@ -1853,20 +1853,20 @@ int ooOnReceivedOpenLogicalChannelAck(OOH323CallData *call,
H245UnicastAddress_iP6Address *iP6Address1 = NULL;
if(!((olcAck->m.forwardMultiplexAckParametersPresent == 1) &&
- (olcAck->forwardMultiplexAckParameters.t ==
+ (olcAck->forwardMultiplexAckParameters.t ==
T_H245OpenLogicalChannelAck_forwardMultiplexAckParameters_h2250LogicalChannelAckParameters)))
{
OOTRACEERR3("Error: Processing open logical channel ack - LogicalChannel"
- "Ack parameters absent (%s, %s)\n", call->callType,
+ "Ack parameters absent (%s, %s)\n", call->callType,
call->callToken);
return OO_OK; /* should send CloseLogicalChannel request */
}
- h2250lcap =
+ h2250lcap =
olcAck->forwardMultiplexAckParameters.u.h2250LogicalChannelAckParameters;
/* Extract media channel address */
if(h2250lcap->m.mediaChannelPresent != 1)
- {
+ {
OOTRACEERR3("Error: Processing OpenLogicalChannelAck - media channel "
"absent (%s, %s)\n", call->callType, call->callToken);
return OO_FAILED;
@@ -1874,51 +1874,51 @@ int ooOnReceivedOpenLogicalChannelAck(OOH323CallData *call,
if(h2250lcap->mediaChannel.t != T_H245TransportAddress_unicastAddress)
{
OOTRACEERR3("Error: Processing OpenLogicalChannelAck - media channel "
- "address type is not unicast (%s, %s)\n", call->callType,
+ "address type is not unicast (%s, %s)\n", call->callType,
call->callToken);
return OO_FAILED;
}
-
+
unicastAddr = h2250lcap->mediaChannel.u.unicastAddress;
if (call->versionIP == 6) {
if(unicastAddr->t != T_H245UnicastAddress_iP6Address)
{
OOTRACEERR3("Error: Processing OpenLogicalChannelAck - media channel "
- "address type is not IP6 (%s, %s)\n", call->callType,
+ "address type is not IP6 (%s, %s)\n", call->callType,
call->callToken);
return OO_FAILED;
}
iP6Address = unicastAddr->u.iP6Address;
inet_ntop(AF_INET6, iP6Address->network.data, remoteip, sizeof(remoteip));
-
+
} else {
if(unicastAddr->t != T_H245UnicastAddress_iPAddress)
{
OOTRACEERR3("Error: Processing OpenLogicalChannelAck - media channel "
- "address type is not IP (%s, %s)\n", call->callType,
+ "address type is not IP (%s, %s)\n", call->callType,
call->callToken);
return OO_FAILED;
}
iPAddress = unicastAddr->u.iPAddress;
inet_ntop(AF_INET, iPAddress->network.data, remoteip, sizeof(remoteip));
}
-
+
/* Extract media control channel address */
if(h2250lcap->m.mediaControlChannelPresent == 1) {
- if(h2250lcap->mediaControlChannel.t !=
+ if(h2250lcap->mediaControlChannel.t !=
T_H245TransportAddress_unicastAddress)
{
OOTRACEERR3("Error: Processing OpenLogicalChannelAck - media control "
- "channel address type is not unicast (%s, %s)\n",
+ "channel address type is not unicast (%s, %s)\n",
call->callType, call->callToken);
return OO_FAILED;
}
-
+
unicastAddr1 = h2250lcap->mediaControlChannel.u.unicastAddress;
if (call->versionIP == 6) {
if(unicastAddr1->t != T_H245UnicastAddress_iP6Address) {
OOTRACEERR3("Error: Processing OpenLogicalChannelAck - media control "
- "channel address type is not IP6 (%s, %s)\n", call->callType,
+ "channel address type is not IP6 (%s, %s)\n", call->callType,
call->callToken);
return OO_FAILED;
}
@@ -1926,7 +1926,7 @@ int ooOnReceivedOpenLogicalChannelAck(OOH323CallData *call,
} else {
if(unicastAddr1->t != T_H245UnicastAddress_iPAddress) {
OOTRACEERR3("Error: Processing OpenLogicalChannelAck - media control "
- "channel address type is not IP (%s, %s)\n", call->callType,
+ "channel address type is not IP (%s, %s)\n", call->callType,
call->callToken);
return OO_FAILED;
}
@@ -1939,21 +1939,21 @@ int ooOnReceivedOpenLogicalChannelAck(OOH323CallData *call,
/* Set remote destination address for rtp session */
// strcpy(call->remoteIP, remoteip);
-
+
/* Start channel here */
pLogicalChannel = ooFindLogicalChannelByLogicalChannelNo(call,olcAck->forwardLogicalChannelNumber);
if(!pLogicalChannel)
{
OOTRACEERR4("ERROR:Logical channel %d not found in the channel list for "
- "call (%s, %s)\n", olcAck->forwardLogicalChannelNumber,
+ "call (%s, %s)\n", olcAck->forwardLogicalChannelNumber,
call->callType, call->callToken);
return OO_FAILED;
}
- /* Update session id if we were waiting for remote to assign one and remote
+ /* Update session id if we were waiting for remote to assign one and remote
did assign one. */
if(pLogicalChannel->sessionID == 0 && h2250lcap->m.sessionIDPresent)
- pLogicalChannel->sessionID = h2250lcap->sessionID;
+ pLogicalChannel->sessionID = h2250lcap->sessionID;
/* Populate ports &ip for channel */
@@ -1965,7 +1965,7 @@ int ooOnReceivedOpenLogicalChannelAck(OOH323CallData *call,
}
}
- strcpy(pLogicalChannel->remoteIP, remoteip);
+ strcpy(pLogicalChannel->remoteIP, remoteip);
if (call->versionIP == 6) {
pLogicalChannel->remoteMediaPort = iP6Address->tsapIdentifier;
if (iP6Address1)
@@ -1978,7 +1978,7 @@ int ooOnReceivedOpenLogicalChannelAck(OOH323CallData *call,
if(pLogicalChannel->chanCap->startTransmitChannel)
{
pLogicalChannel->chanCap->startTransmitChannel(call, pLogicalChannel);
- OOTRACEINFO4("TransmitLogical Channel of type %s started (%s, %s)\n",
+ OOTRACEINFO4("TransmitLogical Channel of type %s started (%s, %s)\n",
ooGetCapTypeText(pLogicalChannel->chanCap->cap),
call->callType, call->callToken);
}
@@ -1991,94 +1991,94 @@ int ooOnReceivedOpenLogicalChannelAck(OOH323CallData *call,
return OO_OK;
}
-int ooOnReceivedOpenLogicalChannelRejected(OOH323CallData *call,
+int ooOnReceivedOpenLogicalChannelRejected(OOH323CallData *call,
H245OpenLogicalChannelReject *olcReject)
{
switch(olcReject->cause.t)
{
case T_H245OpenLogicalChannelReject_cause_unspecified:
OOTRACEINFO4("Open logical channel %d rejected - unspecified (%s, %s)\n",
- olcReject->forwardLogicalChannelNumber, call->callType,
+ olcReject->forwardLogicalChannelNumber, call->callType,
call->callToken);
break;
case T_H245OpenLogicalChannelReject_cause_unsuitableReverseParameters:
OOTRACEINFO4("Open logical channel %d rejected - "
- "unsuitableReverseParameters (%s, %s)\n",
- olcReject->forwardLogicalChannelNumber, call->callType,
+ "unsuitableReverseParameters (%s, %s)\n",
+ olcReject->forwardLogicalChannelNumber, call->callType,
call->callToken);
break;
case T_H245OpenLogicalChannelReject_cause_dataTypeNotSupported:
OOTRACEINFO4("Open logical channel %d rejected - dataTypeNotSupported"
- "(%s, %s)\n", olcReject->forwardLogicalChannelNumber,
+ "(%s, %s)\n", olcReject->forwardLogicalChannelNumber,
call->callType, call->callToken);
break;
case T_H245OpenLogicalChannelReject_cause_dataTypeNotAvailable:
OOTRACEINFO4("Open logical channel %d rejected - dataTypeNotAvailable"
- "(%s, %s)\n", olcReject->forwardLogicalChannelNumber,
+ "(%s, %s)\n", olcReject->forwardLogicalChannelNumber,
call->callType, call->callToken);
break;
case T_H245OpenLogicalChannelReject_cause_unknownDataType:
OOTRACEINFO4("Open logical channel %d rejected - unknownDataType"
- "(%s, %s)\n", olcReject->forwardLogicalChannelNumber,
+ "(%s, %s)\n", olcReject->forwardLogicalChannelNumber,
call->callType, call->callToken);
break;
case T_H245OpenLogicalChannelReject_cause_dataTypeALCombinationNotSupported:
OOTRACEINFO4("Open logical channel %d rejected - "
- "dataTypeALCombinationNotSupported(%s, %s)\n",
- olcReject->forwardLogicalChannelNumber,
+ "dataTypeALCombinationNotSupported(%s, %s)\n",
+ olcReject->forwardLogicalChannelNumber,
call->callType, call->callToken);
break;
case T_H245OpenLogicalChannelReject_cause_multicastChannelNotAllowed:
OOTRACEINFO4("Open logical channel %d rejected - "
- "multicastChannelNotAllowed (%s, %s)\n",
- olcReject->forwardLogicalChannelNumber,
+ "multicastChannelNotAllowed (%s, %s)\n",
+ olcReject->forwardLogicalChannelNumber,
call->callType, call->callToken);
break;
case T_H245OpenLogicalChannelReject_cause_insufficientBandwidth:
OOTRACEINFO4("Open logical channel %d rejected - insufficientBandwidth"
- "(%s, %s)\n", olcReject->forwardLogicalChannelNumber,
+ "(%s, %s)\n", olcReject->forwardLogicalChannelNumber,
call->callType, call->callToken);
break;
case T_H245OpenLogicalChannelReject_cause_separateStackEstablishmentFailed:
OOTRACEINFO4("Open logical channel %d rejected - "
- "separateStackEstablishmentFailed (%s, %s)\n",
- olcReject->forwardLogicalChannelNumber,
+ "separateStackEstablishmentFailed (%s, %s)\n",
+ olcReject->forwardLogicalChannelNumber,
call->callType, call->callToken);
break;
case T_H245OpenLogicalChannelReject_cause_invalidSessionID:
OOTRACEINFO4("Open logical channel %d rejected - "
- "invalidSessionID (%s, %s)\n",
- olcReject->forwardLogicalChannelNumber,
+ "invalidSessionID (%s, %s)\n",
+ olcReject->forwardLogicalChannelNumber,
call->callType, call->callToken);
break;
case T_H245OpenLogicalChannelReject_cause_masterSlaveConflict:
OOTRACEINFO4("Open logical channel %d rejected - "
- "invalidSessionID (%s, %s)\n",
- olcReject->forwardLogicalChannelNumber,
+ "invalidSessionID (%s, %s)\n",
+ olcReject->forwardLogicalChannelNumber,
call->callType, call->callToken);
break;
case T_H245OpenLogicalChannelReject_cause_waitForCommunicationMode:
OOTRACEINFO4("Open logical channel %d rejected - "
- "waitForCommunicationMode (%s, %s)\n",
- olcReject->forwardLogicalChannelNumber,
+ "waitForCommunicationMode (%s, %s)\n",
+ olcReject->forwardLogicalChannelNumber,
call->callType, call->callToken);
break;
case T_H245OpenLogicalChannelReject_cause_invalidDependentChannel:
OOTRACEINFO4("Open logical channel %d rejected - "
- "invalidDependentChannel (%s, %s)\n",
- olcReject->forwardLogicalChannelNumber,
+ "invalidDependentChannel (%s, %s)\n",
+ olcReject->forwardLogicalChannelNumber,
call->callType, call->callToken);
break;
case T_H245OpenLogicalChannelReject_cause_replacementForRejected:
OOTRACEINFO4("Open logical channel %d rejected - "
- "replacementForRejected (%s, %s)\n",
- olcReject->forwardLogicalChannelNumber,
+ "replacementForRejected (%s, %s)\n",
+ olcReject->forwardLogicalChannelNumber,
call->callType, call->callToken);
break;
default:
OOTRACEERR4("Error: OpenLogicalChannel %d rejected - "
"invalid cause(%s, %s)\n",
- olcReject->forwardLogicalChannelNumber,
+ olcReject->forwardLogicalChannelNumber,
call->callType, call->callToken);
}
if(call->callState < OO_CALL_CLEAR)
@@ -2098,7 +2098,7 @@ int ooSendEndSessionCommand(OOH323CallData *call)
H245CommandMessage * command;
OOCTXT *pctxt;
H245Message *ph245msg=NULL;
- ret = ooCreateH245Message(call, &ph245msg,
+ ret = ooCreateH245Message(call, &ph245msg,
T_H245MultimediaSystemControlMessage_command);
if(ret != OO_OK)
{
@@ -2130,7 +2130,7 @@ int ooSendEndSessionCommand(OOH323CallData *call)
}
-int ooHandleH245Command(OOH323CallData *call,
+int ooHandleH245Command(OOH323CallData *call,
H245CommandMessage *command)
{
ASN1UINT i;
@@ -2141,7 +2141,7 @@ int ooHandleH245Command(OOH323CallData *call,
switch(command->t)
{
case T_H245CommandMessage_endSessionCommand:
- OOTRACEINFO3("Received EndSession command (%s, %s)\n",
+ OOTRACEINFO3("Received EndSession command (%s, %s)\n",
call->callType, call->callToken);
if(call->h245SessionState == OO_H245SESSION_ENDSENT)
{
@@ -2150,12 +2150,12 @@ int ooHandleH245Command(OOH323CallData *call,
{
pNode = dListFindByIndex(&call->timerList, i);
pTimer = (OOTimer*)pNode->data;
- if(((ooTimerCallback*)pTimer->cbData)->timerType &
+ if(((ooTimerCallback*)pTimer->cbData)->timerType &
OO_SESSION_TIMER)
{
ASN1MEMFREEPTR(call->pctxt, pTimer->cbData);
ooTimerDelete(call->pctxt, &call->timerList, pTimer);
- OOTRACEDBGC3("Deleted Session Timer. (%s, %s)\n",
+ OOTRACEDBGC3("Deleted Session Timer. (%s, %s)\n",
call->callType, call->callToken);
break;
}
@@ -2170,7 +2170,7 @@ int ooHandleH245Command(OOH323CallData *call,
if(call->logicalChans)
{
OOTRACEINFO3("In response to received EndSessionCommand - "
- "Clearing all logical channels. (%s, %s)\n",
+ "Clearing all logical channels. (%s, %s)\n",
call->callType, call->callToken);
ooClearAllLogicalChannels(call);
}
@@ -2178,12 +2178,12 @@ int ooHandleH245Command(OOH323CallData *call,
if (call->callState < OO_CALL_CLEAR)
call->callState = OO_CALL_CLEAR;
}
-
-
+
+
break;
case T_H245CommandMessage_sendTerminalCapabilitySet:
OOTRACEWARN3("Warning: Received command Send terminal capability set "
- "- Not handled (%s, %s)\n", call->callType,
+ "- Not handled (%s, %s)\n", call->callType,
call->callToken);
break;
case T_H245CommandMessage_flowControlCommand:
@@ -2194,8 +2194,8 @@ int ooHandleH245Command(OOH323CallData *call,
OOTRACEWARN3("Warning: Unhandled H245 command message received "
"(%s, %s)\n", call->callType, call->callToken);
}
- OOTRACEDBGC3("Handling H.245 command message done. (%s, %s)\n",
- call->callType, call->callToken);
+ OOTRACEDBGC3("Handling H.245 command message done. (%s, %s)\n",
+ call->callType, call->callToken);
return OO_OK;
}
@@ -2206,7 +2206,7 @@ int ooOnReceivedTerminalCapabilitySetAck(OOH323CallData* call)
call->localTermCapState = OO_LocalTermCapSetAckRecvd;
if(call->remoteTermCapState != OO_RemoteTermCapSetAckSent)
return OO_OK;
-
+
if(call->masterSlaveState == OO_MasterSlave_Idle) {
ret = ooSendMasterSlaveDetermination(call);
if(ret != OO_OK) {
@@ -2214,7 +2214,7 @@ int ooOnReceivedTerminalCapabilitySetAck(OOH323CallData* call)
"(%s, %s)\n", call->callType, call->callToken);
return ret;
}
- }
+ }
if((call->masterSlaveState == OO_MasterSlave_Master ||
call->masterSlaveState == OO_MasterSlave_Slave) &&
@@ -2224,7 +2224,7 @@ int ooOnReceivedTerminalCapabilitySetAck(OOH323CallData* call)
gH323ep.h323Callbacks.openLogicalChannels(call);
/* ooSendStatusInquiry(call); */
-
+
if(!ooGetTransmitLogicalChannel(call))
ooOpenLogicalChannels(call);
#if 0
@@ -2236,7 +2236,7 @@ int ooOnReceivedTerminalCapabilitySetAck(OOH323CallData* call)
}
#endif
}
-
+
return OO_OK;
}
@@ -2247,7 +2247,7 @@ int ooCloseAllLogicalChannels(OOH323CallData *call, char* dir)
temp = call->logicalChans;
while(temp)
{
- if(temp->state == OO_LOGICALCHAN_ESTABLISHED &&
+ if(temp->state == OO_LOGICALCHAN_ESTABLISHED &&
(dir == NULL || !strcmp(temp->dir,dir)))
{
/* Sending closelogicalchannel only for outgoing channels*/
@@ -2328,8 +2328,8 @@ int ooSendCloseLogicalChannel(OOH323CallData *call, ooLogicalChannel *logicalCha
OOCTXT *pctxt;
H245RequestMessage *request;
H245CloseLogicalChannel* clc;
-
- ret = ooCreateH245Message(call, &ph245msg,
+
+ ret = ooCreateH245Message(call, &ph245msg,
T_H245MultimediaSystemControlMessage_request);
if(ret != OO_OK)
{
@@ -2361,7 +2361,7 @@ int ooSendCloseLogicalChannel(OOH323CallData *call, ooLogicalChannel *logicalCha
clc->m.reasonPresent = 1;
clc->reason.t = T_H245CloseLogicalChannel_reason_unknown;
- OOTRACEDBGA4("Built close logical channel for %d (%s, %s)\n",
+ OOTRACEDBGA4("Built close logical channel for %d (%s, %s)\n",
logicalChan->channelNo, call->callType, call->callToken);
ret = ooSendH245Msg(call, ph245msg);
if(ret != OO_OK)
@@ -2371,7 +2371,7 @@ int ooSendCloseLogicalChannel(OOH323CallData *call, ooLogicalChannel *logicalCha
error++;
}
ooFreeH245Message(call, ph245msg);
-
+
/* Stop the media transmission */
/* Moved to OnReceivedClosedChannelAck */
logicalChan->state = OO_LOGICALCHAN_CLOSEPENDING;
@@ -2382,7 +2382,7 @@ int ooSendCloseLogicalChannel(OOH323CallData *call, ooLogicalChannel *logicalCha
}
/*TODO: Need to pass reason as a parameter */
-int ooSendRequestCloseLogicalChannel(OOH323CallData *call,
+int ooSendRequestCloseLogicalChannel(OOH323CallData *call,
ooLogicalChannel *logicalChan)
{
int ret = OO_OK;
@@ -2391,12 +2391,12 @@ int ooSendRequestCloseLogicalChannel(OOH323CallData *call,
H245RequestMessage *request;
H245RequestChannelClose *rclc;
- ret = ooCreateH245Message(call, &ph245msg,
+ ret = ooCreateH245Message(call, &ph245msg,
T_H245MultimediaSystemControlMessage_request);
if(ret != OO_OK)
{
OOTRACEERR3("ERROR:Failed to create H245 message for "
- "requestCloseLogicalChannel message (%s, %s)\n",
+ "requestCloseLogicalChannel message (%s, %s)\n",
call->callType, call->callToken);
return OO_FAILED;
}
@@ -2420,11 +2420,11 @@ int ooSendRequestCloseLogicalChannel(OOH323CallData *call,
rclc = request->u.requestChannelClose;
memset(rclc, 0, sizeof(H245RequestChannelClose));
rclc->forwardLogicalChannelNumber = logicalChan->channelNo;
-
+
rclc->m.reasonPresent = 1;
rclc->reason.t = T_H245RequestChannelClose_reason_unknown;
- OOTRACEDBGA4("Built RequestCloseChannel for %d (%s, %s)\n",
+ OOTRACEDBGA4("Built RequestCloseChannel for %d (%s, %s)\n",
logicalChan->channelNo, call->callType, call->callToken);
ret = ooSendH245Msg(call, ph245msg);
if(ret != OO_OK)
@@ -2445,12 +2445,12 @@ int ooSendRequestChannelCloseRelease(OOH323CallData *call, int channelNum)
OOCTXT *pctxt;
H245IndicationMessage *indication;
- ret = ooCreateH245Message(call, &ph245msg,
+ ret = ooCreateH245Message(call, &ph245msg,
T_H245MultimediaSystemControlMessage_indication);
if(ret != OO_OK)
{
OOTRACEERR3("ERROR:Failed to create H245 message for "
- "RequestChannelCloseRelease message (%s, %s)\n",
+ "RequestChannelCloseRelease message (%s, %s)\n",
call->callType, call->callToken);
return OO_FAILED;
}
@@ -2465,15 +2465,15 @@ int ooSendRequestChannelCloseRelease(OOH323CallData *call, int channelNum)
if(!indication->u.requestChannelCloseRelease)
{
OOTRACEERR3("Error:Failed to allocate memory for "
- "RequestChannelCloseRelease message. (%s, %s)\n",
+ "RequestChannelCloseRelease message. (%s, %s)\n",
call->callType, call->callToken);
ooFreeH245Message(call, ph245msg);
}
- indication->u.requestChannelCloseRelease->forwardLogicalChannelNumber =
+ indication->u.requestChannelCloseRelease->forwardLogicalChannelNumber =
channelNum;
- OOTRACEDBGA4("Built RequestChannelCloseRelease for %d (%s, %s)\n",
+ OOTRACEDBGA4("Built RequestChannelCloseRelease for %d (%s, %s)\n",
channelNum, call->callType, call->callToken);
ret = ooSendH245Msg(call, ph245msg);
if(ret != OO_OK)
@@ -2487,8 +2487,8 @@ int ooSendRequestChannelCloseRelease(OOH323CallData *call, int channelNum)
}
-
-int ooOnReceivedRequestChannelClose(OOH323CallData *call,
+
+int ooOnReceivedRequestChannelClose(OOH323CallData *call,
H245RequestChannelClose *rclc)
{
int ret=0, error=0;
@@ -2499,7 +2499,7 @@ int ooOnReceivedRequestChannelClose(OOH323CallData *call,
ooLogicalChannel * lChannel=NULL;
/* Send Ack: TODO: Need to send reject, if doesn't exist
*/
- lChannel = ooFindLogicalChannelByLogicalChannelNo(call,
+ lChannel = ooFindLogicalChannelByLogicalChannelNo(call,
rclc->forwardLogicalChannelNumber);
if(!lChannel)
{
@@ -2517,7 +2517,7 @@ int ooOnReceivedRequestChannelClose(OOH323CallData *call,
return OO_FAILED;
}
}
- ret = ooCreateH245Message(call, &ph245msg,
+ ret = ooCreateH245Message(call, &ph245msg,
T_H245MultimediaSystemControlMessage_response);
if(ret != OO_OK)
{
@@ -2543,7 +2543,7 @@ int ooOnReceivedRequestChannelClose(OOH323CallData *call,
memset(rclcAck, 0, sizeof(H245RequestChannelCloseAck));
rclcAck->forwardLogicalChannelNumber = rclc->forwardLogicalChannelNumber;
- OOTRACEDBGA3("Built RequestCloseChannelAck message (%s, %s)\n",
+ OOTRACEDBGA3("Built RequestCloseChannelAck message (%s, %s)\n",
call->callType, call->callToken);
ret = ooSendH245Msg(call, ph245msg);
if(ret != OO_OK)
@@ -2554,7 +2554,7 @@ int ooOnReceivedRequestChannelClose(OOH323CallData *call,
}
ooFreeH245Message(call, ph245msg);
-
+
/* Send Close Logical Channel if LogChan is established */
if (lChannel->state == OO_LOGICALCHAN_ESTABLISHED) {
ret = ooSendCloseLogicalChannel(call, lChannel);
@@ -2587,8 +2587,8 @@ int ooSendRoundTripDelayRequest(OOH323CallData *call)
}
return OO_FAILED;
}
-
- ret = ooCreateH245Message(call, &ph245msg,
+
+ ret = ooCreateH245Message(call, &ph245msg,
T_H245MultimediaSystemControlMessage_request);
if(ret != OO_OK)
{
@@ -2613,7 +2613,7 @@ int ooSendRoundTripDelayRequest(OOH323CallData *call)
memset(rtdr, 0, sizeof(H245RoundTripDelayRequest));
rtdr->sequenceNumber = ++call->rtdrSend;
- OOTRACEDBGA3("Built RoundTripDelayRequest message (%s, %s)\n",
+ OOTRACEDBGA3("Built RoundTripDelayRequest message (%s, %s)\n",
call->callType, call->callToken);
ret = ooSendH245Msg(call, ph245msg);
if(ret != OO_OK)
@@ -2648,7 +2648,7 @@ int ooSendRoundTripDelayRequest(OOH323CallData *call)
return ret;
}
-int ooOnReceivedRoundTripDelayRequest(OOH323CallData *call,
+int ooOnReceivedRoundTripDelayRequest(OOH323CallData *call,
H245SequenceNumber sequenceNumber)
{
int ret=0;
@@ -2657,7 +2657,7 @@ int ooOnReceivedRoundTripDelayRequest(OOH323CallData *call,
OOCTXT *pctxt=NULL;
H245RoundTripDelayResponse *rtdr;
- ret = ooCreateH245Message(call, &ph245msg,
+ ret = ooCreateH245Message(call, &ph245msg,
T_H245MultimediaSystemControlMessage_response);
if(ret != OO_OK)
{
@@ -2682,7 +2682,7 @@ int ooOnReceivedRoundTripDelayRequest(OOH323CallData *call,
memset(rtdr, 0, sizeof(H245RoundTripDelayResponse));
rtdr->sequenceNumber = sequenceNumber;
- OOTRACEDBGA3("Built RoundTripDelayResponse message (%s, %s)\n",
+ OOTRACEDBGA3("Built RoundTripDelayResponse message (%s, %s)\n",
call->callType, call->callToken);
ret = ooSendH245Msg(call, ph245msg);
if(ret != OO_OK)
@@ -2692,19 +2692,19 @@ int ooOnReceivedRoundTripDelayRequest(OOH323CallData *call,
}
ooFreeH245Message(call, ph245msg);
-
+
return ret;
}
/*
- We clear channel here. Ideally the remote endpoint should send
+ We clear channel here. Ideally the remote endpoint should send
CloseLogicalChannel and then the channel should be cleared. But there's no
timer for this and if remote endpoint misbehaves, the call will keep waiting
for CloseLogicalChannel and hence, wouldn't be cleared. In case when remote
endpoint sends CloseLogicalChannel, we call ooClearLogicalChannel again,
which simply returns OO_OK as channel was already cleared. Other option is
- to start a timer for call cleanup and if call is not cleaned up within
- timeout, we clean call forcefully. Note, no such timer is defined in
+ to start a timer for call cleanup and if call is not cleaned up within
+ timeout, we clean call forcefully. Note, no such timer is defined in
standards.
*/
int ooOnReceivedRequestChannelCloseAck
@@ -2715,8 +2715,8 @@ int ooOnReceivedRequestChannelCloseAck
ret = ooClearLogicalChannel(call, rccAck->forwardLogicalChannelNumber);
if(ret != OO_OK)
{
- OOTRACEERR4("Error:Failed to clear logical channel %d. (%s, %s)\n",
- rccAck->forwardLogicalChannelNumber, call->callType,
+ OOTRACEERR4("Error:Failed to clear logical channel %d. (%s, %s)\n",
+ rccAck->forwardLogicalChannelNumber, call->callType,
call->callToken);
}
@@ -2731,37 +2731,37 @@ int ooOnReceivedRequestChannelCloseReject
{
case T_H245RequestChannelCloseReject_cause_unspecified:
OOTRACEDBGA4("Remote endpoint has rejected request to close logical "
- "channel %d - cause unspecified. (%s, %s)\n",
- rccReject->forwardLogicalChannelNumber, call->callType,
+ "channel %d - cause unspecified. (%s, %s)\n",
+ rccReject->forwardLogicalChannelNumber, call->callType,
call->callToken);
break;
case T_H245RequestChannelCloseReject_cause_extElem1:
OOTRACEDBGA4("Remote endpoint has rejected request to close logical "
- "channel %d - cause propriatory. (%s, %s)\n",
- rccReject->forwardLogicalChannelNumber, call->callType,
- call->callToken);
+ "channel %d - cause propriatory. (%s, %s)\n",
+ rccReject->forwardLogicalChannelNumber, call->callType,
+ call->callToken);
break;
default:
OOTRACEDBGA4("Remote endpoint has rejected request to close logical "
- "channel %d - cause INVALID. (%s, %s)\n",
- rccReject->forwardLogicalChannelNumber, call->callType,
+ "channel %d - cause INVALID. (%s, %s)\n",
+ rccReject->forwardLogicalChannelNumber, call->callType,
call->callToken);
}
- OOTRACEDBGA4("Clearing logical channel %d. (%s, %s)\n",
- rccReject->forwardLogicalChannelNumber, call->callType,
+ OOTRACEDBGA4("Clearing logical channel %d. (%s, %s)\n",
+ rccReject->forwardLogicalChannelNumber, call->callType,
call->callToken);
ret = ooClearLogicalChannel(call, rccReject->forwardLogicalChannelNumber);
if(ret != OO_OK)
{
- OOTRACEERR4("Error: failed to clear logical channel %d.(%s, %s)\n",
- rccReject->forwardLogicalChannelNumber, call->callType,
+ OOTRACEERR4("Error: failed to clear logical channel %d.(%s, %s)\n",
+ rccReject->forwardLogicalChannelNumber, call->callType,
call->callToken);
}
return ret;
}
/****/
-int ooOnReceivedCloseLogicalChannel(OOH323CallData *call,
+int ooOnReceivedCloseLogicalChannel(OOH323CallData *call,
H245CloseLogicalChannel* clc)
{
int ret=0;
@@ -2769,10 +2769,10 @@ int ooOnReceivedCloseLogicalChannel(OOH323CallData *call,
OOCTXT *pctxt = NULL;
H245CloseLogicalChannelAck * clcAck;
H245ResponseMessage *response;
-
+
OOTRACEINFO4("Closing logical channel number %d (%s, %s)\n",
clc->forwardLogicalChannelNumber, call->callType, call->callToken);
-
+
ret = ooClearLogicalChannel(call, clc->forwardLogicalChannelNumber);
if (ret != OO_OK) {
OOTRACEERR4("ERROR:Failed to close logical channel %d (%s, %s)\n",
@@ -2780,12 +2780,12 @@ int ooOnReceivedCloseLogicalChannel(OOH323CallData *call,
return OO_FAILED;
}
- ret = ooCreateH245Message(call, &ph245msg,
+ ret = ooCreateH245Message(call, &ph245msg,
T_H245MultimediaSystemControlMessage_response);
if(ret != OO_OK)
{
OOTRACEERR3("ERROR:Failed to create H245 message for "
- "closeLogicalChannelAck (%s, %s)\n", call->callType,
+ "closeLogicalChannelAck (%s, %s)\n", call->callType,
call->callToken);
return OO_FAILED;
}
@@ -2820,7 +2820,7 @@ int ooOnReceivedCloseLogicalChannel(OOH323CallData *call,
return ret;
}
-int ooOnReceivedCloseChannelAck(OOH323CallData* call,
+int ooOnReceivedCloseChannelAck(OOH323CallData* call,
H245CloseLogicalChannelAck* clcAck)
{
int ret = OO_OK;
@@ -2844,17 +2844,17 @@ int ooHandleH245Message(OOH323CallData *call, H245Message * pmsg)
OOTimer *pTimer = NULL;
H245Message *pH245 = (H245Message*)pmsg;
/* There are four major types of H.245 messages that can be received.
- Request/Response/Command/Indication. Each one of them need to be
+ Request/Response/Command/Indication. Each one of them need to be
handled separately.
- */
+ */
H245RequestMessage *request = NULL;
H245ResponseMessage *response = NULL;
H245CommandMessage *command = NULL;
H245IndicationMessage *indication = NULL;
-
- OOTRACEDBGC3("Handling H245 message. (%s, %s)\n", call->callType,
+
+ OOTRACEDBGC3("Handling H245 message. (%s, %s)\n", call->callType,
call->callToken);
-
+
switch(pH245->h245Msg.t)
{
/* H.245 Request message is received */
@@ -2863,22 +2863,22 @@ int ooHandleH245Message(OOH323CallData *call, H245Message * pmsg)
switch(request->t)
{
case T_H245RequestMessage_terminalCapabilitySet:
- /* 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_ACTIVE;
+ call->h245SessionState = OO_H245SESSION_ACTIVE;
ooOnReceivedTerminalCapabilitySet(call, pH245);
if(call->localTermCapState == OO_LocalTermCapExchange_Idle)
ooSendTermCapMsg(call);
break;
case T_H245RequestMessage_masterSlaveDetermination:
- ooHandleMasterSlave(call,
- request->u.masterSlaveDetermination,
+ ooHandleMasterSlave(call,
+ request->u.masterSlaveDetermination,
OOMasterSlaveDetermination);
break;
case T_H245RequestMessage_openLogicalChannel:
- ooHandleOpenLogicalChannel(call,
+ ooHandleOpenLogicalChannel(call,
request->u.openLogicalChannel);
if(!ooGetTransmitLogicalChannel(call))
ooOpenLogicalChannels(call);
@@ -2886,14 +2886,14 @@ int ooHandleH245Message(OOH323CallData *call, H245Message * pmsg)
case T_H245RequestMessage_requestMode:
OOTRACEINFO4("Received request mode - %d (%s, %s)\n",
request->u.requestMode->sequenceNumber, call->callType, call->callToken);
- ooHandleRequestMode(call,
+ ooHandleRequestMode(call,
request->u.requestMode);
break;
case T_H245RequestMessage_closeLogicalChannel:
OOTRACEINFO4("Received close logical Channel - %d (%s, %s)\n",
- request->u.closeLogicalChannel->forwardLogicalChannelNumber,
+ request->u.closeLogicalChannel->forwardLogicalChannelNumber,
call->callType, call->callToken);
- if (ooOnReceivedCloseLogicalChannel(call,
+ if (ooOnReceivedCloseLogicalChannel(call,
request->u.closeLogicalChannel) == OO_OK) {
if (call->TCSPending && !ooGetTransmitLogicalChannel(call)) {
call->TCSPending = FALSE;
@@ -2906,9 +2906,9 @@ int ooHandleH245Message(OOH323CallData *call, H245Message * pmsg)
break;
case T_H245RequestMessage_requestChannelClose:
OOTRACEINFO4("Received RequestChannelClose - %d (%s, %s)\n",
- request->u.requestChannelClose->forwardLogicalChannelNumber,
+ request->u.requestChannelClose->forwardLogicalChannelNumber,
call->callType, call->callToken);
- ooOnReceivedRequestChannelClose(call,
+ ooOnReceivedRequestChannelClose(call,
request->u.requestChannelClose);
break;
case T_H245RequestMessage_roundTripDelayRequest:
@@ -2920,7 +2920,7 @@ int ooHandleH245Message(OOH323CallData *call, H245Message * pmsg)
;
} /* End of Request Message */
break;
- /* H.245 Response message is received */
+ /* H.245 Response message is received */
case (T_H245MultimediaSystemControlMessage_response):
response = pH245->h245Msg.u.response;
switch(response->t)
@@ -2941,8 +2941,8 @@ int ooHandleH245Message(OOH323CallData *call, H245Message * pmsg)
}
}
- ooHandleMasterSlave(call,
- response->u.masterSlaveDeterminationAck,
+ ooHandleMasterSlave(call,
+ response->u.masterSlaveDeterminationAck,
OOMasterSlaveAck);
break;
case T_H245ResponseMessage_masterSlaveDeterminationReject:
@@ -2960,7 +2960,7 @@ int ooHandleH245Message(OOH323CallData *call, H245Message * pmsg)
break;
}
}
- ooHandleMasterSlaveReject(call,
+ ooHandleMasterSlaveReject(call,
response->u.masterSlaveDeterminationReject);
break;
case T_H245ResponseMessage_terminalCapabilitySetAck:
@@ -2983,11 +2983,11 @@ int ooHandleH245Message(OOH323CallData *call, H245Message * pmsg)
case T_H245ResponseMessage_terminalCapabilitySetReject:
OOTRACEINFO3("TerminalCapabilitySetReject message received."
" (%s, %s)\n", call->callType, call->callToken);
- if(response->u.terminalCapabilitySetReject->sequenceNumber !=
+ if(response->u.terminalCapabilitySetReject->sequenceNumber !=
call->localTermCapSeqNo)
{
OOTRACEINFO5("Ignoring TCSReject with mismatched seqno %d "
- "(local - %d). (%s, %s)\n",
+ "(local - %d). (%s, %s)\n",
response->u.terminalCapabilitySetReject->sequenceNumber,
call->localTermCapSeqNo, call->callType, call->callToken);
break;
@@ -3032,19 +3032,19 @@ int ooHandleH245Message(OOH323CallData *call, H245Message * pmsg)
{
pNode = dListFindByIndex(&call->timerList, i);
pTimer = (OOTimer*)pNode->data;
- if((((ooTimerCallback*)pTimer->cbData)->timerType & OO_OLC_TIMER) &&
- ((ooTimerCallback*)pTimer->cbData)->channelNumber ==
+ if((((ooTimerCallback*)pTimer->cbData)->timerType & OO_OLC_TIMER) &&
+ ((ooTimerCallback*)pTimer->cbData)->channelNumber ==
response->u.openLogicalChannelAck->forwardLogicalChannelNumber)
{
memFreePtr(call->pctxt, pTimer->cbData);
ooTimerDelete(call->pctxt, &call->timerList, pTimer);
- OOTRACEDBGC3("Deleted OpenLogicalChannel Timer. (%s, %s)\n",
+ OOTRACEDBGC3("Deleted OpenLogicalChannel Timer. (%s, %s)\n",
call->callType, call->callToken);
break;
}
}
- ooOnReceivedOpenLogicalChannelAck(call,
+ ooOnReceivedOpenLogicalChannelAck(call,
response->u.openLogicalChannelAck);
break;
case T_H245ResponseMessage_openLogicalChannelReject:
@@ -3054,19 +3054,19 @@ int ooHandleH245Message(OOH323CallData *call, H245Message * pmsg)
{
pNode = dListFindByIndex(&call->timerList, i);
pTimer = (OOTimer*)pNode->data;
- if((((ooTimerCallback*)pTimer->cbData)->timerType & OO_OLC_TIMER) &&
- ((ooTimerCallback*)pTimer->cbData)->channelNumber ==
+ if((((ooTimerCallback*)pTimer->cbData)->timerType & OO_OLC_TIMER) &&
+ ((ooTimerCallback*)pTimer->cbData)->channelNumber ==
response->u.openLogicalChannelAck->forwardLogicalChannelNumber)
{
ASN1MEMFREEPTR(call->pctxt, pTimer->cbData);
ooTimerDelete(call->pctxt, &call->timerList, pTimer);
- OOTRACEDBGC3("Deleted OpenLogicalChannel Timer. (%s, %s)\n",
+ OOTRACEDBGC3("Deleted OpenLogicalChannel Timer. (%s, %s)\n",
call->callType, call->callToken);
break;
}
}
- ooOnReceivedOpenLogicalChannelRejected(call,
+ ooOnReceivedOpenLogicalChannelRejected(call,
response->u.openLogicalChannelReject);
break;
case T_H245ResponseMessage_closeLogicalChannelAck:
@@ -3077,8 +3077,8 @@ int ooHandleH245Message(OOH323CallData *call, H245Message * pmsg)
{
pNode = dListFindByIndex(&call->timerList, i);
pTimer = (OOTimer*)pNode->data;
- if((((ooTimerCallback*)pTimer->cbData)->timerType & OO_CLC_TIMER) &&
- ((ooTimerCallback*)pTimer->cbData)->channelNumber ==
+ if((((ooTimerCallback*)pTimer->cbData)->timerType & OO_CLC_TIMER) &&
+ ((ooTimerCallback*)pTimer->cbData)->channelNumber ==
response->u.closeLogicalChannelAck->forwardLogicalChannelNumber)
{
@@ -3089,7 +3089,7 @@ int ooHandleH245Message(OOH323CallData *call, H245Message * pmsg)
break;
}
}
- ooOnReceivedCloseChannelAck(call,
+ ooOnReceivedCloseChannelAck(call,
response->u.closeLogicalChannelAck);
if (call->TCSPending && !ooGetReceiveLogicalChannel(call)) {
call->TCSPending = FALSE;
@@ -3107,8 +3107,8 @@ int ooHandleH245Message(OOH323CallData *call, H245Message * pmsg)
{
pNode = dListFindByIndex(&call->timerList, i);
pTimer = (OOTimer*)pNode->data;
- if((((ooTimerCallback*)pTimer->cbData)->timerType & OO_RCC_TIMER) &&
- ((ooTimerCallback*)pTimer->cbData)->channelNumber ==
+ if((((ooTimerCallback*)pTimer->cbData)->timerType & OO_RCC_TIMER) &&
+ ((ooTimerCallback*)pTimer->cbData)->channelNumber ==
response->u.requestChannelCloseAck->forwardLogicalChannelNumber)
{
@@ -3129,8 +3129,8 @@ int ooHandleH245Message(OOH323CallData *call, H245Message * pmsg)
{
pNode = dListFindByIndex(&call->timerList, i);
pTimer = (OOTimer*)pNode->data;
- if((((ooTimerCallback*)pTimer->cbData)->timerType & OO_RCC_TIMER) &&
- ((ooTimerCallback*)pTimer->cbData)->channelNumber ==
+ if((((ooTimerCallback*)pTimer->cbData)->timerType & OO_RCC_TIMER) &&
+ ((ooTimerCallback*)pTimer->cbData)->channelNumber ==
response->u.requestChannelCloseReject->forwardLogicalChannelNumber)
{
@@ -3141,7 +3141,7 @@ int ooHandleH245Message(OOH323CallData *call, H245Message * pmsg)
break;
}
}
- ooOnReceivedRequestChannelCloseReject(call,
+ ooOnReceivedRequestChannelCloseReject(call,
response->u.requestChannelCloseReject);
break;
case T_H245ResponseMessage_roundTripDelayResponse:
@@ -3174,7 +3174,7 @@ int ooHandleH245Message(OOH323CallData *call, H245Message * pmsg)
default:
;
}
- OOTRACEDBGC3("Finished handling H245 message. (%s, %s)\n",
+ OOTRACEDBGC3("Finished handling H245 message. (%s, %s)\n",
call->callType, call->callToken);
return OO_OK;
}
@@ -3183,19 +3183,19 @@ int ooHandleH245Message(OOH323CallData *call, H245Message * pmsg)
int ooOnReceivedUserInputIndication
(OOH323CallData *call, H245UserInputIndication *indication)
{
- if((indication->t == T_H245UserInputIndication_alphanumeric) &&
+ if((indication->t == T_H245UserInputIndication_alphanumeric) &&
(call->dtmfmode & OO_CAP_DTMF_H245_alphanumeric))
{
if(gH323ep.h323Callbacks.onReceivedDTMF)
gH323ep.h323Callbacks.onReceivedDTMF(call,indication->u.alphanumeric);
}
- else if((indication->t == T_H245UserInputIndication_signal) &&
+ else if((indication->t == T_H245UserInputIndication_signal) &&
(call->dtmfmode & OO_CAP_DTMF_H245_signal)) {
if(call->lastDTMF && indication->u.signal->signalType[0] == call->lastDTMF &&
- call->nextDTMFstamp && indication->u.signal->m.rtpPresent &&
+ call->nextDTMFstamp && indication->u.signal->m.rtpPresent &&
indication->u.signal->rtp.m.timestampPresent) {
if(call->nextDTMFstamp > indication->u.signal->rtp.timestamp) {
- OOTRACEERR4("ERROR:Duplicate dtmf %c on ((%s, %s)\n", call->lastDTMF, call->callType,
+ OOTRACEERR4("ERROR:Duplicate dtmf %c on ((%s, %s)\n", call->lastDTMF, call->callType,
call->callToken);
return OO_OK;
}
@@ -3210,7 +3210,7 @@ int ooOnReceivedUserInputIndication
call->lastDTMF = 0;
}
if(gH323ep.h323Callbacks.onReceivedDTMF)
- gH323ep.h323Callbacks.onReceivedDTMF(call,
+ gH323ep.h323Callbacks.onReceivedDTMF(call,
indication->u.signal->signalType);
}
else {
@@ -3232,9 +3232,9 @@ int ooOnReceivedTerminalCapabilitySet(OOH323CallData *call, H245Message *pmsg)
if(call->remoteTermCapSeqNo > tcs->sequenceNumber)
{
OOTRACEINFO4("Rejecting TermCapSet message with SeqNo %d, as already "
- "acknowledged message with this SeqNo (%s, %s)\n",
+ "acknowledged message with this SeqNo (%s, %s)\n",
call->remoteTermCapSeqNo, call->callType, call->callToken);
- ooSendTerminalCapabilitySetReject(call, tcs->sequenceNumber,
+ ooSendTerminalCapabilitySetReject(call, tcs->sequenceNumber,
T_H245TerminalCapabilitySetReject_cause_unspecified);
return OO_OK;
@@ -3247,7 +3247,7 @@ int ooOnReceivedTerminalCapabilitySet(OOH323CallData *call, H245Message *pmsg)
*/
/* 20111103 */
-/* for addition for previous we must check repeated tcs if it's not first
+/* for addition for previous we must check repeated tcs if it's not first
tcs i.e. SeqNo is not null */
if(call->remoteTermCapSeqNo && call->remoteTermCapSeqNo == tcs->sequenceNumber)
@@ -3286,7 +3286,7 @@ int ooOnReceivedTerminalCapabilitySet(OOH323CallData *call, H245Message *pmsg)
pNode = dListFindByIndex(&tcs->capabilityTable, k);
if(pNode)
{
- OOTRACEDBGC4("Processing CapabilityTable Entry %d (%s, %s)\n",
+ OOTRACEDBGC4("Processing CapabilityTable Entry %d (%s, %s)\n",
k, call->callType, call->callToken);
capEntry = (H245CapabilityTableEntry*) pNode->data;
if(capEntry->m.capabilityPresent){
@@ -3294,7 +3294,7 @@ int ooOnReceivedTerminalCapabilitySet(OOH323CallData *call, H245Message *pmsg)
if(ret != OO_OK)
{
OOTRACEERR4("Error:Failed to process remote capability in "
- "capability table at index %d. (%s, %s)\n",
+ "capability table at index %d. (%s, %s)\n",
k, call->callType, call->callToken);
}
ooCapabilityUpdateJointCapabilities(call, &capEntry->capability);
@@ -3309,11 +3309,11 @@ int ooOnReceivedTerminalCapabilitySet(OOH323CallData *call, H245Message *pmsg)
OO_SETFLAG(call->flags, OO_M_T38SUPPORTED);
else
OO_CLRFLAG(call->flags, OO_M_T38SUPPORTED);
-
+
/* Update remoteTermCapSetState */
call->remoteTermCapState = OO_RemoteTermCapSetRecvd;
- ooH245AcknowledgeTerminalCapabilitySet(call);
+ ooH245AcknowledgeTerminalCapabilitySet(call);
/* If we haven't yet send TCS then send it now */
if(call->localTermCapState == OO_LocalTermCapExchange_Idle)
@@ -3338,7 +3338,7 @@ int ooOnReceivedTerminalCapabilitySet(OOH323CallData *call, H245Message *pmsg)
"(%s, %s)\n", call->callType, call->callToken);
return ret;
}
- }
+ }
/* Check MasterSlave procedure has finished */
@@ -3348,7 +3348,7 @@ int ooOnReceivedTerminalCapabilitySet(OOH323CallData *call, H245Message *pmsg)
/* As both MasterSlave and TerminalCapabilitySet procedures have finished,
OpenLogicalChannels */
-
+
if(gH323ep.h323Callbacks.openLogicalChannels)
gH323ep.h323Callbacks.openLogicalChannels(call);
@@ -3373,7 +3373,7 @@ int ooSendTerminalCapabilitySetReject
H245Message *ph245msg=NULL;
H245ResponseMessage * response=NULL;
OOCTXT *pctxt=NULL;
- int ret = ooCreateH245Message(call, &ph245msg,
+ int ret = ooCreateH245Message(call, &ph245msg,
T_H245MultimediaSystemControlMessage_response);
if(ret != OO_OK)
{
@@ -3387,18 +3387,18 @@ int ooSendTerminalCapabilitySetReject
/* pctxt = &gH323ep.msgctxt; */
pctxt = call->msgctxt;
response->t = T_H245ResponseMessage_terminalCapabilitySetReject;
-
+
response->u.terminalCapabilitySetReject = (H245TerminalCapabilitySetReject*)
ASN1MALLOC(pctxt, sizeof(H245TerminalCapabilitySetReject));
- memset(response->u.terminalCapabilitySetReject, 0,
+ memset(response->u.terminalCapabilitySetReject, 0,
sizeof(H245TerminalCapabilitySetReject));
response->u.terminalCapabilitySetReject->sequenceNumber = seqNo;
response->u.terminalCapabilitySetReject->cause.t = cause;
- OOTRACEDBGA3("Built TerminalCapabilitySetReject (%s, %s)\n",
+ OOTRACEDBGA3("Built TerminalCapabilitySetReject (%s, %s)\n",
call->callType, call->callToken);
-
+
ret = ooSendH245Msg(call, ph245msg);
if(ret != OO_OK)
{
@@ -3417,7 +3417,7 @@ int ooH245AcknowledgeTerminalCapabilitySet(OOH323CallData *call)
H245Message *ph245msg=NULL;
H245ResponseMessage * response=NULL;
OOCTXT *pctxt=NULL;
- int ret = ooCreateH245Message(call, &ph245msg,
+ int ret = ooCreateH245Message(call, &ph245msg,
T_H245MultimediaSystemControlMessage_response);
if(ret != OO_OK)
{
@@ -3431,15 +3431,15 @@ int ooH245AcknowledgeTerminalCapabilitySet(OOH323CallData *call)
/* pctxt = &gH323ep.msgctxt; */
pctxt = call->msgctxt;
response->t = T_H245ResponseMessage_terminalCapabilitySetAck;
-
+
response->u.terminalCapabilitySetAck = (H245TerminalCapabilitySetAck*)
ASN1MALLOC(pctxt, sizeof(H245TerminalCapabilitySetAck));
- memset(response->u.terminalCapabilitySetAck, 0,
+ memset(response->u.terminalCapabilitySetAck, 0,
sizeof(H245TerminalCapabilitySetAck));
response->u.terminalCapabilitySetAck->sequenceNumber = call->remoteTermCapSeqNo;
- OOTRACEDBGA3("Built TerminalCapabilitySet Ack (%s, %s)\n",
+ OOTRACEDBGA3("Built TerminalCapabilitySet Ack (%s, %s)\n",
call->callType, call->callToken);
ret = ooSendH245Msg(call, ph245msg);
@@ -3468,7 +3468,7 @@ int ooSendTerminalCapabilitySetRelease(OOH323CallData * call)
if (ret != OO_OK) {
OOTRACEERR3("Error:H245 message creation failed for - Terminal"
- "CapabilitySetRelease (%s, %s)\n",call->callType,
+ "CapabilitySetRelease (%s, %s)\n",call->callType,
call->callToken);
return OO_FAILED;
}
@@ -3477,7 +3477,7 @@ int ooSendTerminalCapabilitySetRelease(OOH323CallData * call)
indication->t = T_H245IndicationMessage_terminalCapabilitySetRelease;
- indication->u.terminalCapabilitySetRelease =
+ indication->u.terminalCapabilitySetRelease =
(H245TerminalCapabilitySetRelease*)
memAlloc (pctxt, sizeof(H245TerminalCapabilitySetRelease));
@@ -3488,18 +3488,18 @@ int ooSendTerminalCapabilitySetRelease(OOH323CallData * call)
ooFreeH245Message(call, ph245msg);
return OO_FAILED;
}
- OOTRACEDBGA3 ("Built TerminalCapabilitySetRelease (%s, %s)\n",
+ OOTRACEDBGA3 ("Built TerminalCapabilitySetRelease (%s, %s)\n",
call->callType, call->callToken);
ret = ooSendH245Msg (call, ph245msg);
if (ret != OO_OK) {
- OOTRACEERR3
+ OOTRACEERR3
("Error:Failed to enqueue TerminalCapabilitySetRelease "
- "message to outbound queue.(%s, %s)\n", call->callType,
+ "message to outbound queue.(%s, %s)\n", call->callType,
call->callToken);
}
-
+
ooFreeH245Message (call, ph245msg);
return ret;
}
@@ -3519,7 +3519,7 @@ int ooSendH245UserInputIndication_alphanumeric
if (ret != OO_OK) {
OOTRACEERR3("Error:H245 message creation failed for - H245UserInput"
- "Indication_alphanumeric (%s, %s)\n",call->callType,
+ "Indication_alphanumeric (%s, %s)\n",call->callType,
call->callToken);
return OO_FAILED;
}
@@ -3527,7 +3527,7 @@ int ooSendH245UserInputIndication_alphanumeric
indication = ph245msg->h245Msg.u.indication;
indication->t = T_H245IndicationMessage_userInput;
- indication->u.userInput =
+ indication->u.userInput =
(H245UserInputIndication*)
memAllocZ (pctxt, sizeof(H245UserInputIndication));
@@ -3549,18 +3549,18 @@ int ooSendH245UserInputIndication_alphanumeric
return OO_FAILED;
}
strcpy(*(char**)&indication->u.userInput->u.alphanumeric, data);
- OOTRACEDBGA3 ("Built UserInputIndication_alphanumeric (%s, %s)\n",
+ OOTRACEDBGA3 ("Built UserInputIndication_alphanumeric (%s, %s)\n",
call->callType, call->callToken);
ret = ooSendH245Msg (call, ph245msg);
if (ret != OO_OK) {
- OOTRACEERR3
+ OOTRACEERR3
("Error:Failed to enqueue UserInputIndication_alphanumeric "
- "message to outbound queue.(%s, %s)\n", call->callType,
+ "message to outbound queue.(%s, %s)\n", call->callType,
call->callToken);
}
-
+
ooFreeH245Message (call, ph245msg);
return ret;
}
@@ -3579,7 +3579,7 @@ int ooSendH245UserInputIndication_signal
if (ret != OO_OK) {
OOTRACEERR3("Error:H245 message creation failed for - H245UserInput"
- "Indication_signal (%s, %s)\n",call->callType,
+ "Indication_signal (%s, %s)\n",call->callType,
call->callToken);
return OO_FAILED;
}
@@ -3587,7 +3587,7 @@ int ooSendH245UserInputIndication_signal
indication = ph245msg->h245Msg.u.indication;
indication->t = T_H245IndicationMessage_userInput;
- indication->u.userInput =
+ indication->u.userInput =
(H245UserInputIndication*)
memAllocZ (pctxt, sizeof(H245UserInputIndication));
@@ -3612,18 +3612,18 @@ int ooSendH245UserInputIndication_signal
return OO_FAILED;
}
strcpy(*(char**)&indication->u.userInput->u.signal->signalType, data);
- OOTRACEDBGA3 ("Built UserInputIndication_signal (%s, %s)\n",
+ OOTRACEDBGA3 ("Built UserInputIndication_signal (%s, %s)\n",
call->callType, call->callToken);
ret = ooSendH245Msg (call, ph245msg);
if (ret != OO_OK) {
- OOTRACEERR3
+ OOTRACEERR3
("Error:Failed to enqueue UserInputIndication_signal "
- "message to outbound queue.(%s, %s)\n", call->callType,
+ "message to outbound queue.(%s, %s)\n", call->callType,
call->callToken);
}
-
+
ooFreeH245Message (call, ph245msg);
return ret;
}
@@ -3632,8 +3632,8 @@ int ooSendH245UserInputIndication_signal
int ooOpenLogicalChannels(OOH323CallData *call)
{
int ret=0;
- OOTRACEINFO3("Opening logical channels (%s, %s)\n", call->callType,
- call->callToken);
+ OOTRACEINFO3("Opening logical channels (%s, %s)\n", call->callType,
+ call->callToken);
/* Audio channels */
if(gH323ep.callMode == OO_CALLMODE_AUDIOCALL ||
@@ -3654,7 +3654,7 @@ int ooOpenLogicalChannels(OOH323CallData *call)
return ret;
}
}
-
+
if(gH323ep.callMode == OO_CALLMODE_VIDEOCALL)
{
/* if (!OO_TESTFLAG (call->flags, OO_M_AUDIOSESSION))
@@ -3704,11 +3704,11 @@ int ooOpenLogicalChannel(OOH323CallData *call, enum OOCapType capType )
" (%s, %s)\n", call->callType, call->callToken);
return OO_FAILED;
}
-
+
/* Go through local endpoints capabilities sequentially, and find out the
first one which has a match in the remote endpoints receive capabilities.
*/
- OOTRACEINFO3("Looking for matching capabilities. (%s, %s)\n",
+ OOTRACEINFO3("Looking for matching capabilities. (%s, %s)\n",
call->callType, call->callToken);
/* May */
if(call->masterSlaveState == OO_MasterSlave_Master)
@@ -3716,11 +3716,11 @@ int ooOpenLogicalChannel(OOH323CallData *call, enum OOCapType capType )
for(k=0; k<call->capPrefs.index; k++)
{
/*Search for audio caps only */
- if(capType == OO_CAP_TYPE_AUDIO &&
+ if(capType == OO_CAP_TYPE_AUDIO &&
call->capPrefs.order[k] > OO_CAP_VIDEO_BASE)
continue;
/* Search for video caps only */
- if(capType == OO_CAP_TYPE_VIDEO &&
+ if(capType == OO_CAP_TYPE_VIDEO &&
call->capPrefs.order[k] <= OO_CAP_VIDEO_BASE)
continue;
@@ -3743,7 +3743,7 @@ int ooOpenLogicalChannel(OOH323CallData *call, enum OOCapType capType )
if(!epCap)
{
OOTRACEERR4("ERROR:Incompatible capabilities - Can not open "
- "%s channel (%s, %s)\n",
+ "%s channel (%s, %s)\n",
(capType==OO_CAP_TYPE_AUDIO)?"audio":"video", call->callType,
call->callToken);
return OO_FAILED;
@@ -3761,12 +3761,12 @@ int ooOpenLogicalChannel(OOH323CallData *call, enum OOCapType capType )
if(!epCap)
{
OOTRACEERR4("ERROR:Incompatible audio capabilities - Can not open "
- "%s channel (%s, %s)\n",
+ "%s channel (%s, %s)\n",
(capType==OO_CAP_TYPE_AUDIO)?"audio":"video", call->callType,
call->callToken);
return OO_FAILED;
}
-
+
}
switch(epCap->cap)
@@ -3792,9 +3792,9 @@ int ooOpenLogicalChannel(OOH323CallData *call, enum OOCapType capType )
ooOpenChannel(call, epCap);
break;
-
+
default:
- OOTRACEERR3("ERROR:Unknown Audio Capability type (%s, %s)\n",
+ OOTRACEERR3("ERROR:Unknown Audio Capability type (%s, %s)\n",
call->callType, call->callToken);
}
return OO_OK;
@@ -3816,17 +3816,17 @@ int ooOpenChannel(OOH323CallData* call, ooH323EpCapability *epCap)
H245UnicastAddress_iP6Address *iP6Address = NULL;
unsigned session_id=0;
ooLogicalChannel *pLogicalChannel = NULL;
-
- OOTRACEDBGC4("Doing Open Channel for %s. (%s, %s)\n",
- ooGetCapTypeText(epCap->cap), call->callType,
+
+ OOTRACEDBGC4("Doing Open Channel for %s. (%s, %s)\n",
+ ooGetCapTypeText(epCap->cap), call->callType,
call->callToken);
- ret = ooCreateH245Message(call, &ph245msg,
+ ret = ooCreateH245Message(call, &ph245msg,
T_H245MultimediaSystemControlMessage_request);
if(ret != OO_OK)
{
OOTRACEERR4("Error: H245 message creation failed for - Open %s"
- "channel (%s, %s)\n", ooGetCapTypeText(epCap->cap),
+ "channel (%s, %s)\n", ooGetCapTypeText(epCap->cap),
call->callType, call->callToken);
return OO_FAILED;
}
@@ -3835,7 +3835,7 @@ int ooOpenChannel(OOH323CallData* call, ooH323EpCapability *epCap)
ph245msg->logicalChannelNo = call->logicalChanNoCur++;
if(call->logicalChanNoCur > call->logicalChanNoMax)
- call->logicalChanNoCur = call->logicalChanNoBase;
+ call->logicalChanNoCur = call->logicalChanNoBase;
request = ph245msg->h245Msg.u.request;
/* pctxt = &gH323ep.msgctxt; */
@@ -3852,19 +3852,19 @@ int ooOpenChannel(OOH323CallData* call, ooH323EpCapability *epCap)
return OO_FAILED;
}
- memset(request->u.openLogicalChannel, 0,
+ memset(request->u.openLogicalChannel, 0,
sizeof(H245OpenLogicalChannel));
- request->u.openLogicalChannel->forwardLogicalChannelNumber =
+ request->u.openLogicalChannel->forwardLogicalChannelNumber =
ph245msg->logicalChannelNo;
-
+
session_id = ooCallGenerateSessionID(call, epCap->capType, "transmit");
- pLogicalChannel = ooAddNewLogicalChannel(call,
+ pLogicalChannel = ooAddNewLogicalChannel(call,
request->u.openLogicalChannel->forwardLogicalChannelNumber,
session_id, "transmit", epCap);
-
+
if(!pLogicalChannel)
{
OOTRACEERR3("ERROR:Failed to add new logical channel entry (%s, %s)\n",
@@ -3887,29 +3887,29 @@ int ooOpenChannel(OOH323CallData* call, ooH323EpCapability *epCap)
if(!audioCap)
{
OOTRACEERR4("Error:Failed to create duplicate audio capability in "
- "ooOpenChannel- %s (%s, %s)\n",
- ooGetCapTypeText(epCap->cap), call->callType,
+ "ooOpenChannel- %s (%s, %s)\n",
+ ooGetCapTypeText(epCap->cap), call->callType,
call->callToken);
ooFreeH245Message(call, ph245msg);
return OO_FAILED;
}
-
+
flcp->dataType.u.audioData = audioCap;
}
else if(epCap->capType == OO_CAP_TYPE_VIDEO)
{
- flcp->dataType.t = T_H245DataType_videoData;
+ flcp->dataType.t = T_H245DataType_videoData;
videoCap = ooCapabilityCreateVideoCapability(epCap, pctxt, OOTX);
if(!videoCap)
{
OOTRACEERR4("Error:Failed to create duplicate video capability in "
- "ooOpenChannel- %s (%s, %s)\n",
- ooGetCapTypeText(epCap->cap), call->callType,
+ "ooOpenChannel- %s (%s, %s)\n",
+ ooGetCapTypeText(epCap->cap), call->callType,
call->callToken);
ooFreeH245Message(call, ph245msg);
return OO_FAILED;
}
-
+
flcp->dataType.u.videoData = videoCap;
}
else if(epCap->capType == OO_CAP_TYPE_DATA)
@@ -3920,13 +3920,13 @@ int ooOpenChannel(OOH323CallData* call, ooH323EpCapability *epCap)
if(!t38Cap)
{
OOTRACEERR4("Error:Failed to create duplicate T38 capability in "
- "ooOpenChannel- %s (%s, %s)\n",
- ooGetCapTypeText(epCap->cap), call->callType,
+ "ooOpenChannel- %s (%s, %s)\n",
+ ooGetCapTypeText(epCap->cap), call->callType,
call->callToken);
ooFreeH245Message(call, ph245msg);
return OO_FAILED;
}
-
+
flcp->dataType.u.data = t38Cap;
}
else{
@@ -3934,11 +3934,11 @@ int ooOpenChannel(OOH323CallData* call, ooH323EpCapability *epCap)
return OO_FAILED;
}
-
- flcp->multiplexParameters.t =
+
+ flcp->multiplexParameters.t =
T_H245OpenLogicalChannel_forwardLogicalChannelParameters_multiplexParameters_h2250LogicalChannelParameters;
- flcp->multiplexParameters.u.h2250LogicalChannelParameters =
- (H245H2250LogicalChannelParameters*)ASN1MALLOC(pctxt,
+ flcp->multiplexParameters.u.h2250LogicalChannelParameters =
+ (H245H2250LogicalChannelParameters*)ASN1MALLOC(pctxt,
sizeof(H245H2250LogicalChannelParameters));
h2250lcp = flcp->multiplexParameters.u.h2250LogicalChannelParameters;
@@ -3949,8 +3949,8 @@ int ooOpenChannel(OOH323CallData* call, ooH323EpCapability *epCap)
h2250lcp->mediaGuaranteedDelivery = 0;
h2250lcp->silenceSuppression = 0;
h2250lcp->m.mediaControlChannelPresent = 1;
-
- h2250lcp->mediaControlChannel.t =
+
+ h2250lcp->mediaControlChannel.t =
T_H245TransportAddress_unicastAddress;
h2250lcp->mediaControlChannel.u.unicastAddress = (H245UnicastAddress*)
ASN1MALLOC(pctxt, sizeof(H245UnicastAddress));
@@ -3978,9 +3978,9 @@ int ooOpenChannel(OOH323CallData* call, ooH323EpCapability *epCap)
iPAddress->network.numocts = 4;
iPAddress->tsapIdentifier = pLogicalChannel->localRtcpPort;
}
- pLogicalChannel->state = OO_LOGICALCHAN_PROPOSED;
- OOTRACEDBGA4("Built OpenLogicalChannel-%s (%s, %s)\n",
- ooGetCapTypeText(epCap->cap), call->callType,
+ pLogicalChannel->state = OO_LOGICALCHAN_PROPOSED;
+ OOTRACEDBGA4("Built OpenLogicalChannel-%s (%s, %s)\n",
+ ooGetCapTypeText(epCap->cap), call->callType,
call->callToken);
ret = ooSendH245Msg(call, ph245msg);
if(ret != OO_OK)
@@ -3990,17 +3990,17 @@ int ooOpenChannel(OOH323CallData* call, ooH323EpCapability *epCap)
call->callToken);
}
ooFreeH245Message(call, ph245msg);
-
+
return ret;
}
-/* Used to build OLCs for fast connect. Keep in mind that forward and
- reverse
- are always with respect to the endpoint which proposes channels
+/* Used to build OLCs for fast connect. Keep in mind that forward and
+ reverse
+ are always with respect to the endpoint which proposes channels
TODO: Need to clean logical channel in case of failure. */
int ooBuildFastStartOLC
- (OOH323CallData *call, H245OpenLogicalChannel *olc,
+ (OOH323CallData *call, H245OpenLogicalChannel *olc,
ooH323EpCapability *epCap, OOCTXT*pctxt, int dir)
{
OOBOOL reverse=FALSE, forward=FALSE;
@@ -4015,16 +4015,16 @@ int ooBuildFastStartOLC
ooLogicalChannel *pLogicalChannel = NULL;
int outgoing=FALSE;
- if(!strcmp(call->callType, "outgoing"))
+ if(!strcmp(call->callType, "outgoing"))
outgoing = TRUE;
-
+
if(dir & OORX)
{
OOTRACEDBGA3("Building OpenLogicalChannel for Receive Capability "
"(%s, %s)\n", call->callType, call->callToken);
session_id = ooCallGenerateSessionID(call, epCap->capType, "receive");
- pLogicalChannel = ooAddNewLogicalChannel(call,
- olc->forwardLogicalChannelNumber, session_id,
+ pLogicalChannel = ooAddNewLogicalChannel(call,
+ olc->forwardLogicalChannelNumber, session_id,
"receive", epCap);
if(outgoing)
reverse = TRUE;
@@ -4036,7 +4036,7 @@ int ooBuildFastStartOLC
OOTRACEDBGA3("Building OpenLogicalChannel for transmit Capability "
"(%s, %s)\n", call->callType, call->callToken);
session_id = ooCallGenerateSessionID(call, epCap->capType, "transmit");
- pLogicalChannel = ooAddNewLogicalChannel(call,
+ pLogicalChannel = ooAddNewLogicalChannel(call,
olc->forwardLogicalChannelNumber, session_id,
"transmit", epCap);
if(outgoing)
@@ -4057,16 +4057,16 @@ int ooBuildFastStartOLC
if(forward)
{
- OOTRACEDBGC3("Building forward olc. (%s, %s)\n", call->callType,
+ OOTRACEDBGC3("Building forward olc. (%s, %s)\n", call->callType,
call->callToken);
flcp = &(olc->forwardLogicalChannelParameters);
- memset(flcp, 0,
+ memset(flcp, 0,
sizeof(H245OpenLogicalChannel_forwardLogicalChannelParameters));
if(epCap->capType == OO_CAP_TYPE_AUDIO) {
sessionID =1;
flcp->dataType.t = T_H245DataType_audioData;
- flcp->dataType.u.audioData = ooCapabilityCreateAudioCapability(epCap,
+ flcp->dataType.u.audioData = ooCapabilityCreateAudioCapability(epCap,
pctxt, dir);
}
else if(epCap->capType == OO_CAP_TYPE_VIDEO) {
@@ -4076,41 +4076,41 @@ int ooBuildFastStartOLC
pctxt, dir);
}
flcp->multiplexParameters.t = T_H245OpenLogicalChannel_forwardLogicalChannelParameters_multiplexParameters_h2250LogicalChannelParameters;
- pH2250lcp1 = (H245H2250LogicalChannelParameters*)ASN1MALLOC(pctxt,
+ pH2250lcp1 = (H245H2250LogicalChannelParameters*)ASN1MALLOC(pctxt,
sizeof(H245H2250LogicalChannelParameters));
memset(pH2250lcp1, 0, sizeof(H245H2250LogicalChannelParameters));
flcp->multiplexParameters.t = T_H245OpenLogicalChannel_forwardLogicalChannelParameters_multiplexParameters_h2250LogicalChannelParameters;
-
+
flcp->multiplexParameters.u.h2250LogicalChannelParameters = pH2250lcp1;
-
+
pH2250lcp1->sessionID = sessionID;
if(!outgoing)
{
pH2250lcp1->m.mediaChannelPresent = 1;
- pH2250lcp1->mediaChannel.t =
+ pH2250lcp1->mediaChannel.t =
T_H245TransportAddress_unicastAddress;
- pUniAddrs = (H245UnicastAddress*) ASN1MALLOC(pctxt,
+ pUniAddrs = (H245UnicastAddress*) ASN1MALLOC(pctxt,
sizeof(H245UnicastAddress));
memset(pUniAddrs, 0, sizeof(H245UnicastAddress));
pH2250lcp1->mediaChannel.u.unicastAddress = pUniAddrs;
if (call->versionIP == 6) {
pUniAddrs->t = T_H245UnicastAddress_iP6Address;
- pUniIp6Addrs = (H245UnicastAddress_iP6Address*) ASN1MALLOC(pctxt,
+ pUniIp6Addrs = (H245UnicastAddress_iP6Address*) ASN1MALLOC(pctxt,
sizeof(H245UnicastAddress_iP6Address));
memset(pUniIp6Addrs, 0, sizeof(H245UnicastAddress_iP6Address));
pUniAddrs->u.iP6Address = pUniIp6Addrs;
-
+
inet_pton(AF_INET6, pLogicalChannel->localIP, pUniIp6Addrs->network.data);
pUniIp6Addrs->network.numocts = 16;
pUniIp6Addrs->tsapIdentifier = pLogicalChannel->localRtpPort;
} else {
pUniAddrs->t = T_H245UnicastAddress_iPAddress;
- pUniIpAddrs = (H245UnicastAddress_iPAddress*) ASN1MALLOC(pctxt,
+ pUniIpAddrs = (H245UnicastAddress_iPAddress*) ASN1MALLOC(pctxt,
sizeof(H245UnicastAddress_iPAddress));
memset(pUniIpAddrs, 0, sizeof(H245UnicastAddress_iPAddress));
pUniAddrs->u.iPAddress = pUniIpAddrs;
-
+
inet_pton(AF_INET, pLogicalChannel->localIP, pUniIpAddrs->network.data);
pUniIpAddrs->network.numocts = 4;
@@ -4118,30 +4118,30 @@ int ooBuildFastStartOLC
}
}
pH2250lcp1->m.mediaControlChannelPresent = 1;
- pH2250lcp1->mediaControlChannel.t =
+ pH2250lcp1->mediaControlChannel.t =
T_H245TransportAddress_unicastAddress;
- pUnicastAddrs = (H245UnicastAddress*) ASN1MALLOC(pctxt,
+ pUnicastAddrs = (H245UnicastAddress*) ASN1MALLOC(pctxt,
sizeof(H245UnicastAddress));
memset(pUnicastAddrs, 0, sizeof(H245UnicastAddress));
pH2250lcp1->mediaControlChannel.u.unicastAddress = pUnicastAddrs;
if (call->versionIP == 6) {
pUnicastAddrs->t = T_H245UnicastAddress_iP6Address;
- pIp6Addrs = (H245UnicastAddress_iP6Address*) ASN1MALLOC(pctxt,
+ pIp6Addrs = (H245UnicastAddress_iP6Address*) ASN1MALLOC(pctxt,
sizeof(H245UnicastAddress_iP6Address));
memset(pIp6Addrs, 0, sizeof(H245UnicastAddress_iP6Address));
pUnicastAddrs->u.iP6Address = pIp6Addrs;
-
+
inet_pton(AF_INET6, pLogicalChannel->localIP, pIp6Addrs->network.data);
pIp6Addrs->network.numocts = 16;
pIp6Addrs->tsapIdentifier = pLogicalChannel->localRtcpPort;
} else {
pUnicastAddrs->t = T_H245UnicastAddress_iPAddress;
- pIpAddrs = (H245UnicastAddress_iPAddress*) ASN1MALLOC(pctxt,
+ pIpAddrs = (H245UnicastAddress_iPAddress*) ASN1MALLOC(pctxt,
sizeof(H245UnicastAddress_iPAddress));
memset(pIpAddrs, 0, sizeof(H245UnicastAddress_iPAddress));
pUnicastAddrs->u.iPAddress = pIpAddrs;
-
+
inet_pton(AF_INET, pLogicalChannel->localIP, pIpAddrs->network.data);
pIpAddrs->network.numocts = 4;
@@ -4151,16 +4151,16 @@ int ooBuildFastStartOLC
if(!outgoing)
{
if(epCap->startReceiveChannel)
- {
- epCap->startReceiveChannel(call, pLogicalChannel);
- OOTRACEINFO4("Receive channel of type %s started (%s, %s)\n",
+ {
+ epCap->startReceiveChannel(call, pLogicalChannel);
+ OOTRACEINFO4("Receive channel of type %s started (%s, %s)\n",
(epCap->capType == OO_CAP_TYPE_AUDIO)?"audio":"video",
call->callType, call->callToken);
}
else{
OOTRACEERR4("ERROR:No callback registered to start receive %s"
- " channel (%s, %s)\n",
- (epCap->capType == OO_CAP_TYPE_AUDIO)?"audio":"video",
+ " channel (%s, %s)\n",
+ (epCap->capType == OO_CAP_TYPE_AUDIO)?"audio":"video",
call->callType, call->callToken);
return OO_FAILED;
}
@@ -4169,11 +4169,11 @@ int ooBuildFastStartOLC
if(reverse)
{
- OOTRACEDBGC3("Building reverse olc. (%s, %s)\n", call->callType,
+ OOTRACEDBGC3("Building reverse olc. (%s, %s)\n", call->callType,
call->callToken);
- olc->forwardLogicalChannelParameters.dataType.t =
+ olc->forwardLogicalChannelParameters.dataType.t =
T_H245DataType_nullData;
- olc->forwardLogicalChannelParameters.multiplexParameters.t =
+ olc->forwardLogicalChannelParameters.multiplexParameters.t =
T_H245OpenLogicalChannel_forwardLogicalChannelParameters_multiplexParameters_none;
olc->m.reverseLogicalChannelParametersPresent = 1;
rlcp = &(olc->reverseLogicalChannelParameters);
@@ -4181,15 +4181,15 @@ int ooBuildFastStartOLC
if(epCap->capType == OO_CAP_TYPE_AUDIO) {
sessionID = 1;
rlcp->dataType.t = T_H245DataType_audioData;
-
- rlcp->dataType.u.audioData = ooCapabilityCreateAudioCapability(epCap,
+
+ rlcp->dataType.u.audioData = ooCapabilityCreateAudioCapability(epCap,
pctxt, dir);
}
else if(epCap->capType == OO_CAP_TYPE_VIDEO) {
sessionID = 2;
rlcp->dataType.t = T_H245DataType_videoData;
-
- rlcp->dataType.u.videoData = ooCapabilityCreateVideoCapability(epCap,
+
+ rlcp->dataType.u.videoData = ooCapabilityCreateVideoCapability(epCap,
pctxt, dir);
}
@@ -4204,33 +4204,33 @@ int ooBuildFastStartOLC
{
pH2250lcp2->m.mediaChannelPresent = 1;
- pH2250lcp2->mediaChannel.t =
+ pH2250lcp2->mediaChannel.t =
T_H245TransportAddress_unicastAddress;
- pUnicastAddrs = (H245UnicastAddress*) memAlloc(pctxt,
+ pUnicastAddrs = (H245UnicastAddress*) memAlloc(pctxt,
sizeof(H245UnicastAddress));
memset(pUnicastAddrs, 0, sizeof(H245UnicastAddress));
pH2250lcp2->mediaChannel.u.unicastAddress = pUnicastAddrs;
/* May 20101022 */
-
+
if (call->versionIP == 6) {
pUnicastAddrs->t = T_H245UnicastAddress_iP6Address;
- pIp6Addrs = (H245UnicastAddress_iP6Address*) ASN1MALLOC(pctxt,
+ pIp6Addrs = (H245UnicastAddress_iP6Address*) ASN1MALLOC(pctxt,
sizeof(H245UnicastAddress_iP6Address));
memset(pIp6Addrs, 0, sizeof(H245UnicastAddress_iP6Address));
pUnicastAddrs->u.iP6Address = pIp6Addrs;
-
+
inet_pton(AF_INET6, pLogicalChannel->localIP, pIp6Addrs->network.data);
pIp6Addrs->network.numocts = 16;
pIp6Addrs->tsapIdentifier = pLogicalChannel->localRtpPort;
} else {
pUnicastAddrs->t = T_H245UnicastAddress_iPAddress;
- pIpAddrs = (H245UnicastAddress_iPAddress*) ASN1MALLOC(pctxt,
+ pIpAddrs = (H245UnicastAddress_iPAddress*) ASN1MALLOC(pctxt,
sizeof(H245UnicastAddress_iPAddress));
memset(pIpAddrs, 0, sizeof(H245UnicastAddress_iPAddress));
pUnicastAddrs->u.iPAddress = pIpAddrs;
-
+
inet_pton(AF_INET, pLogicalChannel->localIP, pIpAddrs->network.data);
pIpAddrs->network.numocts = 4;
@@ -4239,33 +4239,33 @@ int ooBuildFastStartOLC
}
pH2250lcp2->m.mediaControlChannelPresent = 1;
- pH2250lcp2->mediaControlChannel.t =
+ pH2250lcp2->mediaControlChannel.t =
T_H245TransportAddress_unicastAddress;
pUniAddrs = (H245UnicastAddress*) ASN1MALLOC(pctxt, sizeof(H245UnicastAddress));
-
+
memset(pUniAddrs, 0, sizeof(H245UnicastAddress));
pH2250lcp2->mediaControlChannel.u.unicastAddress = pUniAddrs;
/* May 20101023 */
-
+
if (call->versionIP == 6) {
pUniAddrs->t = T_H245UnicastAddress_iP6Address;
- pUniIp6Addrs = (H245UnicastAddress_iP6Address*) ASN1MALLOC(pctxt,
+ pUniIp6Addrs = (H245UnicastAddress_iP6Address*) ASN1MALLOC(pctxt,
sizeof(H245UnicastAddress_iP6Address));
memset(pUniIp6Addrs, 0, sizeof(H245UnicastAddress_iP6Address));
pUniAddrs->u.iP6Address = pUniIp6Addrs;
-
+
inet_pton(AF_INET6, pLogicalChannel->localIP, pUniIp6Addrs->network.data);
pUniIp6Addrs->network.numocts = 16;
pUniIp6Addrs->tsapIdentifier = pLogicalChannel->localRtcpPort;
} else {
pUniAddrs->t = T_H245UnicastAddress_iPAddress;
- pUniIpAddrs = (H245UnicastAddress_iPAddress*) ASN1MALLOC(pctxt,
+ pUniIpAddrs = (H245UnicastAddress_iPAddress*) ASN1MALLOC(pctxt,
sizeof(H245UnicastAddress_iPAddress));
memset(pUniIpAddrs, 0, sizeof(H245UnicastAddress_iPAddress));
pUniAddrs->u.iPAddress = pUniIpAddrs;
-
+
inet_pton(AF_INET, pLogicalChannel->localIP, pUniIpAddrs->network.data);
pUniIpAddrs->network.numocts = 4;
@@ -4281,23 +4281,23 @@ int ooBuildFastStartOLC
{
if(epCap->startReceiveChannel)
{
- epCap->startReceiveChannel(call, pLogicalChannel);
+ epCap->startReceiveChannel(call, pLogicalChannel);
OOTRACEINFO4("Receive channel of type %s started (%s, %s)\n",
(epCap->capType == OO_CAP_TYPE_AUDIO)?"audio":"video",
call->callType, call->callToken);
}
else{
OOTRACEERR4("ERROR:No callback registered to start receive %s "
- "channel (%s, %s)\n",
- (epCap->capType == OO_CAP_TYPE_AUDIO)?"audio":"video",
+ "channel (%s, %s)\n",
+ (epCap->capType == OO_CAP_TYPE_AUDIO)?"audio":"video",
call->callType, call->callToken);
return OO_FAILED;
}
}
}
- /* State of logical channel. for out going calls, as we are sending setup,
- state of all channels are proposed, for incoming calls, state is
+ /* State of logical channel. for out going calls, as we are sending setup,
+ state of all channels are proposed, for incoming calls, state is
established. */
if(!outgoing) {
pLogicalChannel->state = OO_LOGICALCHAN_ESTABLISHED;
@@ -4307,7 +4307,7 @@ int ooBuildFastStartOLC
/* Call is "outgoing */
pLogicalChannel->state = OO_LOGICALCHAN_PROPOSEDFS;
}
-
+
return OO_OK;
}
@@ -4329,12 +4329,12 @@ int ooMSDTimerExpired(void *data)
return OO_OK;
}
-
+
int ooTCSTimerExpired(void *data)
{
ooTimerCallback *cbData = (ooTimerCallback*)data;
OOH323CallData *call = cbData->call;
- OOTRACEINFO3("TerminalCapabilityExchange timeout. (%s, %s)\n",
+ OOTRACEINFO3("TerminalCapabilityExchange timeout. (%s, %s)\n",
call->callType, call->callToken);
ASN1MEMFREEPTR(call->pctxt, cbData);
ooSendTerminalCapabilitySetRelease(call);
@@ -4366,11 +4366,11 @@ int ooOpenLogicalChannelTimerExpired(void *pdata)
ooLogicalChannel *pChannel = NULL;
OOTRACEINFO3("OpenLogicalChannelTimer expired. (%s, %s)\n", call->callType,
call->callToken);
- pChannel = ooFindLogicalChannelByLogicalChannelNo(call,
+ pChannel = ooFindLogicalChannelByLogicalChannelNo(call,
cbData->channelNumber);
if(pChannel)
ooSendCloseLogicalChannel(call, pChannel);
-
+
if(call->callState < OO_CALL_CLEAR)
{
call->callState = OO_CALL_CLEAR;
@@ -4389,7 +4389,7 @@ int ooCloseLogicalChannelTimerExpired(void *pdata)
call->callToken);
ooClearLogicalChannel(call, cbData->channelNumber);
-
+
if(call->callState < OO_CALL_CLEAR)
{
call->callState = OO_CALL_CLEAR;
@@ -4408,21 +4408,21 @@ int ooRequestChannelCloseTimerExpired(void *pdata)
OOTRACEINFO3("CloseLogicalChannelTimer expired. (%s, %s)\n", call->callType,
call->callToken);
-
- pChannel = ooFindLogicalChannelByLogicalChannelNo(call,
+
+ pChannel = ooFindLogicalChannelByLogicalChannelNo(call,
cbData->channelNumber);
if(pChannel)
ooSendRequestChannelCloseRelease(call, cbData->channelNumber);
else
return OO_OK;
-
+
ret = ooClearLogicalChannel(call, cbData->channelNumber);
if(ret != OO_OK)
{
OOTRACEERR4("Error:Failed to clear logical channel %d. (%s, %s)\n",
cbData->channelNumber, call->callType, call->callToken);
- }
+ }
if(call->callState < OO_CALL_CLEAR)
{
@@ -4442,29 +4442,29 @@ int ooSessionTimerExpired(void *pdata)
OOTRACEINFO3("SessionTimer expired. (%s, %s)\n", call->callType,
call->callToken);
- if(call->h245SessionState != OO_H245SESSION_IDLE &&
+ if(call->h245SessionState != OO_H245SESSION_IDLE &&
call->h245SessionState != OO_H245SESSION_CLOSED &&
call->h245SessionState != OO_H245SESSION_PAUSED) {
ret = ooCloseH245Connection(call);
-
+
if(ret != OO_OK) {
OOTRACEERR3("Error:Failed to close H.245 connection (%s, %s)\n",
call->callType, call->callToken);
- }
+ }
}
memFreePtr(call->pctxt, cbData);
if(call->callState == OO_CALL_CLEAR_RELEASESENT)
call->callState = OO_CALL_CLEARED;
-
+
return OO_OK;
}
int ooGetIpPortFromH245TransportAddress
- (OOH323CallData *call, H245TransportAddress *h245Address, char *ip,
+ (OOH323CallData *call, H245TransportAddress *h245Address, char *ip,
int *port)
{
H245UnicastAddress *unicastAddress = NULL;
@@ -4477,8 +4477,8 @@ int ooGetIpPortFromH245TransportAddress
OOTRACEERR3("ERROR:Unsupported H245 address type "
"(%s, %s)\n", call->callType, call->callToken);
return OO_FAILED;
- }
-
+ }
+
unicastAddress = h245Address->u.unicastAddress;
if (call->versionIP == 6) {
if (unicastAddress->t != T_H245UnicastAddress_iP6Address) {
@@ -4513,7 +4513,7 @@ int ooGetIpPortFromH245TransportAddress
int ooPrepareFastStartResponseOLC
- (OOH323CallData *call, H245OpenLogicalChannel *olc,
+ (OOH323CallData *call, H245OpenLogicalChannel *olc,
ooH323EpCapability *epCap, OOCTXT*pctxt, int dir)
{
OOBOOL reverse=FALSE, forward=FALSE;
@@ -4525,14 +4525,14 @@ int ooPrepareFastStartResponseOLC
H245UnicastAddress_iP6Address *pIp6Addrs=NULL, *pUniIp6Addrs=NULL;
unsigned session_id = 0;
ooLogicalChannel *pLogicalChannel = NULL;
-
+
if(dir & OORX)
{
OOTRACEDBGA3("ooPrepareFastStartResponseOLC for Receive Capability "
"(%s, %s)\n", call->callType, call->callToken);
session_id = ooCallGenerateSessionID(call, epCap->capType, "receive");
- pLogicalChannel = ooAddNewLogicalChannel(call,
- olc->forwardLogicalChannelNumber, session_id,
+ pLogicalChannel = ooAddNewLogicalChannel(call,
+ olc->forwardLogicalChannelNumber, session_id,
"receive", epCap);
forward = TRUE;
}
@@ -4541,7 +4541,7 @@ int ooPrepareFastStartResponseOLC
OOTRACEDBGA3("ooPrepareFastStartResponseOLC for transmit Capability "
"(%s, %s)\n", call->callType, call->callToken);
session_id = ooCallGenerateSessionID(call, epCap->capType, "transmit");
- pLogicalChannel = ooAddNewLogicalChannel(call,
+ pLogicalChannel = ooAddNewLogicalChannel(call,
olc->forwardLogicalChannelNumber, session_id,
"transmit", epCap);
reverse = TRUE;
@@ -4559,24 +4559,24 @@ int ooPrepareFastStartResponseOLC
if(forward)
{
- OOTRACEDBGC3("Preparing olc for receive channel. (%s, %s)\n",
+ OOTRACEDBGC3("Preparing olc for receive channel. (%s, %s)\n",
call->callType, call->callToken);
flcp = &(olc->forwardLogicalChannelParameters);
pH2250lcp1 = flcp->multiplexParameters.u.h2250LogicalChannelParameters;
-
+
pH2250lcp1->m.mediaChannelPresent = 1;
pH2250lcp1->mediaChannel.t = T_H245TransportAddress_unicastAddress;
- pUniAddrs = (H245UnicastAddress*) memAllocZ(pctxt,
+ pUniAddrs = (H245UnicastAddress*) memAllocZ(pctxt,
sizeof(H245UnicastAddress));
pH2250lcp1->mediaChannel.u.unicastAddress = pUniAddrs;
if (call->versionIP == 6) {
- pUniIp6Addrs = (H245UnicastAddress_iP6Address*) memAllocZ(pctxt,
+ pUniIp6Addrs = (H245UnicastAddress_iP6Address*) memAllocZ(pctxt,
sizeof(H245UnicastAddress_iP6Address));
if(!pUniAddrs || !pUniIpAddrs) {
OOTRACEERR3("Error:Memory - ooPrepareFastStartResponseOLC - pUniAddrs"
- "/pUniIpAddrs (%s, %s)\n", call->callType,
+ "/pUniIpAddrs (%s, %s)\n", call->callType,
call->callToken);
return OO_FAILED;
}
@@ -4589,11 +4589,11 @@ int ooPrepareFastStartResponseOLC
pUniIp6Addrs->tsapIdentifier = pLogicalChannel->localRtpPort;
} else {
- pUniIpAddrs = (H245UnicastAddress_iPAddress*) memAllocZ(pctxt,
+ pUniIpAddrs = (H245UnicastAddress_iPAddress*) memAllocZ(pctxt,
sizeof(H245UnicastAddress_iPAddress));
if(!pUniAddrs || !pUniIpAddrs) {
OOTRACEERR3("Error:Memory - ooPrepareFastStartResponseOLC - pUniAddrs"
- "/pUniIpAddrs (%s, %s)\n", call->callType,
+ "/pUniIpAddrs (%s, %s)\n", call->callType,
call->callToken);
return OO_FAILED;
}
@@ -4601,25 +4601,25 @@ int ooPrepareFastStartResponseOLC
pUniAddrs->t = T_H245UnicastAddress_iPAddress;
pUniAddrs->u.iPAddress = pUniIpAddrs;
inet_pton(AF_INET, pLogicalChannel->localIP, pUniIpAddrs->network.data);
-
+
pUniIpAddrs->network.numocts = 4;
pUniIpAddrs->tsapIdentifier = pLogicalChannel->localRtpPort;
}
pH2250lcp1->m.mediaControlChannelPresent = 1;
- pH2250lcp1->mediaControlChannel.t =
+ pH2250lcp1->mediaControlChannel.t =
T_H245TransportAddress_unicastAddress;
- pUnicastAddrs = (H245UnicastAddress*) memAllocZ(pctxt,
+ pUnicastAddrs = (H245UnicastAddress*) memAllocZ(pctxt,
sizeof(H245UnicastAddress));
pH2250lcp1->mediaControlChannel.u.unicastAddress = pUnicastAddrs;
if (call->versionIP == 6) {
- pIp6Addrs = (H245UnicastAddress_iP6Address*) memAllocZ(pctxt,
+ pIp6Addrs = (H245UnicastAddress_iP6Address*) memAllocZ(pctxt,
sizeof(H245UnicastAddress_iP6Address));
if(!pUnicastAddrs || !pIp6Addrs) {
OOTRACEERR3("Error:Memory - ooPrepareFastStartResponseOLC - "
- "pUnicastAddrs/pIpAddrs (%s, %s)\n", call->callType,
+ "pUnicastAddrs/pIpAddrs (%s, %s)\n", call->callType,
call->callToken);
return OO_FAILED;
}
@@ -4630,11 +4630,11 @@ int ooPrepareFastStartResponseOLC
pIp6Addrs->tsapIdentifier = pLogicalChannel->localRtcpPort;
} else {
- pIpAddrs = (H245UnicastAddress_iPAddress*) memAllocZ(pctxt,
+ pIpAddrs = (H245UnicastAddress_iPAddress*) memAllocZ(pctxt,
sizeof(H245UnicastAddress_iPAddress));
if(!pUnicastAddrs || !pIpAddrs) {
OOTRACEERR3("Error:Memory - ooPrepareFastStartResponseOLC - "
- "pUnicastAddrs/pIpAddrs (%s, %s)\n", call->callType,
+ "pUnicastAddrs/pIpAddrs (%s, %s)\n", call->callType,
call->callToken);
return OO_FAILED;
}
@@ -4648,7 +4648,7 @@ int ooPrepareFastStartResponseOLC
if(reverse)
{
- OOTRACEDBGC3("Building reverse olc. (%s, %s)\n", call->callType,
+ OOTRACEDBGC3("Building reverse olc. (%s, %s)\n", call->callType,
call->callToken);
rlcp = &(olc->reverseLogicalChannelParameters);
@@ -4658,53 +4658,50 @@ int ooPrepareFastStartResponseOLC
memset(&pH2250lcp2->mediaChannel, 0, sizeof(H245TransportAddress));
pH2250lcp2->m.mediaControlChannelPresent = 1;
- pH2250lcp2->mediaControlChannel.t =
+ pH2250lcp2->mediaControlChannel.t =
T_H245TransportAddress_unicastAddress;
- pUniAddrs = (H245UnicastAddress*) memAlloc(pctxt,
+ pUniAddrs = (H245UnicastAddress*) memAlloc(pctxt,
sizeof(H245UnicastAddress));
pH2250lcp2->mediaControlChannel.u.unicastAddress = pUniAddrs;
if (call->versionIP == 6) {
- pUniIp6Addrs = (H245UnicastAddress_iP6Address*) memAlloc(pctxt,
+ pUniIp6Addrs = (H245UnicastAddress_iP6Address*) memAlloc(pctxt,
sizeof(H245UnicastAddress_iP6Address));
if(!pUniAddrs || !pUniIp6Addrs) {
OOTRACEERR3("Error:Memory - ooPrepareFastStartResponseOLC - "
- "pUniAddrs/pUniIpAddrs (%s, %s)\n", call->callType,
+ "pUniAddrs/pUniIpAddrs (%s, %s)\n", call->callType,
call->callToken);
return OO_FAILED;
}
-
+
pUniAddrs->t = T_H245UnicastAddress_iP6Address;
- pUniAddrs->u.iP6Address = pUniIp6Addrs;
+ pUniAddrs->u.iP6Address = pUniIp6Addrs;
inet_pton(AF_INET6, pLogicalChannel->localIP, pUniIp6Addrs->network.data);
pUniIp6Addrs->network.numocts = 16;
pUniIp6Addrs->tsapIdentifier = pLogicalChannel->localRtcpPort;
} else {
- pUniIpAddrs = (H245UnicastAddress_iPAddress*) memAlloc(pctxt,
+ pUniIpAddrs = (H245UnicastAddress_iPAddress*) memAlloc(pctxt,
sizeof(H245UnicastAddress_iPAddress));
if(!pUniAddrs || !pUniIpAddrs) {
OOTRACEERR3("Error:Memory - ooPrepareFastStartResponseOLC - "
- "pUniAddrs/pUniIpAddrs (%s, %s)\n", call->callType,
+ "pUniAddrs/pUniIpAddrs (%s, %s)\n", call->callType,
call->callToken);
return OO_FAILED;
}
pH2250lcp2->mediaControlChannel.u.unicastAddress = pUniAddrs;
-
+
pUniAddrs->t = T_H245UnicastAddress_iPAddress;
- pUniAddrs->u.iPAddress = pUniIpAddrs;
+ pUniAddrs->u.iPAddress = pUniIpAddrs;
inet_pton(AF_INET, pLogicalChannel->localIP, pUniIpAddrs->network.data);
pUniIpAddrs->network.numocts = 4;
pUniIpAddrs->tsapIdentifier = pLogicalChannel->localRtcpPort;
}
-
+
}
pLogicalChannel->state = OO_LOGICALCHAN_ESTABLISHED;
return OO_OK;
}
-
-
-
diff --git a/addons/ooh323c/src/ooh245.h b/addons/ooh323c/src/ooh245.h
index a2df67056..9635a4e10 100644
--- a/addons/ooh323c/src/ooh245.h
+++ b/addons/ooh323c/src/ooh245.h
@@ -1,22 +1,22 @@
/*
* 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.
*
*****************************************************************************/
/**
- * @file ooh245.h
- * This file contains functions to support H245 negotiations.
+ * @file ooh245.h
+ * This file contains functions to support H245 negotiations.
*/
#ifndef _OOH245HDR_H_
#define _OOH245HDR_H_
@@ -43,7 +43,7 @@ extern "C" {
struct OOH323CallData;
-/**
+/**
* @defgroup h245 H.245 Message Handling
* @{
*/
@@ -59,15 +59,15 @@ typedef struct H245Message {
/**
* Creates an outgoing H245 message of the type specified by the type
- * argument for the Application context.
+ * argument for the Application context.
*
- * @param msg A pointer to pointer to message which will be assigned to
+ * @param msg A pointer to pointer to message which will be assigned to
* allocated memory.
* @param type Type of the message to be created.
* (Request/Response/Command/Indication)
*
* @return Completion status of operation: 0 (OO_OK) = success,
- * negative return value is error.
+ * negative return value is error.
*/
EXTERN int ooCreateH245Message(OOH323CallData* call, H245Message **msg, int type);
@@ -77,7 +77,7 @@ EXTERN int ooCreateH245Message(OOH323CallData* call, H245Message **msg, int type
* @param call Handle to the call
* @param pmsg Pointer to an H245 message structure.
*
- * @return OO_OK, on success. OO_FAILED, on failure
+ * @return OO_OK, on success. OO_FAILED, on failure
*/
EXTERN int ooFreeH245Message(struct OOH323CallData *call, H245Message *pmsg);
@@ -92,8 +92,8 @@ EXTERN int ooFreeH245Message(struct OOH323CallData *call, H245Message *pmsg);
EXTERN int ooSendH245Msg(struct OOH323CallData *call, H245Message *msg);
/**
- * This function is used to retrieve an H.245 message enqueued in the outgoing
- * queue.
+ * This function is used to retrieve an H.245 message enqueued in the outgoing
+ * queue.
* @param call Pointer to the call for which message has to be retrieved.
* @param msgbuf Pointer to a buffer in which the message will be returned.
* @param len Pointer to an int variable which will contain length of
@@ -103,17 +103,17 @@ EXTERN int ooSendH245Msg(struct OOH323CallData *call, H245Message *msg);
*
* @return OO_OK, on success. OO_FAILED, on failure.
*/
-EXTERN int ooGetOutgoingH245Msgbuf(struct OOH323CallData *call,
- ASN1OCTET *msgbuf,
+EXTERN int ooGetOutgoingH245Msgbuf(struct OOH323CallData *call,
+ ASN1OCTET *msgbuf,
int *len, int *msgType);
/**
- * This function is used to send out a terminal capability set message.
+ * This function is used to send out a terminal capability set message.
*
* @param call Pointer to a call for which TerminalCapabilitySet message
* will be sent.
- *
- * @return OO_OK, on success. OO_FAILED, on failure.
+ *
+ * @return OO_OK, on success. OO_FAILED, on failure.
*/
EXTERN int ooSendTermCapMsg(struct OOH323CallData *call);
EXTERN int ooSendEmptyTermCapMsg(struct OOH323CallData *call);
@@ -128,10 +128,10 @@ EXTERN ASN1UINT ooGenerateStatusDeterminationNumber(void);
/**
* This fuction is used to handle received MasterSlaveDetermination procedure
- * messages.
+ * messages.
* @param call Pointer to the call for which a message is received.
* @param pmsg Pointer to MSD message
- * @param msgType Message type indicating whether received message is MSD,
+ * @param msgType Message type indicating whether received message is MSD,
* MSDAck, MSDReject etc...
*
* @return OO_OK, on success. OO_FAILED, on failure.
@@ -152,11 +152,11 @@ EXTERN int ooSendMasterSlaveDetermination(struct OOH323CallData *call);
* This function is used to send a MasterSlaveDeterminationAck message.
* @param call Pointer to call for which MasterSlaveDeterminationAck has
* to be sent.
- * @param status Result of the determination process(Master/Slave as it
+ * @param status Result of the determination process(Master/Slave as it
* applies to remote endpoint)
*
* @return OO_OK, on success. OO_FAILED, on failure.
- */
+ */
EXTERN int ooSendMasterSlaveDeterminationAck
(struct OOH323CallData* call, char * status);
@@ -164,19 +164,19 @@ EXTERN int ooSendMasterSlaveDeterminationAck
* This function is used to send a MasterSlaveDeterminationReject message.
* @param call Pointer to call for which message is to be sent.
* @return OO_OK, on success. OO_FAILED, on failure.
- */
+ */
EXTERN int ooSendMasterSlaveDeterminationReject (struct OOH323CallData* call);
/**
* This function is used to handle MasterSlaveReject message. If number of
- * retries is less than max allowed, then it restarts the
+ * retries is less than max allowed, then it restarts the
* MasterSlaveDetermination procedure.
- * @param call Handle to the call for which MasterSlaveReject is
+ * @param call Handle to the call for which MasterSlaveReject is
* received.
* @param reject Poinetr to the received reject message.
*
- * @return OO_OK, on success. OO_FAILED, on failure.
+ * @return OO_OK, on success. OO_FAILED, on failure.
*/
EXTERN int ooHandleMasterSlaveReject
(struct OOH323CallData *call, H245MasterSlaveDeterminationReject* reject);
@@ -193,13 +193,13 @@ EXTERN int ooHandleOpenLogicalChannel
(struct OOH323CallData* call, H245OpenLogicalChannel *olc);
/**
- * This is a helper function used to handle a received OpenLogicalChannel
+ * This is a helper function used to handle a received OpenLogicalChannel
* message. It builds an OpenLogicalChannelAck message and sends it.
*
* @param call Pointer to cll for which OLC was received.
* @param olc The received OpenLogicalChannel message.
- *
- * @return OO_OK, on success. OO_FAILED, on failure.
+ *
+ * @return OO_OK, on success. OO_FAILED, on failure.
*/
EXTERN int ooHandleOpenLogicalChannel_helper
(struct OOH323CallData *call, H245OpenLogicalChannel*olc);
@@ -222,22 +222,22 @@ int ooSendOpenLogicalChannelReject
*
* @return OO_OK, on success. OO_FAILED, on failure.
*/
-EXTERN int ooOnReceivedOpenLogicalChannelAck(struct OOH323CallData *call,
+EXTERN int ooOnReceivedOpenLogicalChannelAck(struct OOH323CallData *call,
H245OpenLogicalChannelAck *olcAck);
/**
- * This function is used to handle the received OpenLogicalChannelReject
+ * This function is used to handle the received OpenLogicalChannelReject
* message.
* @param call Handle to the call for which the message is received.
* @param olcRejected Pointer to received OpenLogicalChannelReject message.
*
* @return OO_OK, on success. OO_FAILED, on failure.
*/
-int ooOnReceivedOpenLogicalChannelRejected(struct OOH323CallData *call,
+int ooOnReceivedOpenLogicalChannelRejected(struct OOH323CallData *call,
H245OpenLogicalChannelReject *olcRejected);
/**
- * This message is used to send an EndSession command. It builds a EndSession
+ * This message is used to send an EndSession command. It builds a EndSession
* command message and queues it into the calls outgoing queue.
* @param call Pointer to call for which EndSession command has to be
* sent.
@@ -246,7 +246,7 @@ int ooOnReceivedOpenLogicalChannelRejected(struct OOH323CallData *call,
EXTERN int ooSendEndSessionCommand(struct OOH323CallData *call);
/**
- * This function is used to handle a received H245Command message.
+ * This function is used to handle a received H245Command message.
* @param call Pointer to call for which an H245Command is received.
* @param command Pointer to a command message.
*
@@ -259,7 +259,7 @@ EXTERN int ooHandleH245Command
/**
* This function is used to handle a received UserInput Indication message.
* It extracts the dtmf received through user-input message and calls endpoints
- * onReceivedDTMF callback function, if such a function is registered by the
+ * onReceivedDTMF callback function, if such a function is registered by the
* endpoint.
* @param call Handle to the call for which user-input indication
* message is received.
@@ -272,7 +272,7 @@ EXTERN int ooOnReceivedUserInputIndication
/**
* This function is called on receiving a TreminalCapabilitySetAck message.
- * If the MasterSlaveDetermination process is also over, this function
+ * If the MasterSlaveDetermination process is also over, this function
* initiates the process of opening logical channels.
* @param call Pointer to call for which TCSAck is received.
*
@@ -282,9 +282,9 @@ EXTERN int ooOnReceivedTerminalCapabilitySetAck(struct OOH323CallData* call);
/**
* This function is called to close all the open logical channels. It sends
- * CloseLogicalChannel message for all the forward channels and sends
+ * CloseLogicalChannel message for all the forward channels and sends
* RequestCloseLogicalChannel message for all the reverse channels.
- * @param call Pointer to call for which logical channels have to be
+ * @param call Pointer to call for which logical channels have to be
* closed.
*
* @return OO_OK, on success. OO_FAILED, on failure.
@@ -311,10 +311,10 @@ EXTERN int ooSendCloseLogicalChannel
* closeLogicalChannelAck message to the remote endpoint.
* @param call Pointer to call for which CloseLogicalChannel message is received.
* @param clc Pointer to received CloseLogicalChannel message.
- *
+ *
* @return OO_OK, on success. OO_FAILED, on failure.
*/
-EXTERN int ooOnReceivedCloseLogicalChannel(struct OOH323CallData *call,
+EXTERN int ooOnReceivedCloseLogicalChannel(struct OOH323CallData *call,
H245CloseLogicalChannel* clc);
/**
@@ -322,10 +322,10 @@ EXTERN int ooOnReceivedCloseLogicalChannel(struct OOH323CallData *call,
* channel and removes it from the list of active logical channels.
* @param call Pointer to call for which CLCAck message is received.
* @param clcAck Pointer to the received CloseLogicalChannelAck message.
- *
+ *
* @return OO_OK, on success. OO_FAILED, on failure
*/
-EXTERN int ooOnReceivedCloseChannelAck(struct OOH323CallData* call,
+EXTERN int ooOnReceivedCloseChannelAck(struct OOH323CallData* call,
H245CloseLogicalChannelAck* clcAck);
/**
@@ -365,27 +365,27 @@ EXTERN int ooH245AcknowledgeTerminalCapabilitySet(struct OOH323CallData *call);
* @param call Pointer to call for which logical channels have to be opened.
*
* @return OO_OK, on success. OO_FAILED, on failure.
- */
+ */
EXTERN int ooOpenLogicalChannels(struct OOH323CallData *call);
/**
- * This function is used to send OpenLogicalChannel message for audio/video
+ * This function is used to send OpenLogicalChannel message for audio/video
* channel.
* @param call Pointer to call for which channel has to be opened.
* @param capType Type of media channel.
*
* @return OO_OK, on success. OO_FAILED, on failure.
*/
-EXTERN int ooOpenLogicalChannel(struct OOH323CallData *call,
+EXTERN int ooOpenLogicalChannel(struct OOH323CallData *call,
enum OOCapType capType);
/**
* This function is used to build and send OpenLogicalChannel message using
* capability passed as parameter.
- * @param call Pointer to call for which OpenLogicalChannel message
+ * @param call Pointer to call for which OpenLogicalChannel message
* has to be built.
* @param epCap Pointer to capability
- *
+ *
* @return OO_OK, on success. OO_FAILED, on failure.
*/
EXTERN int ooOpenChannel
@@ -415,7 +415,7 @@ EXTERN int ooSendH245UserInputIndication_signal
/**
* This function is used to request a remote end point to close a logical
- * channel.
+ * channel.
* @param call Pointer to call for which the logical channel has to
* be closed.
* @param logicalChan Pointer to the logical channel structure which needs
@@ -423,7 +423,7 @@ EXTERN int ooSendH245UserInputIndication_signal
*
* @return OO_OK, on success. OO_FAILED, on failure.
*/
-EXTERN int ooSendRequestCloseLogicalChannel(struct OOH323CallData *call,
+EXTERN int ooSendRequestCloseLogicalChannel(struct OOH323CallData *call,
ooLogicalChannel *logicalChan);
/**
@@ -447,11 +447,11 @@ int ooSendRequestChannelCloseRelease
*
* @return OO_OK, on success. OO_FAILED, on failure.
*/
-EXTERN int ooOnReceivedRequestChannelClose(struct OOH323CallData *call,
+EXTERN int ooOnReceivedRequestChannelClose(struct OOH323CallData *call,
H245RequestChannelClose *rclc);
/**
- * This function is used to handle a received RequestChannelCloseReject
+ * This function is used to handle a received RequestChannelCloseReject
* response message.
* @param call Handle to the call.
* @param rccReject Pointer to the received reject response message.
@@ -462,7 +462,7 @@ int ooOnReceivedRequestChannelCloseReject
(struct OOH323CallData *call, H245RequestChannelCloseReject *rccReject);
/**
- * This function is used to handle a received RequestChannelCloseAck
+ * This function is used to handle a received RequestChannelCloseAck
* response message.
* @param call Handle to the call.
* @param rccAck Pointer to the received ack response message.
@@ -473,21 +473,21 @@ int ooOnReceivedRequestChannelCloseAck
(struct OOH323CallData *call, H245RequestChannelCloseAck *rccAck);
/**
- * Builds an OLC for faststart with an audio/video capability passed as
+ * Builds an OLC for faststart with an audio/video capability passed as
* parameter.
* @param call Handle to call for which OLC has to be built.
* @param olc Pointer to an OLC structure which will be populated.
- * @param epCap Pointer to the capability which will be used to
+ * @param epCap Pointer to the capability which will be used to
* build OLC.
- * @param pctxt Pointer to an OOCTXT structure which will be used
+ * @param pctxt Pointer to an OOCTXT structure which will be used
* to allocate additional memory for OLC.
* @param dir Direction of OLC
*
* @return OO_OK, on success. OO_FAILED, on failure.
*/
-EXTERN int ooBuildFastStartOLC(struct OOH323CallData *call,
- H245OpenLogicalChannel *olc,
- ooH323EpCapability *epCap,
+EXTERN int ooBuildFastStartOLC(struct OOH323CallData *call,
+ H245OpenLogicalChannel *olc,
+ ooH323EpCapability *epCap,
OOCTXT*pctxt, int dir);
/**
@@ -496,16 +496,16 @@ EXTERN int ooBuildFastStartOLC(struct OOH323CallData *call,
* of the olc received in SETUP.
* @param call Handle to call for which OLC has to be built.
* @param olc Pointer to an received OLC structure.
- * @param epCap Pointer to the capability which will be used for
+ * @param epCap Pointer to the capability which will be used for
* this channel.
- * @param pctxt Pointer to an OOCTXT structure which will be used
+ * @param pctxt Pointer to an OOCTXT structure which will be used
* to allocate additional memory for OLC.
* @param dir Direction of channel OORX, OOTX etc.
*
* @return OO_OK, on success. OO_FAILED, on failure.
*/
EXTERN int ooPrepareFastStartResponseOLC
- (OOH323CallData *call, H245OpenLogicalChannel *olc,
+ (OOH323CallData *call, H245OpenLogicalChannel *olc,
ooH323EpCapability *epCap, OOCTXT*pctxt, int dir);
/**
@@ -533,7 +533,7 @@ int ooSendMasterSlaveDeterminationRelease(struct OOH323CallData * call);
/**
* This function is used to send a terminal capability set reject message
* to the remote endpoint.
- * @param call Handle to the call for which reject message has to
+ * @param call Handle to the call for which reject message has to
* be sent.
* @param seqNo Sequence number of the TCS message to be rejected.
* @param cause Cause for rejecting a TCS message.
@@ -546,7 +546,7 @@ int ooSendTerminalCapabilitySetReject
/**
* This function is used to send a TerminalCapabilitySetRelease message after
* capability exchange timer has expired.
- * @param call Handle to call for which release message has to be
+ * @param call Handle to call for which release message has to be
* sent.
*
* @return OO_OK, on success; OO_FAILED, on failure.
@@ -557,26 +557,26 @@ int ooSendRequestMode(OOH323CallData* call, int isT38Mode);
/**
- * This is an helper function used to extract ip address and port info from
+ * This is an helper function used to extract ip address and port info from
* H245TransportAddress structure.
* @param call Handle to associated call.
- * @param h245Address Handle to H245TransportAddress structure from which
+ * @param h245Address Handle to H245TransportAddress structure from which
* information has to be extracted.
- * @param ip Pointer to buffer in which ip address will be
+ * @param ip Pointer to buffer in which ip address will be
* returned. Make sure that buffer has sufficient length.
- * @param port Pointer to integer in which port number will be
+ * @param port Pointer to integer in which port number will be
* returned.
*
* @return OO_OK, on success. OO_FAILED, on failure.
*/
int ooGetIpPortFromH245TransportAddress
- (OOH323CallData *call, H245TransportAddress *h245Address, char *ip,
+ (OOH323CallData *call, H245TransportAddress *h245Address, char *ip,
int *port);
/**
- * This is a callback function for handling an expired master-slave
+ * This is a callback function for handling an expired master-slave
* determination timer.
- * @param data Callback data registered at the time of creation of
+ * @param data Callback data registered at the time of creation of
* the timer.
*
* @return OO_OK, on success. OO_FAILED, otherwise.
@@ -584,9 +584,9 @@ int ooGetIpPortFromH245TransportAddress
int ooMSDTimerExpired(void *data);
/**
- * This is a callback function for handling an expired capability exchange
+ * This is a callback function for handling an expired capability exchange
* timer.
- * @param data Callback data registered at the time of creation of
+ * @param data Callback data registered at the time of creation of
* the timer.
*
* @return OO_OK, on success. OO_FAILED, otherwise.
@@ -594,9 +594,9 @@ int ooMSDTimerExpired(void *data);
int ooTCSTimerExpired(void *data);
/**
- * This is a callback function for handling an expired OpenLogicalChannel
+ * This is a callback function for handling an expired OpenLogicalChannel
* timer.
- * @param pdata Callback data registered at the time of creation of
+ * @param pdata Callback data registered at the time of creation of
* the timer.
*
* @return OO_OK, on success. OO_FAILED, otherwise.
@@ -604,9 +604,9 @@ int ooTCSTimerExpired(void *data);
int ooOpenLogicalChannelTimerExpired(void *pdata);
/**
- * This is a callback function for handling an expired CloseLogicalChannel
+ * This is a callback function for handling an expired CloseLogicalChannel
* timer.
- * @param pdata Callback data registered at the time of creation of
+ * @param pdata Callback data registered at the time of creation of
* the timer.
*
* @return OO_OK, on success. OO_FAILED, otherwise.
@@ -614,9 +614,9 @@ int ooOpenLogicalChannelTimerExpired(void *pdata);
int ooCloseLogicalChannelTimerExpired(void *pdata);
/**
- * This is a callback function for handling an expired RequestChannelClose
+ * This is a callback function for handling an expired RequestChannelClose
* timer.
- * @param pdata Callback data registered at the time of creation of
+ * @param pdata Callback data registered at the time of creation of
* the timer.
*
* @return OO_OK, on success. OO_FAILED, otherwise.
@@ -625,14 +625,14 @@ int ooRequestChannelCloseTimerExpired(void *pdata);
/**
* This is a callback function for handling an expired EndSession timer.
- * @param pdata Callback data registered at the time of creation of
+ * @param pdata Callback data registered at the time of creation of
* the timer.
*
* @return OO_OK, on success. OO_FAILED, otherwise.
*/
int ooSessionTimerExpired(void *pdata);
-/**
- * @}
+/**
+ * @}
*/
int ooRTDTimerExpired(void *pdata);
diff --git a/addons/ooh323c/src/ooh323.c b/addons/ooh323c/src/ooh323.c
index b04a954ed..be02f8f88 100644
--- a/addons/ooh323c/src/ooh323.c
+++ b/addons/ooh323c/src/ooh323.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.
*
*****************************************************************************/
@@ -50,7 +50,7 @@ int ooHandleDisplayIE(OOH323CallData *call, Q931Message *q931Msg) {
if(pDisplayIE) {
if (call->remoteDisplayName)
memFreePtr(call->pctxt, call->remoteDisplayName);
- call->remoteDisplayName = (char *) memAllocZ(call->pctxt,
+ call->remoteDisplayName = (char *) memAllocZ(call->pctxt,
pDisplayIE->length*sizeof(ASN1OCTET)+1);
strncpy(call->remoteDisplayName, (char *)pDisplayIE->data, pDisplayIE->length*sizeof(ASN1OCTET));
}
@@ -62,7 +62,7 @@ int ooHandleH2250ID (OOH323CallData *call, H225ProtocolIdentifier* protocolIdent
if (!call->h225version && (protocolIdentifier->numids >= 6) &&
(protocolIdentifier->subid[3] == 2250)) {
call->h225version = protocolIdentifier->subid[5];
- OOTRACEDBGC4("Extract H.225 remote version, it's %d, (%s, %s)\n", call->h225version,
+ OOTRACEDBGC4("Extract H.225 remote version, it's %d, (%s, %s)\n", call->h225version,
call->callType, call->callToken);
}
@@ -74,7 +74,7 @@ int ooHandleFastStart(OOH323CallData *call, H225Facility_UUIE *facility)
H245OpenLogicalChannel* olc;
ASN1OCTET msgbuf[MAXMSGLEN];
ooLogicalChannel * pChannel = NULL;
- H245H2250LogicalChannelParameters * h2250lcp = NULL;
+ H245H2250LogicalChannelParameters * h2250lcp = NULL;
int i=0, ret=0;
/* Handle fast-start */
@@ -92,7 +92,7 @@ int ooHandleFastStart(OOH323CallData *call, H225Facility_UUIE *facility)
{
olc = NULL;
- olc = (H245OpenLogicalChannel*)memAlloc(call->pctxt,
+ olc = (H245OpenLogicalChannel*)memAlloc(call->pctxt,
sizeof(H245OpenLogicalChannel));
if(!olc)
{
@@ -109,9 +109,9 @@ int ooHandleFastStart(OOH323CallData *call, H225Facility_UUIE *facility)
return OO_FAILED;
}
memset(olc, 0, sizeof(H245OpenLogicalChannel));
- memcpy(msgbuf, facility->fastStart.elem[i].data,
+ memcpy(msgbuf, facility->fastStart.elem[i].data,
facility->fastStart.elem[i].numocts);
- setPERBuffer(call->pctxt, msgbuf,
+ setPERBuffer(call->pctxt, msgbuf,
facility->fastStart.elem[i].numocts, 1);
ret = asn1PD_H245OpenLogicalChannel(call->pctxt, olc);
if(ret != ASN_OK)
@@ -136,7 +136,7 @@ int ooHandleFastStart(OOH323CallData *call, H225Facility_UUIE *facility)
{
OOTRACEERR4("ERROR: Logical Channel %d not found, fast start. "
"(%s, %s)\n",
- olc->forwardLogicalChannelNumber, call->callType,
+ olc->forwardLogicalChannelNumber, call->callType,
call->callToken);
finishPrint();
removeEventHandler(call->pctxt);
@@ -145,9 +145,9 @@ int ooHandleFastStart(OOH323CallData *call, H225Facility_UUIE *facility)
if(pChannel->channelNo != olc->forwardLogicalChannelNumber)
{
OOTRACEINFO5("Remote endpoint changed forwardLogicalChannel"
- "Number from %d to %d (%s, %s)\n",
- pChannel->channelNo,
- olc->forwardLogicalChannelNumber, call->callType,
+ "Number from %d to %d (%s, %s)\n",
+ pChannel->channelNo,
+ olc->forwardLogicalChannelNumber, call->callType,
call->callToken);
pChannel->channelNo = olc->forwardLogicalChannelNumber;
}
@@ -158,12 +158,12 @@ int ooHandleFastStart(OOH323CallData *call, H225Facility_UUIE *facility)
T_H245OpenLogicalChannel_forwardLogicalChannelParameters_multiplexParameters_h2250LogicalChannelParameters)
{
OOTRACEERR4("ERROR:Unknown multiplex parameter type for "
- "channel %d (%s, %s)\n",
+ "channel %d (%s, %s)\n",
olc->forwardLogicalChannelNumber, call->callType,
call->callToken);
continue;
}
-
+
/* Extract the remote media endpoint address */
h2250lcp = olc->forwardLogicalChannelParameters.multiplexParameters.u.h2250LogicalChannelParameters;
if(!h2250lcp)
@@ -182,10 +182,10 @@ int ooHandleFastStart(OOH323CallData *call, H225Facility_UUIE *facility)
"(%s, %s)\n", call->callType, call->callToken);
return OO_FAILED;
}
- ret = ooGetIpPortFromH245TransportAddress(call,
+ ret = ooGetIpPortFromH245TransportAddress(call,
&h2250lcp->mediaChannel, pChannel->remoteIP,
&pChannel->remoteMediaPort);
-
+
if(ret != OO_OK)
{
if(call->callState < OO_CALL_CLEAR)
@@ -199,17 +199,17 @@ int ooHandleFastStart(OOH323CallData *call, H225Facility_UUIE *facility)
removeEventHandler(call->pctxt);
return OO_FAILED;
}
-
+
if(!pChannel->chanCap->startTransmitChannel)
{
OOTRACEERR3("ERROR:No callback registered to start transmit "
- "channel (%s, %s)\n",call->callType,
+ "channel (%s, %s)\n",call->callType,
call->callToken);
return OO_FAILED;
}
pChannel->chanCap->startTransmitChannel(call, pChannel);
}
- /* Mark the current channel as established and close all other
+ /* Mark the current channel as established and close all other
logical channels with same session id and in same direction.
*/
ooOnLogicalChannelEstablished(call, pChannel);
@@ -218,7 +218,7 @@ int ooHandleFastStart(OOH323CallData *call, H225Facility_UUIE *facility)
removeEventHandler(call->pctxt);
OO_SETFLAG(call->flags, OO_M_FASTSTARTANSWERED);
}
-
+
}
if(facility->m.h245AddressPresent)
@@ -227,16 +227,16 @@ int ooHandleFastStart(OOH323CallData *call, H225Facility_UUIE *facility)
{
OO_CLRFLAG (call->flags, OO_M_TUNNELING);
OOTRACEINFO3("Tunneling is disabled for call as H245 address is "
- "provided in facility message (%s, %s)\n",
+ "provided in facility message (%s, %s)\n",
call->callType, call->callToken);
}
- ret = ooH323GetIpPortFromH225TransportAddress(call,
+ ret = ooH323GetIpPortFromH225TransportAddress(call,
&facility->h245Address, call->remoteIP,
&call->remoteH245Port);
if(ret != OO_OK)
{
OOTRACEERR3("Error: Unknown H245 address type in received "
- "Facility message (%s, %s)", call->callType,
+ "Facility message (%s, %s)", call->callType,
call->callToken);
/* Mark call for clearing */
if(call->callState < OO_CALL_CLEAR)
@@ -247,11 +247,11 @@ int ooHandleFastStart(OOH323CallData *call, H225Facility_UUIE *facility)
return OO_FAILED;
}
if(call->remoteH245Port != 0 && !call->pH245Channel) {
- /* Create an H.245 connection.
+ /* Create an H.245 connection.
*/
if(ooCreateH245Connection(call)== OO_FAILED)
{
- OOTRACEERR3("Error: H.245 channel creation failed (%s, %s)\n",
+ OOTRACEERR3("Error: H.245 channel creation failed (%s, %s)\n",
call->callType, call->callToken);
if(call->callState < OO_CALL_CLEAR)
@@ -286,8 +286,8 @@ int ooOnReceivedReleaseComplete(OOH323CallData *call, Q931Message *q931Msg)
{
cause = q931Msg->causeIE->data[1];
/* Get rid of the extension bit.For more info, check ooQ931SetCauseIE */
- cause = cause & 0x7f;
- OOTRACEDBGA4("Cause of Release Complete is %x. (%s, %s)\n", cause,
+ cause = cause & 0x7f;
+ OOTRACEDBGA4("Cause of Release Complete is %x. (%s, %s)\n", cause,
call->callType, call->callToken);
}
@@ -296,18 +296,18 @@ int ooOnReceivedReleaseComplete(OOH323CallData *call, Q931Message *q931Msg)
{
pNode = dListFindByIndex(&call->timerList, i);
pTimer = (OOTimer*)pNode->data;
- if(((ooTimerCallback*)pTimer->cbData)->timerType &
+ if(((ooTimerCallback*)pTimer->cbData)->timerType &
OO_SESSION_TIMER)
{
memFreePtr(call->pctxt, pTimer->cbData);
ooTimerDelete(call->pctxt, &call->timerList, pTimer);
- OOTRACEDBGC3("Deleted Session Timer. (%s, %s)\n",
+ OOTRACEDBGC3("Deleted Session Timer. (%s, %s)\n",
call->callType, call->callToken);
break;
}
}
-
+
if(!q931Msg->userInfo)
{
OOTRACEERR3("ERROR:No User-User IE in received ReleaseComplete message "
@@ -326,14 +326,14 @@ int ooOnReceivedReleaseComplete(OOH323CallData *call, Q931Message *q931Msg)
if(releaseComplete->m.reasonPresent)
{
- OOTRACEINFO4("Release complete reason code %d. (%s, %s)\n",
+ OOTRACEINFO4("Release complete reason code %d. (%s, %s)\n",
releaseComplete->reason.t, call->callType, call->callToken);
reasonCode = releaseComplete->reason.t;
}
}
if(call->callEndReason == OO_REASON_UNKNOWN)
- call->callEndReason = ooGetCallClearReasonFromCauseAndReasonCode(cause,
+ call->callEndReason = ooGetCallClearReasonFromCauseAndReasonCode(cause,
reasonCode);
call->q931cause = cause;
#if 0
@@ -349,7 +349,7 @@ int ooOnReceivedReleaseComplete(OOH323CallData *call, Q931Message *q931Msg)
" (%s, %s)\n", call->callType, call->callToken);
}
#endif
- if(call->h245SessionState != OO_H245SESSION_IDLE &&
+ if(call->h245SessionState != OO_H245SESSION_IDLE &&
call->h245SessionState != OO_H245SESSION_CLOSED)
{
ooCloseH245Connection(call);
@@ -384,7 +384,7 @@ int ooOnReceivedSetup(OOH323CallData *call, Q931Message *q931Msg)
char remoteIP[2+8*4+7] = "";
call->callReference = q931Msg->callReference;
-
+
if(!q931Msg->userInfo)
{
OOTRACEERR3("ERROR:No User-User IE in received SETUP message (%s, %s)\n",
@@ -399,10 +399,10 @@ int ooOnReceivedSetup(OOH323CallData *call, Q931Message *q931Msg)
return OO_FAILED;
}
ooHandleH2250ID(call, &setup->protocolIdentifier);
- memcpy(call->callIdentifier.guid.data, setup->callIdentifier.guid.data,
+ memcpy(call->callIdentifier.guid.data, setup->callIdentifier.guid.data,
setup->callIdentifier.guid.numocts);
call->callIdentifier.guid.numocts = setup->callIdentifier.guid.numocts;
-
+
memcpy(call->confIdentifier.data, setup->conferenceID.data,
setup->conferenceID.numocts);
call->confIdentifier.numocts = setup->conferenceID.numocts;
@@ -411,7 +411,7 @@ int ooOnReceivedSetup(OOH323CallData *call, Q931Message *q931Msg)
pDisplayIE = ooQ931GetIE(q931Msg, Q931DisplayIE);
if(pDisplayIE)
{
- call->remoteDisplayName = (char *) memAllocZ(call->pctxt,
+ call->remoteDisplayName = (char *) memAllocZ(call->pctxt,
pDisplayIE->length*sizeof(ASN1OCTET)+1);
strncpy(call->remoteDisplayName, (char *)pDisplayIE->data, pDisplayIE->length*sizeof(ASN1OCTET));
}
@@ -420,7 +420,7 @@ int ooOnReceivedSetup(OOH323CallData *call, Q931Message *q931Msg)
{
if(setup->sourceAddress.count>0)
{
- ooH323RetrieveAliases(call, &setup->sourceAddress,
+ ooH323RetrieveAliases(call, &setup->sourceAddress,
&call->remoteAliases);
pAlias = call->remoteAliases;
while(pAlias)
@@ -444,13 +444,13 @@ int ooOnReceivedSetup(OOH323CallData *call, Q931Message *q931Msg)
}
/* Extract, aliases used for us, if present. Also,
Populate calledPartyNumber from dialedDigits, if not yet populated using
- calledPartyNumber Q931 IE.
- */
+ calledPartyNumber Q931 IE.
+ */
if(setup->m.destinationAddressPresent)
{
if(setup->destinationAddress.count>0)
{
- ooH323RetrieveAliases(call, &setup->destinationAddress,
+ ooH323RetrieveAliases(call, &setup->destinationAddress,
&call->ourAliases);
pAlias = call->ourAliases;
while(pAlias)
@@ -468,7 +468,7 @@ int ooOnReceivedSetup(OOH323CallData *call, Q931Message *q931Msg)
}
break;
}
- pAlias = pAlias->next;
+ pAlias = pAlias->next;
}
}
}
@@ -511,7 +511,7 @@ int ooOnReceivedSetup(OOH323CallData *call, Q931Message *q931Msg)
}
OO_CLRFLAG (call->flags, OO_M_TUNNELING);
}
-
+
/* Extract Remote IP address */
if(!setup->m.sourceCallSignalAddressPresent)
{
@@ -525,7 +525,7 @@ int ooOnReceivedSetup(OOH323CallData *call, Q931Message *q931Msg)
call->remotePort = setup->sourceCallSignalAddress.u.ip6Address->port;
} else if(setup->sourceCallSignalAddress.t == T_H225TransportAddress_ipAddress) {
ip = &setup->sourceCallSignalAddress.u.ipAddress->ip;
- sprintf(remoteIP, "%d.%d.%d.%d", ip->data[0], ip->data[1],
+ sprintf(remoteIP, "%d.%d.%d.%d", ip->data[0], ip->data[1],
ip->data[2], ip->data[3]);
call->remotePort = setup->sourceCallSignalAddress.u.ipAddress->port;
} else {
@@ -543,9 +543,9 @@ int ooOnReceivedSetup(OOH323CallData *call, Q931Message *q931Msg)
return OO_FAILED;
}
}
-
+
/* check for fast start */
-
+
if(setup->m.fastStartPresent)
{
if(!OO_TESTFLAG(gH323ep.flags, OO_M_FASTSTART))
@@ -579,11 +579,11 @@ int ooOnReceivedSetup(OOH323CallData *call, Q931Message *q931Msg)
{
olc = NULL;
/* memset(msgbuf, 0, sizeof(msgbuf));*/
- olc = (H245OpenLogicalChannel*)memAlloc(call->pctxt,
+ olc = (H245OpenLogicalChannel*)memAlloc(call->pctxt,
sizeof(H245OpenLogicalChannel));
if(!olc)
{
- OOTRACEERR3("ERROR:Memory - ooOnReceivedSetup - olc (%s, %s)\n",
+ OOTRACEERR3("ERROR:Memory - ooOnReceivedSetup - olc (%s, %s)\n",
call->callType, call->callToken);
/*Mark call for clearing */
if(call->callState < OO_CALL_CLEAR)
@@ -596,10 +596,10 @@ int ooOnReceivedSetup(OOH323CallData *call, Q931Message *q931Msg)
return OO_FAILED;
}
memset(olc, 0, sizeof(H245OpenLogicalChannel));
- memcpy(msgbuf, setup->fastStart.elem[i].data,
+ memcpy(msgbuf, setup->fastStart.elem[i].data,
setup->fastStart.elem[i].numocts);
- setPERBuffer(call->pctxt, msgbuf,
+ setPERBuffer(call->pctxt, msgbuf,
setup->fastStart.elem[i].numocts, 1);
ret = asn1PD_H245OpenLogicalChannel(call->pctxt, olc);
if(ret != ASN_OK)
@@ -635,7 +635,7 @@ int ooOnReceivedCallProceeding(OOH323CallData *call, Q931Message *q931Msg)
H245OpenLogicalChannel* olc;
ASN1OCTET msgbuf[MAXMSGLEN];
ooLogicalChannel * pChannel = NULL;
- H245H2250LogicalChannelParameters * h2250lcp = NULL;
+ H245H2250LogicalChannelParameters * h2250lcp = NULL;
int i=0, ret=0;
if(!q931Msg->userInfo)
@@ -644,12 +644,12 @@ int ooOnReceivedCallProceeding(OOH323CallData *call, Q931Message *q931Msg)
" (%s, %s)\n", call->callType, call->callToken);
return OO_FAILED;
}
- callProceeding =
+ callProceeding =
q931Msg->userInfo->h323_uu_pdu.h323_message_body.u.callProceeding;
if(callProceeding == NULL)
{
OOTRACEERR3("Error: Received CallProceeding message does not have "
- "CallProceeding UUIE (%s, %s)\n", call->callType,
+ "CallProceeding UUIE (%s, %s)\n", call->callType,
call->callToken);
/* Mark call for clearing */
if(call->callState < OO_CALL_CLEAR)
@@ -676,7 +676,7 @@ int ooOnReceivedCallProceeding(OOH323CallData *call, Q931Message *q931Msg)
{
olc = NULL;
- olc = (H245OpenLogicalChannel*)memAlloc(call->pctxt,
+ olc = (H245OpenLogicalChannel*)memAlloc(call->pctxt,
sizeof(H245OpenLogicalChannel));
if(!olc)
{
@@ -693,9 +693,9 @@ int ooOnReceivedCallProceeding(OOH323CallData *call, Q931Message *q931Msg)
return OO_FAILED;
}
memset(olc, 0, sizeof(H245OpenLogicalChannel));
- memcpy(msgbuf, callProceeding->fastStart.elem[i].data,
+ memcpy(msgbuf, callProceeding->fastStart.elem[i].data,
callProceeding->fastStart.elem[i].numocts);
- setPERBuffer(call->pctxt, msgbuf,
+ setPERBuffer(call->pctxt, msgbuf,
callProceeding->fastStart.elem[i].numocts, 1);
ret = asn1PD_H245OpenLogicalChannel(call->pctxt, olc);
if(ret != ASN_OK)
@@ -720,7 +720,7 @@ int ooOnReceivedCallProceeding(OOH323CallData *call, Q931Message *q931Msg)
{
OOTRACEERR4("ERROR: Logical Channel %d not found, fast start. "
"(%s, %s)\n",
- olc->forwardLogicalChannelNumber, call->callType,
+ olc->forwardLogicalChannelNumber, call->callType,
call->callToken);
finishPrint();
removeEventHandler(call->pctxt);
@@ -729,9 +729,9 @@ int ooOnReceivedCallProceeding(OOH323CallData *call, Q931Message *q931Msg)
if(pChannel->channelNo != olc->forwardLogicalChannelNumber)
{
OOTRACEINFO5("Remote endpoint changed forwardLogicalChannel"
- "Number from %d to %d (%s, %s)\n",
- pChannel->channelNo,
- olc->forwardLogicalChannelNumber, call->callType,
+ "Number from %d to %d (%s, %s)\n",
+ pChannel->channelNo,
+ olc->forwardLogicalChannelNumber, call->callType,
call->callToken);
pChannel->channelNo = olc->forwardLogicalChannelNumber;
}
@@ -741,12 +741,12 @@ int ooOnReceivedCallProceeding(OOH323CallData *call, Q931Message *q931Msg)
T_H245OpenLogicalChannel_forwardLogicalChannelParameters_multiplexParameters_h2250LogicalChannelParameters)
{
OOTRACEERR4("ERROR:Unknown multiplex parameter type for "
- "channel %d (%s, %s)\n",
+ "channel %d (%s, %s)\n",
olc->forwardLogicalChannelNumber, call->callType,
call->callToken);
continue;
}
-
+
/* Extract the remote media endpoint address */
h2250lcp = olc->forwardLogicalChannelParameters.multiplexParameters.u.h2250LogicalChannelParameters;
if(!h2250lcp)
@@ -767,10 +767,10 @@ int ooOnReceivedCallProceeding(OOH323CallData *call, Q931Message *q931Msg)
removeEventHandler(call->pctxt);
return OO_FAILED;
}
- ret = ooGetIpPortFromH245TransportAddress(call,
+ ret = ooGetIpPortFromH245TransportAddress(call,
&h2250lcp->mediaChannel, pChannel->remoteIP,
&pChannel->remoteMediaPort);
-
+
if(ret != OO_OK)
{
if(call->callState < OO_CALL_CLEAR)
@@ -784,11 +784,11 @@ int ooOnReceivedCallProceeding(OOH323CallData *call, Q931Message *q931Msg)
removeEventHandler(call->pctxt);
return OO_FAILED;
}
-
+
if(!pChannel->chanCap->startTransmitChannel)
{
OOTRACEERR3("ERROR:No callback registered to start transmit "
- "channel (%s, %s)\n",call->callType,
+ "channel (%s, %s)\n",call->callType,
call->callToken);
finishPrint();
removeEventHandler(call->pctxt);
@@ -796,7 +796,7 @@ int ooOnReceivedCallProceeding(OOH323CallData *call, Q931Message *q931Msg)
}
pChannel->chanCap->startTransmitChannel(call, pChannel);
}
- /* Mark the current channel as established and close all other
+ /* Mark the current channel as established and close all other
logical channels with same session id and in same direction.
*/
ooOnLogicalChannelEstablished(call, pChannel);
@@ -805,11 +805,11 @@ int ooOnReceivedCallProceeding(OOH323CallData *call, Q931Message *q931Msg)
removeEventHandler(call->pctxt);
OO_SETFLAG(call->flags, OO_M_FASTSTARTANSWERED);
}
-
+
}
/* Retrieve tunneling info/H.245 control channel address from the connect msg */
- if(q931Msg->userInfo->h323_uu_pdu.m.h245TunnelingPresent &&
+ if(q931Msg->userInfo->h323_uu_pdu.m.h245TunnelingPresent &&
!q931Msg->userInfo->h323_uu_pdu.h245Tunneling) {
if (OO_TESTFLAG (call->flags, OO_M_TUNNELING)) {
OO_CLRFLAG (call->flags, OO_M_TUNNELING);
@@ -822,7 +822,7 @@ int ooOnReceivedCallProceeding(OOH323CallData *call, Q931Message *q931Msg)
OO_TESTFLAG (call->flags, OO_M_TUNNELING) &&
callProceeding->m.h245AddressPresent) {
OOTRACEINFO3("Tunneling and h245address provided."
- "Using Tunneling for H.245 messages (%s, %s)\n",
+ "Using Tunneling for H.245 messages (%s, %s)\n",
call->callType, call->callToken);
}
else if(callProceeding->m.h245AddressPresent)
@@ -831,16 +831,16 @@ int ooOnReceivedCallProceeding(OOH323CallData *call, Q931Message *q931Msg)
{
OO_CLRFLAG (call->flags, OO_M_TUNNELING);
OOTRACEINFO3("Tunneling is disabled for call as H245 address is "
- "provided in callProceeding message (%s, %s)\n",
+ "provided in callProceeding message (%s, %s)\n",
call->callType, call->callToken);
}
- ret = ooH323GetIpPortFromH225TransportAddress(call,
+ ret = ooH323GetIpPortFromH225TransportAddress(call,
&callProceeding->h245Address, call->remoteIP,
&call->remoteH245Port);
if(ret != OO_OK)
{
OOTRACEERR3("Error: Unknown H245 address type in received "
- "CallProceeding message (%s, %s)", call->callType,
+ "CallProceeding message (%s, %s)", call->callType,
call->callToken);
/* Mark call for clearing */
if(call->callState < OO_CALL_CLEAR)
@@ -851,11 +851,11 @@ int ooOnReceivedCallProceeding(OOH323CallData *call, Q931Message *q931Msg)
return OO_FAILED;
}
if(call->remoteH245Port != 0 && !call->pH245Channel) {
- /* Create an H.245 connection.
+ /* Create an H.245 connection.
*/
if(ooCreateH245Connection(call)== OO_FAILED)
{
- OOTRACEERR3("Error: H.245 channel creation failed (%s, %s)\n",
+ OOTRACEERR3("Error: H.245 channel creation failed (%s, %s)\n",
call->callType, call->callToken);
if(call->callState < OO_CALL_CLEAR)
@@ -878,7 +878,7 @@ int ooOnReceivedAlerting(OOH323CallData *call, Q931Message *q931Msg)
H245OpenLogicalChannel* olc;
ASN1OCTET msgbuf[MAXMSGLEN];
ooLogicalChannel * pChannel = NULL;
- H245H2250LogicalChannelParameters * h2250lcp = NULL;
+ H245H2250LogicalChannelParameters * h2250lcp = NULL;
int i=0, ret=0;
ooHandleDisplayIE(call, q931Msg);
@@ -893,7 +893,7 @@ int ooOnReceivedAlerting(OOH323CallData *call, Q931Message *q931Msg)
if(alerting == NULL)
{
OOTRACEERR3("Error: Received Alerting message does not have "
- "alerting UUIE (%s, %s)\n", call->callType,
+ "alerting UUIE (%s, %s)\n", call->callType,
call->callToken);
/* Mark call for clearing */
if(call->callState < OO_CALL_CLEAR)
@@ -920,7 +920,7 @@ int ooOnReceivedAlerting(OOH323CallData *call, Q931Message *q931Msg)
{
olc = NULL;
- olc = (H245OpenLogicalChannel*)memAlloc(call->pctxt,
+ olc = (H245OpenLogicalChannel*)memAlloc(call->pctxt,
sizeof(H245OpenLogicalChannel));
if(!olc)
{
@@ -937,9 +937,9 @@ int ooOnReceivedAlerting(OOH323CallData *call, Q931Message *q931Msg)
return OO_FAILED;
}
memset(olc, 0, sizeof(H245OpenLogicalChannel));
- memcpy(msgbuf, alerting->fastStart.elem[i].data,
+ memcpy(msgbuf, alerting->fastStart.elem[i].data,
alerting->fastStart.elem[i].numocts);
- setPERBuffer(call->pctxt, msgbuf,
+ setPERBuffer(call->pctxt, msgbuf,
alerting->fastStart.elem[i].numocts, 1);
ret = asn1PD_H245OpenLogicalChannel(call->pctxt, olc);
if(ret != ASN_OK)
@@ -964,7 +964,7 @@ int ooOnReceivedAlerting(OOH323CallData *call, Q931Message *q931Msg)
{
OOTRACEERR4("ERROR: Logical Channel %d not found, fast start. "
"(%s, %s)\n",
- olc->forwardLogicalChannelNumber, call->callType,
+ olc->forwardLogicalChannelNumber, call->callType,
call->callToken);
finishPrint();
removeEventHandler(call->pctxt);
@@ -973,9 +973,9 @@ int ooOnReceivedAlerting(OOH323CallData *call, Q931Message *q931Msg)
if(pChannel->channelNo != olc->forwardLogicalChannelNumber)
{
OOTRACEINFO5("Remote endpoint changed forwardLogicalChannel"
- "Number from %d to %d (%s, %s)\n",
- pChannel->channelNo,
- olc->forwardLogicalChannelNumber, call->callType,
+ "Number from %d to %d (%s, %s)\n",
+ pChannel->channelNo,
+ olc->forwardLogicalChannelNumber, call->callType,
call->callToken);
pChannel->channelNo = olc->forwardLogicalChannelNumber;
}
@@ -985,12 +985,12 @@ int ooOnReceivedAlerting(OOH323CallData *call, Q931Message *q931Msg)
T_H245OpenLogicalChannel_forwardLogicalChannelParameters_multiplexParameters_h2250LogicalChannelParameters)
{
OOTRACEERR4("ERROR:Unknown multiplex parameter type for "
- "channel %d (%s, %s)\n",
+ "channel %d (%s, %s)\n",
olc->forwardLogicalChannelNumber, call->callType,
call->callToken);
continue;
}
-
+
/* Extract the remote media endpoint address */
h2250lcp = olc->forwardLogicalChannelParameters.multiplexParameters.u.h2250LogicalChannelParameters;
if(!h2250lcp)
@@ -1011,10 +1011,10 @@ int ooOnReceivedAlerting(OOH323CallData *call, Q931Message *q931Msg)
removeEventHandler(call->pctxt);
return OO_FAILED;
}
- ret = ooGetIpPortFromH245TransportAddress(call,
+ ret = ooGetIpPortFromH245TransportAddress(call,
&h2250lcp->mediaChannel, pChannel->remoteIP,
&pChannel->remoteMediaPort);
-
+
if(ret != OO_OK)
{
if(call->callState < OO_CALL_CLEAR)
@@ -1026,18 +1026,18 @@ int ooOnReceivedAlerting(OOH323CallData *call, Q931Message *q931Msg)
"(%s, %s)\n", call->callType, call->callToken);
return OO_FAILED;
}
-
+
if(!pChannel->chanCap->startTransmitChannel)
{
OOTRACEERR3("ERROR:No callback registered to start transmit "
- "channel (%s, %s)\n",call->callType,
+ "channel (%s, %s)\n",call->callType,
call->callToken);
finishPrint();
removeEventHandler(call->pctxt);
return OO_FAILED;
}
pChannel->chanCap->startTransmitChannel(call, pChannel);
- /* Mark the current channel as established and close all other
+ /* Mark the current channel as established and close all other
logical channels with same session id and in same direction.
*/
ooOnLogicalChannelEstablished(call, pChannel);
@@ -1046,12 +1046,12 @@ int ooOnReceivedAlerting(OOH323CallData *call, Q931Message *q931Msg)
finishPrint();
removeEventHandler(call->pctxt);
OO_SETFLAG(call->flags, OO_M_FASTSTARTANSWERED);
- }
+ }
}
/* Retrieve tunneling info/H.245 control channel address from the connect msg */
- if(q931Msg->userInfo->h323_uu_pdu.m.h245TunnelingPresent &&
+ if(q931Msg->userInfo->h323_uu_pdu.m.h245TunnelingPresent &&
!q931Msg->userInfo->h323_uu_pdu.h245Tunneling) {
if (OO_TESTFLAG (call->flags, OO_M_TUNNELING)) {
OO_CLRFLAG (call->flags, OO_M_TUNNELING);
@@ -1062,9 +1062,9 @@ int ooOnReceivedAlerting(OOH323CallData *call, Q931Message *q931Msg)
if(q931Msg->userInfo->h323_uu_pdu.m.h245TunnelingPresent &&
q931Msg->userInfo->h323_uu_pdu.h245Tunneling &&
OO_TESTFLAG (call->flags, OO_M_TUNNELING)) {
- if (alerting->m.h245AddressPresent)
+ if (alerting->m.h245AddressPresent)
OOTRACEINFO3("Tunneling and h245address provided."
- "Giving preference to Tunneling (%s, %s)\n",
+ "Giving preference to Tunneling (%s, %s)\n",
call->callType, call->callToken);
if (call->h225version >= 4) {
ret =ooSendTCSandMSD(call);
@@ -1077,16 +1077,16 @@ int ooOnReceivedAlerting(OOH323CallData *call, Q931Message *q931Msg)
{
OO_CLRFLAG (call->flags, OO_M_TUNNELING);
OOTRACEINFO3("Tunneling is disabled for call as H245 address is "
- "provided in Alerting message (%s, %s)\n",
+ "provided in Alerting message (%s, %s)\n",
call->callType, call->callToken);
}
- ret = ooH323GetIpPortFromH225TransportAddress(call,
+ ret = ooH323GetIpPortFromH225TransportAddress(call,
&alerting->h245Address, call->remoteIP,
&call->remoteH245Port);
if(ret != OO_OK)
{
OOTRACEERR3("Error: Unknown H245 address type in received "
- "Alerting message (%s, %s)", call->callType,
+ "Alerting message (%s, %s)", call->callType,
call->callToken);
/* Mark call for clearing */
if(call->callState < OO_CALL_CLEAR)
@@ -1097,11 +1097,11 @@ int ooOnReceivedAlerting(OOH323CallData *call, Q931Message *q931Msg)
return OO_FAILED;
}
if(call->remoteH245Port != 0 && !call->pH245Channel) {
- /* Create an H.245 connection.
+ /* Create an H.245 connection.
*/
if(ooCreateH245Connection(call)== OO_FAILED)
{
- OOTRACEERR3("Error: H.245 channel creation failed (%s, %s)\n",
+ OOTRACEERR3("Error: H.245 channel creation failed (%s, %s)\n",
call->callType, call->callToken);
if(call->callState < OO_CALL_CLEAR)
@@ -1127,7 +1127,7 @@ int ooOnReceivedProgress(OOH323CallData *call, Q931Message *q931Msg)
H245OpenLogicalChannel* olc;
ASN1OCTET msgbuf[MAXMSGLEN];
ooLogicalChannel * pChannel = NULL;
- H245H2250LogicalChannelParameters * h2250lcp = NULL;
+ H245H2250LogicalChannelParameters * h2250lcp = NULL;
int i=0, ret=0;
ooHandleDisplayIE(call, q931Msg);
@@ -1142,7 +1142,7 @@ int ooOnReceivedProgress(OOH323CallData *call, Q931Message *q931Msg)
if(progress == NULL)
{
OOTRACEERR3("Error: Received Progress message does not have "
- "progress UUIE (%s, %s)\n", call->callType,
+ "progress UUIE (%s, %s)\n", call->callType,
call->callToken);
/* Mark call for clearing */
if(call->callState < OO_CALL_CLEAR)
@@ -1169,7 +1169,7 @@ int ooOnReceivedProgress(OOH323CallData *call, Q931Message *q931Msg)
{
olc = NULL;
- olc = (H245OpenLogicalChannel*)memAlloc(call->pctxt,
+ olc = (H245OpenLogicalChannel*)memAlloc(call->pctxt,
sizeof(H245OpenLogicalChannel));
if(!olc)
{
@@ -1186,9 +1186,9 @@ int ooOnReceivedProgress(OOH323CallData *call, Q931Message *q931Msg)
return OO_FAILED;
}
memset(olc, 0, sizeof(H245OpenLogicalChannel));
- memcpy(msgbuf, progress->fastStart.elem[i].data,
+ memcpy(msgbuf, progress->fastStart.elem[i].data,
progress->fastStart.elem[i].numocts);
- setPERBuffer(call->pctxt, msgbuf,
+ setPERBuffer(call->pctxt, msgbuf,
progress->fastStart.elem[i].numocts, 1);
ret = asn1PD_H245OpenLogicalChannel(call->pctxt, olc);
if(ret != ASN_OK)
@@ -1213,7 +1213,7 @@ int ooOnReceivedProgress(OOH323CallData *call, Q931Message *q931Msg)
{
OOTRACEERR4("ERROR: Logical Channel %d not found, fast start. "
"(%s, %s)\n",
- olc->forwardLogicalChannelNumber, call->callType,
+ olc->forwardLogicalChannelNumber, call->callType,
call->callToken);
finishPrint();
removeEventHandler(call->pctxt);
@@ -1222,9 +1222,9 @@ int ooOnReceivedProgress(OOH323CallData *call, Q931Message *q931Msg)
if(pChannel->channelNo != olc->forwardLogicalChannelNumber)
{
OOTRACEINFO5("Remote endpoint changed forwardLogicalChannel"
- "Number from %d to %d (%s, %s)\n",
- pChannel->channelNo,
- olc->forwardLogicalChannelNumber, call->callType,
+ "Number from %d to %d (%s, %s)\n",
+ pChannel->channelNo,
+ olc->forwardLogicalChannelNumber, call->callType,
call->callToken);
pChannel->channelNo = olc->forwardLogicalChannelNumber;
}
@@ -1234,12 +1234,12 @@ int ooOnReceivedProgress(OOH323CallData *call, Q931Message *q931Msg)
T_H245OpenLogicalChannel_forwardLogicalChannelParameters_multiplexParameters_h2250LogicalChannelParameters)
{
OOTRACEERR4("ERROR:Unknown multiplex parameter type for "
- "channel %d (%s, %s)\n",
+ "channel %d (%s, %s)\n",
olc->forwardLogicalChannelNumber, call->callType,
call->callToken);
continue;
}
-
+
/* Extract the remote media endpoint address */
h2250lcp = olc->forwardLogicalChannelParameters.multiplexParameters.u.h2250LogicalChannelParameters;
if(!h2250lcp)
@@ -1260,10 +1260,10 @@ int ooOnReceivedProgress(OOH323CallData *call, Q931Message *q931Msg)
removeEventHandler(call->pctxt);
return OO_FAILED;
}
- ret = ooGetIpPortFromH245TransportAddress(call,
+ ret = ooGetIpPortFromH245TransportAddress(call,
&h2250lcp->mediaChannel, pChannel->remoteIP,
&pChannel->remoteMediaPort);
-
+
if(ret != OO_OK)
{
if(call->callState < OO_CALL_CLEAR)
@@ -1277,11 +1277,11 @@ int ooOnReceivedProgress(OOH323CallData *call, Q931Message *q931Msg)
removeEventHandler(call->pctxt);
return OO_FAILED;
}
-
+
if(!pChannel->chanCap->startTransmitChannel)
{
OOTRACEERR3("ERROR:No callback registered to start transmit "
- "channel (%s, %s)\n",call->callType,
+ "channel (%s, %s)\n",call->callType,
call->callToken);
finishPrint();
removeEventHandler(call->pctxt);
@@ -1289,7 +1289,7 @@ int ooOnReceivedProgress(OOH323CallData *call, Q931Message *q931Msg)
}
pChannel->chanCap->startTransmitChannel(call, pChannel);
}
- /* Mark the current channel as established and close all other
+ /* Mark the current channel as established and close all other
logical channels with same session id and in same direction.
*/
ooOnLogicalChannelEstablished(call, pChannel);
@@ -1298,12 +1298,12 @@ int ooOnReceivedProgress(OOH323CallData *call, Q931Message *q931Msg)
removeEventHandler(call->pctxt);
OO_SETFLAG(call->flags, OO_M_FASTSTARTANSWERED);
}
-
+
}
/* Retrieve the H.245 control channel address from the connect msg */
/* Retrieve tunneling info/H.245 control channel address from the connect msg */
- if(q931Msg->userInfo->h323_uu_pdu.m.h245TunnelingPresent &&
+ if(q931Msg->userInfo->h323_uu_pdu.m.h245TunnelingPresent &&
!q931Msg->userInfo->h323_uu_pdu.h245Tunneling) {
if (OO_TESTFLAG (call->flags, OO_M_TUNNELING)) {
OO_CLRFLAG (call->flags, OO_M_TUNNELING);
@@ -1314,9 +1314,9 @@ int ooOnReceivedProgress(OOH323CallData *call, Q931Message *q931Msg)
if(q931Msg->userInfo->h323_uu_pdu.m.h245TunnelingPresent &&
q931Msg->userInfo->h323_uu_pdu.h245Tunneling &&
OO_TESTFLAG (call->flags, OO_M_TUNNELING)) {
- if (progress->m.h245AddressPresent)
+ if (progress->m.h245AddressPresent)
OOTRACEINFO3("Tunneling and h245address provided."
- "Giving preference to Tunneling (%s, %s)\n",
+ "Giving preference to Tunneling (%s, %s)\n",
call->callType, call->callToken);
if (call->h225version >= 4) {
ret =ooSendTCSandMSD(call);
@@ -1328,16 +1328,16 @@ int ooOnReceivedProgress(OOH323CallData *call, Q931Message *q931Msg)
{
OO_CLRFLAG (call->flags, OO_M_TUNNELING);
OOTRACEINFO3("Tunneling is disabled for call as H245 address is "
- "provided in Progress message (%s, %s)\n",
+ "provided in Progress message (%s, %s)\n",
call->callType, call->callToken);
}
- ret = ooH323GetIpPortFromH225TransportAddress(call,
+ ret = ooH323GetIpPortFromH225TransportAddress(call,
&progress->h245Address, call->remoteIP,
&call->remoteH245Port);
if(ret != OO_OK)
{
OOTRACEERR3("Error: Unknown H245 address type in received "
- "Progress message (%s, %s)", call->callType,
+ "Progress message (%s, %s)", call->callType,
call->callToken);
/* Mark call for clearing */
if(call->callState < OO_CALL_CLEAR)
@@ -1348,11 +1348,11 @@ int ooOnReceivedProgress(OOH323CallData *call, Q931Message *q931Msg)
return OO_FAILED;
}
if(call->remoteH245Port != 0 && !call->pH245Channel) {
- /* Create an H.245 connection.
+ /* Create an H.245 connection.
*/
if(ooCreateH245Connection(call)== OO_FAILED)
{
- OOTRACEERR3("Error: H.245 channel creation failed (%s, %s)\n",
+ OOTRACEERR3("Error: H.245 channel creation failed (%s, %s)\n",
call->callType, call->callToken);
if(call->callState < OO_CALL_CLEAR)
@@ -1371,7 +1371,7 @@ int ooOnReceivedProgress(OOH323CallData *call, Q931Message *q931Msg)
return OO_OK;
}
-
+
int ooOnReceivedSignalConnect(OOH323CallData* call, Q931Message *q931Msg)
{
@@ -1380,7 +1380,7 @@ int ooOnReceivedSignalConnect(OOH323CallData* call, Q931Message *q931Msg)
H245OpenLogicalChannel* olc;
ASN1OCTET msgbuf[MAXMSGLEN];
ooLogicalChannel * pChannel = NULL;
- H245H2250LogicalChannelParameters * h2250lcp = NULL;
+ H245H2250LogicalChannelParameters * h2250lcp = NULL;
ooHandleDisplayIE(call, q931Msg);
@@ -1412,7 +1412,7 @@ int ooOnReceivedSignalConnect(OOH323CallData* call, Q931Message *q931Msg)
}
ooHandleH2250ID(call, &connect->protocolIdentifier);
/*Handle fast-start */
- if(OO_TESTFLAG (call->flags, OO_M_FASTSTART) &&
+ if(OO_TESTFLAG (call->flags, OO_M_FASTSTART) &&
!OO_TESTFLAG (call->flags, OO_M_FASTSTARTANSWERED))
{
if(!connect->m.fastStartPresent)
@@ -1423,7 +1423,7 @@ int ooOnReceivedSignalConnect(OOH323CallData* call, Q931Message *q931Msg)
}
}
- if (connect->m.fastStartPresent &&
+ if (connect->m.fastStartPresent &&
!OO_TESTFLAG(call->flags, OO_M_FASTSTARTANSWERED))
{
/* For printing the decoded message to log, initialize handler. */
@@ -1436,7 +1436,7 @@ int ooOnReceivedSignalConnect(OOH323CallData* call, Q931Message *q931Msg)
{
olc = NULL;
/* memset(msgbuf, 0, sizeof(msgbuf));*/
- olc = (H245OpenLogicalChannel*)memAlloc(call->pctxt,
+ olc = (H245OpenLogicalChannel*)memAlloc(call->pctxt,
sizeof(H245OpenLogicalChannel));
if(!olc)
{
@@ -1453,9 +1453,9 @@ int ooOnReceivedSignalConnect(OOH323CallData* call, Q931Message *q931Msg)
return OO_FAILED;
}
memset(olc, 0, sizeof(H245OpenLogicalChannel));
- memcpy(msgbuf, connect->fastStart.elem[i].data,
+ memcpy(msgbuf, connect->fastStart.elem[i].data,
connect->fastStart.elem[i].numocts);
- setPERBuffer(call->pctxt, msgbuf,
+ setPERBuffer(call->pctxt, msgbuf,
connect->fastStart.elem[i].numocts, 1);
ret = asn1PD_H245OpenLogicalChannel(call->pctxt, olc);
if(ret != ASN_OK)
@@ -1480,7 +1480,7 @@ int ooOnReceivedSignalConnect(OOH323CallData* call, Q931Message *q931Msg)
{
OOTRACEERR4("ERROR: Logical Channel %d not found, fasts start "
"answered. (%s, %s)\n",
- olc->forwardLogicalChannelNumber, call->callType,
+ olc->forwardLogicalChannelNumber, call->callType,
call->callToken);
finishPrint();
removeEventHandler(call->pctxt);
@@ -1490,21 +1490,21 @@ int ooOnReceivedSignalConnect(OOH323CallData* call, Q931Message *q931Msg)
{
OOTRACEINFO5("Remote endpoint changed forwardLogicalChannelNumber"
"from %d to %d (%s, %s)\n", pChannel->channelNo,
- olc->forwardLogicalChannelNumber, call->callType,
+ olc->forwardLogicalChannelNumber, call->callType,
call->callToken);
pChannel->channelNo = olc->forwardLogicalChannelNumber;
}
if(!strcmp(pChannel->dir, "transmit"))
{
- if(olc->forwardLogicalChannelParameters.multiplexParameters.t !=
+ if(olc->forwardLogicalChannelParameters.multiplexParameters.t !=
T_H245OpenLogicalChannel_forwardLogicalChannelParameters_multiplexParameters_h2250LogicalChannelParameters)
{
OOTRACEERR4("ERROR:Unknown multiplex parameter type for channel"
- " %d (%s, %s)\n", olc->forwardLogicalChannelNumber,
+ " %d (%s, %s)\n", olc->forwardLogicalChannelNumber,
call->callType, call->callToken);
continue;
}
-
+
/* Extract the remote media endpoint address */
h2250lcp = olc->forwardLogicalChannelParameters.multiplexParameters.u.h2250LogicalChannelParameters;
if(!h2250lcp)
@@ -1526,7 +1526,7 @@ int ooOnReceivedSignalConnect(OOH323CallData* call, Q931Message *q931Msg)
return OO_FAILED;
}
- ret = ooGetIpPortFromH245TransportAddress(call,
+ ret = ooGetIpPortFromH245TransportAddress(call,
&h2250lcp->mediaChannel, pChannel->remoteIP,
&pChannel->remoteMediaPort);
if(ret != OO_OK)
@@ -1552,7 +1552,7 @@ int ooOnReceivedSignalConnect(OOH323CallData* call, Q931Message *q931Msg)
}
pChannel->chanCap->startTransmitChannel(call, pChannel);
}
- /* Mark the current channel as established and close all other
+ /* Mark the current channel as established and close all other
logical channels with same session id and in same direction.
*/
ooOnLogicalChannelEstablished(call, pChannel);
@@ -1563,7 +1563,7 @@ int ooOnReceivedSignalConnect(OOH323CallData* call, Q931Message *q931Msg)
}
/* Retrieve tunneling info/H.245 control channel address from the connect msg */
- if(q931Msg->userInfo->h323_uu_pdu.m.h245TunnelingPresent &&
+ if(q931Msg->userInfo->h323_uu_pdu.m.h245TunnelingPresent &&
!q931Msg->userInfo->h323_uu_pdu.h245Tunneling) {
if (OO_TESTFLAG (call->flags, OO_M_TUNNELING)) {
OO_CLRFLAG (call->flags, OO_M_TUNNELING);
@@ -1576,7 +1576,7 @@ int ooOnReceivedSignalConnect(OOH323CallData* call, Q931Message *q931Msg)
OO_TESTFLAG (call->flags, OO_M_TUNNELING) &&
connect->m.h245AddressPresent) {
OOTRACEINFO3("Tunneling and h245address provided."
- "Giving preference to Tunneling (%s, %s)\n",
+ "Giving preference to Tunneling (%s, %s)\n",
call->callType, call->callToken);
}
else if(connect->m.h245AddressPresent)
@@ -1585,10 +1585,10 @@ int ooOnReceivedSignalConnect(OOH323CallData* call, Q931Message *q931Msg)
{
OO_CLRFLAG (call->flags, OO_M_TUNNELING);
OOTRACEINFO3("Tunneling is disabled for call as H245 address is "
- "provided in connect message (%s, %s)\n",
+ "provided in connect message (%s, %s)\n",
call->callType, call->callToken);
}
- ret = ooH323GetIpPortFromH225TransportAddress(call,
+ ret = ooH323GetIpPortFromH225TransportAddress(call,
&connect->h245Address, call->remoteIP, &call->remoteH245Port);
if(ret != OO_OK)
{
@@ -1606,11 +1606,11 @@ int ooOnReceivedSignalConnect(OOH323CallData* call, Q931Message *q931Msg)
if(call->remoteH245Port != 0 && !call->pH245Channel)
{
- /* Create an H.245 connection.
+ /* Create an H.245 connection.
*/
if(ooCreateH245Connection(call)== OO_FAILED)
{
- OOTRACEERR3("Error: H.245 channel creation failed (%s, %s)\n",
+ OOTRACEERR3("Error: H.245 channel creation failed (%s, %s)\n",
call->callType, call->callToken);
if(call->callState < OO_CALL_CLEAR)
@@ -1645,7 +1645,7 @@ int ooOnReceivedSignalConnect(OOH323CallData* call, Q931Message *q931Msg)
}
/*
- Send TCS as call established and no capability exchange has yet
+ Send TCS as call established and no capability exchange has yet
started. This will be true only when separate h245 connection is not
established and tunneling is being used.
*/
@@ -1665,7 +1665,7 @@ int ooOnReceivedSignalConnect(OOH323CallData* call, Q931Message *q931Msg)
if (call->rtdrCount > 0 && call->rtdrInterval > 0) {
return ooSendRoundTripDelayRequest(call);
}
- return OO_OK;
+ return OO_OK;
}
int ooHandleH2250Message(OOH323CallData *call, Q931Message *q931Msg)
@@ -1697,21 +1697,21 @@ int ooHandleH2250Message(OOH323CallData *call, Q931Message *q931Msg)
if (ret != OO_OK) {
call->callState = OO_CALL_CLEAR;
} else {
-
+
/* H225 message callback */
if(gH323ep.h225Callbacks.onReceivedSetup)
ret = gH323ep.h225Callbacks.onReceivedSetup(call, q931Msg);
}
- /* Free up the mem used by the received message, as it's processing
- is done.
+ /* Free up the mem used by the received message, as it's processing
+ is done.
*/
if (ret == OO_OK) {
ooFreeQ931Message(call->msgctxt, q931Msg);
-
- /* DISABLEGK is used to selectively disable gatekeeper use. For
- incoming calls DISABLEGK can be set in onReceivedSetup callback by
- application. Very useful in pbx applications where gk is used only
+
+ /* DISABLEGK is used to selectively disable gatekeeper use. For
+ incoming calls DISABLEGK can be set in onReceivedSetup callback by
+ application. Very useful in pbx applications where gk is used only
when call is to or from outside pbx domian
*/
if(gH323ep.gkClient && !OO_TESTFLAG(call->flags, OO_M_DISABLEGK))
@@ -1720,7 +1720,7 @@ int ooHandleH2250Message(OOH323CallData *call, Q931Message *q931Msg)
{
call->callState = OO_CALL_WAITING_ADMISSION;
ast_mutex_lock(&call->GkLock);
- ret = ooGkClientSendAdmissionRequest(gH323ep.gkClient, call,
+ ret = ooGkClientSendAdmissionRequest(gH323ep.gkClient, call,
FALSE);
tv = ast_tvnow();
ts.tv_sec = tv.tv_sec + 24;
@@ -1761,7 +1761,7 @@ int ooHandleH2250Message(OOH323CallData *call, Q931Message *q931Msg)
case Q931AlertingMsg:/* ALERTING message received */
- OOTRACEINFO3("H.225 Alerting message received (%s, %s)\n",
+ OOTRACEINFO3("H.225 Alerting message received (%s, %s)\n",
call->callType, call->callToken);
call->alertingTime = (H235TimeStamp) time(NULL);
@@ -1774,7 +1774,7 @@ int ooHandleH2250Message(OOH323CallData *call, Q931Message *q931Msg)
case Q931ProgressMsg:/* PROGRESS message received */
- OOTRACEINFO3("H.225 Progress message received (%s, %s)\n",
+ OOTRACEINFO3("H.225 Progress message received (%s, %s)\n",
call->callType, call->callToken);
ooOnReceivedProgress(call, q931Msg);
@@ -1796,12 +1796,12 @@ int ooHandleH2250Message(OOH323CallData *call, Q931Message *q931Msg)
{
pNode = dListFindByIndex(&call->timerList, i);
pTimer = (OOTimer*)pNode->data;
- if(((ooTimerCallback*)pTimer->cbData)->timerType &
+ if(((ooTimerCallback*)pTimer->cbData)->timerType &
OO_CALLESTB_TIMER)
{
memFreePtr(call->pctxt, pTimer->cbData);
ooTimerDelete(call->pctxt, &call->timerList, pTimer);
- OOTRACEDBGC3("Deleted CallESTB timer. (%s, %s)\n",
+ OOTRACEDBGC3("Deleted CallESTB timer. (%s, %s)\n",
call->callType, call->callToken);
break;
}
@@ -1840,14 +1840,14 @@ int ooHandleH2250Message(OOH323CallData *call, Q931Message *q931Msg)
call->endTime = (H235TimeStamp) time(NULL);
ooOnReceivedReleaseComplete(call, q931Msg);
-
+
ooFreeQ931Message(call->msgctxt, q931Msg);
break;
- case Q931FacilityMsg:
+ case Q931FacilityMsg:
OOTRACEINFO3("H.225 Facility message Received (%s, %s)\n",
call->callType, call->callToken);
- ooOnReceivedFacility(call, q931Msg);
+ ooOnReceivedFacility(call, q931Msg);
ooFreeQ931Message(call->msgctxt, q931Msg);
break;
case Q931StatusMsg:
@@ -1866,7 +1866,7 @@ int ooHandleH2250Message(OOH323CallData *call, Q931Message *q931Msg)
call->callType, call->callToken);
ooFreeQ931Message(call->msgctxt, q931Msg);
break;
- case Q931NotifyMsg:
+ case Q931NotifyMsg:
OOTRACEINFO3("H.225 Notify message Received (%s, %s)\n",
call->callType, call->callToken);
ooFreeQ931Message(call->msgctxt, q931Msg);
@@ -1886,7 +1886,7 @@ int ooOnReceivedFacility(OOH323CallData *call, Q931Message * pQ931Msg)
int ret;
H225TransportAddress_ipAddress_ip *ip = NULL;
H225TransportAddress_ip6Address_ip *ip6 = NULL;
- OOTRACEDBGC3("Received Facility Message.(%s, %s)\n", call->callType,
+ OOTRACEDBGC3("Received Facility Message.(%s, %s)\n", call->callType,
call->callToken);
ooHandleDisplayIE(call, pQ931Msg);
@@ -1945,11 +1945,11 @@ int ooOnReceivedFacility(OOH323CallData *call, Q931Message * pQ931Msg)
{
OOTRACEINFO3("Call Forward Facility message received. (%s, %s)\n",
call->callType, call->callToken);
- if(!facility->m.alternativeAddressPresent &&
+ if(!facility->m.alternativeAddressPresent &&
!facility->m.alternativeAliasAddressPresent)
{
OOTRACEERR3("Error:No alternative address provided in call forward"
- "facility message.(%s, %s)\n", call->callType,
+ "facility message.(%s, %s)\n", call->callType,
call->callToken);
if(call->callState < OO_CALL_CLEAR)
{
@@ -1958,7 +1958,7 @@ int ooOnReceivedFacility(OOH323CallData *call, Q931Message * pQ931Msg)
}
return OO_OK;
}
- call->pCallFwdData = (OOCallFwdData *) memAlloc(call->pctxt,
+ call->pCallFwdData = (OOCallFwdData *) memAlloc(call->pctxt,
sizeof(OOCallFwdData));
if(!call->pCallFwdData)
{
@@ -1972,40 +1972,40 @@ int ooOnReceivedFacility(OOH323CallData *call, Q931Message * pQ931Msg)
if(facility->m.alternativeAddressPresent)
{
if (call->versionIP == 6) {
- if(facility->alternativeAddress.t !=
+ if(facility->alternativeAddress.t !=
T_H225TransportAddress_ip6Address)
{
OOTRACEERR3("ERROR: Source call signalling address type not ip6 "
"(%s, %s)\n", call->callType, call->callToken);
-
+
return OO_FAILED;
}
ip6 = &facility->alternativeAddress.u.ip6Address->ip;
inet_ntop(AF_INET6, ip6->data, call->pCallFwdData->ip, INET6_ADDRSTRLEN);
- call->pCallFwdData->port =
+ call->pCallFwdData->port =
facility->alternativeAddress.u.ip6Address->port;
} else {
- if(facility->alternativeAddress.t !=
+ if(facility->alternativeAddress.t !=
T_H225TransportAddress_ipAddress)
{
OOTRACEERR3("ERROR: Source call signalling address type not ip "
"(%s, %s)\n", call->callType, call->callToken);
-
+
return OO_FAILED;
}
ip = &facility->alternativeAddress.u.ipAddress->ip;
- sprintf(call->pCallFwdData->ip, "%d.%d.%d.%d", ip->data[0],
+ sprintf(call->pCallFwdData->ip, "%d.%d.%d.%d", ip->data[0],
ip->data[1], ip->data[2], ip->data[3]);
- call->pCallFwdData->port =
+ call->pCallFwdData->port =
facility->alternativeAddress.u.ipAddress->port;
}
}
if(facility->m.alternativeAliasAddressPresent)
{
- ooH323RetrieveAliases(call, &facility->alternativeAliasAddress,
+ ooH323RetrieveAliases(call, &facility->alternativeAliasAddress,
&call->pCallFwdData->aliases);
}
/* Now we have to clear the current call and make a new call to
@@ -2035,12 +2035,12 @@ int ooOnReceivedFacility(OOH323CallData *call, Q931Message * pQ931Msg)
}
}
else{
- OOTRACEINFO3("Unhandled Facility reason type received (%s, %s)\n",
+ OOTRACEINFO3("Unhandled Facility reason type received (%s, %s)\n",
call->callType, call->callToken);
}
}
else{ /* Empty facility message Check for tunneling */
- if (pH323UUPdu->h323_message_body.t ==
+ if (pH323UUPdu->h323_message_body.t ==
T_H225H323_UU_PDU_h323_message_body_empty) {
OOTRACEDBGB3("Handling tunneled messages in empty Facility message."
" (%s, %s)\n", call->callType, call->callToken);
@@ -2049,7 +2049,7 @@ int ooOnReceivedFacility(OOH323CallData *call, Q931Message * pQ931Msg)
"message. (%s, %s)\n", call->callType, call->callToken);
}
}
-
+
return OO_OK;
}
@@ -2059,7 +2059,7 @@ int ooHandleStartH245FacilityMessage
H225TransportAddress_ipAddress *ipAddress = NULL;
H225TransportAddress_ip6Address *ip6Address = NULL;
int ret;
-
+
/* Extract H245 address */
if(!facility->m.h245AddressPresent)
{
@@ -2097,7 +2097,7 @@ int ooHandleStartH245FacilityMessage
"address found. (%s, %s)\n", call->callType, call->callToken);
return OO_FAILED;
}
-
+
sprintf(call->remoteIP, "%d.%d.%d.%d", ipAddress->ip.data[0],
ipAddress->ip.data[1],
ipAddress->ip.data[2],
@@ -2131,17 +2131,17 @@ int ooHandleTunneledH245Messages
H245Message *pmsg;
OOCTXT *pctxt = call->msgctxt;
int ret=0,i=0;
-
- OOTRACEDBGC3("Checking for tunneled H.245 messages (%s, %s)\n",
+
+ OOTRACEDBGC3("Checking for tunneled H.245 messages (%s, %s)\n",
call->callType, call->callToken);
- /* Check whether there are tunneled messages */
+ /* Check whether there are tunneled messages */
if(pH323UUPdu->m.h245TunnelingPresent)
{
if(pH323UUPdu->h245Tunneling)
{
OOTRACEDBGB4("Total number of tunneled H245 messages are %d.(%s, %s)"
- "\n", (int)pH323UUPdu->h245Control.n, call->callType,
+ "\n", (int)pH323UUPdu->h245Control.n, call->callType,
call->callToken);
for(i=0; i< (int)pH323UUPdu->h245Control.n; i++)
{
@@ -2156,21 +2156,21 @@ int ooHandleTunneledH245Messages
return OO_FAILED;
}
- setPERBuffer(pctxt,
+ setPERBuffer(pctxt,
(ASN1OCTET*)pH323UUPdu->h245Control.elem[i].data,
- pH323UUPdu->h245Control.elem[i].numocts, 1);
+ pH323UUPdu->h245Control.elem[i].numocts, 1);
initializePrintHandler(&printHandler, "Tunneled H.245 Message");
memset(pmsg, 0, sizeof(H245Message));
/* Set event handler */
setEventHandler (pctxt, &printHandler);
- OOTRACEDBGC4("Decoding %d tunneled H245 message. (%s, %s)\n",
+ OOTRACEDBGC4("Decoding %d tunneled H245 message. (%s, %s)\n",
i+1, call->callType, call->callToken);
- ret = asn1PD_H245MultimediaSystemControlMessage(pctxt,
+ 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;
@@ -2187,7 +2187,7 @@ int ooHandleTunneledH245Messages
}
int ooH323RetrieveAliases
- (OOH323CallData *call, H225_SeqOfH225AliasAddress *pAddresses,
+ (OOH323CallData *call, H225_SeqOfH225AliasAddress *pAddresses,
OOAliases **aliasList)
{
int i=0,j=0,k=0;
@@ -2198,14 +2198,14 @@ int ooH323RetrieveAliases
if(!pAddresses)
{
- OOTRACEWARN3("Warn:No Aliases present (%s, %s)\n", call->callType,
+ OOTRACEWARN3("Warn:No Aliases present (%s, %s)\n", call->callType,
call->callToken);
return OO_OK;
}
/* check for aliases */
if(pAddresses->count<=0)
return OO_OK;
-
+
for(i=0; i<(int)pAddresses->count; i++)
{
pNode = dListFindByIndex (pAddresses, i);
@@ -2230,14 +2230,14 @@ int ooH323RetrieveAliases
{
case T_H225AliasAddress_dialedDigits:
newAlias->type = T_H225AliasAddress_dialedDigits;
- newAlias->value = (char*) memAlloc(call->pctxt,
+ newAlias->value = (char*) memAlloc(call->pctxt,
strlen(pAliasAddress->u.dialedDigits)*sizeof(char)+1);
if(!newAlias->value)
{
OOTRACEERR3("ERROR:Memory - ooH323RetrieveAliases - "
- "newAlias->value(dialedDigits) (%s, %s)\n",
+ "newAlias->value(dialedDigits) (%s, %s)\n",
call->callType, call->callToken);
- memFreePtr(call->pctxt, newAlias);
+ memFreePtr(call->pctxt, newAlias);
return OO_FAILED;
}
@@ -2247,14 +2247,14 @@ int ooH323RetrieveAliases
break;
case T_H225AliasAddress_h323_ID:
newAlias->type = T_H225AliasAddress_h323_ID;
- newAlias->value = (char*)memAlloc(call->pctxt,
+ newAlias->value = (char*)memAlloc(call->pctxt,
(pAliasAddress->u.h323_ID.nchars+1)*sizeof(char)+1);
if(!newAlias->value)
{
OOTRACEERR3("ERROR:Memory - ooH323RetrieveAliases - "
- "newAlias->value(h323id) (%s, %s)\n", call->callType,
+ "newAlias->value(h323id) (%s, %s)\n", call->callType,
call->callToken);
- memFreePtr(call->pctxt, newAlias);
+ memFreePtr(call->pctxt, newAlias);
return OO_FAILED;
}
@@ -2266,7 +2266,7 @@ int ooH323RetrieveAliases
}
}
newAlias->value[k] = '\0';
- break;
+ break;
case T_H225AliasAddress_url_ID:
newAlias->type = T_H225AliasAddress_url_ID;
newAlias->value = (char*)memAlloc(call->pctxt,
@@ -2274,9 +2274,9 @@ int ooH323RetrieveAliases
if(!newAlias->value)
{
OOTRACEERR3("ERROR:Memory - ooH323RetrieveAliases - "
- "newAlias->value(urlid) (%s, %s)\n", call->callType,
+ "newAlias->value(urlid) (%s, %s)\n", call->callType,
call->callToken);
- memFreePtr(call->pctxt, newAlias);
+ memFreePtr(call->pctxt, newAlias);
return OO_FAILED;
}
@@ -2288,18 +2288,18 @@ int ooH323RetrieveAliases
newAlias->type = T_H225AliasAddress_transportID;
pTransportAddrss = pAliasAddress->u.transportID;
if(pTransportAddrss->t == T_H225TransportAddress_ip6Address) {
- /* hopefully ip:port value can't exceed more than 30
+ /* hopefully ip:port value can't exceed more than 30
characters */
- newAlias->value = (char*)memAlloc(call->pctxt,
+ newAlias->value = (char*)memAlloc(call->pctxt,
INET6_ADDRSTRLEN*sizeof(char)*2);
inet_ntop(AF_INET6, pTransportAddrss->u.ip6Address->ip.data, newAlias->value, INET6_ADDRSTRLEN);
sprintf(newAlias->value+strlen(newAlias->value), ":%d", pTransportAddrss->u.ip6Address->port);
} else if(pTransportAddrss->t == T_H225TransportAddress_ipAddress) {
- /* hopefully ip:port value can't exceed more than 30
+ /* hopefully ip:port value can't exceed more than 30
characters */
- newAlias->value = (char*)memAlloc(call->pctxt,
+ newAlias->value = (char*)memAlloc(call->pctxt,
30*sizeof(char));
- sprintf(newAlias->value, "%d.%d.%d.%d:%d",
+ sprintf(newAlias->value, "%d.%d.%d.%d:%d",
pTransportAddrss->u.ipAddress->ip.data[0],
pTransportAddrss->u.ipAddress->ip.data[1],
pTransportAddrss->u.ipAddress->ip.data[2],
@@ -2313,14 +2313,14 @@ int ooH323RetrieveAliases
break;
case T_H225AliasAddress_email_ID:
newAlias->type = T_H225AliasAddress_email_ID;
- newAlias->value = (char*)memAlloc(call->pctxt,
+ newAlias->value = (char*)memAlloc(call->pctxt,
strlen(pAliasAddress->u.email_ID)*sizeof(char)+1);
if(!newAlias->value)
{
OOTRACEERR3("ERROR:Memory - ooH323RetrieveAliases - "
- "newAlias->value(emailid) (%s, %s)\n", call->callType,
+ "newAlias->value(emailid) (%s, %s)\n", call->callType,
call->callToken);
- memFreePtr(call->pctxt, newAlias);
+ memFreePtr(call->pctxt, newAlias);
return OO_FAILED;
}
@@ -2329,7 +2329,7 @@ int ooH323RetrieveAliases
newAlias->value[strlen(pAliasAddress->u.email_ID)*sizeof(char)]='\0';
break;
default:
- OOTRACEERR3("Error:Unhandled Alias type (%s, %s)\n",
+ OOTRACEERR3("Error:Unhandled Alias type (%s, %s)\n",
call->callType, call->callToken);
memFreePtr(call->pctxt, newAlias);
continue;
@@ -2339,7 +2339,7 @@ int ooH323RetrieveAliases
*aliasList = newAlias;
newAlias = NULL;
-
+
pAliasAddress = NULL;
pNode = NULL;
}/* endof: for */
@@ -2364,7 +2364,7 @@ int ooPopulatePrefixList(OOCTXT *pctxt, OOAliases *pAliases,
switch(pAlias->type)
{
case T_H225AliasAddress_dialedDigits:
- pPrefixEntry = (H225SupportedPrefix *)memAlloc(pctxt,
+ pPrefixEntry = (H225SupportedPrefix *)memAlloc(pctxt,
sizeof(H225SupportedPrefix));
if(!pPrefixEntry) {
OOTRACEERR1("ERROR:Memory - ooPopulatePrefixList - pAliasEntry\n");
@@ -2383,12 +2383,12 @@ int ooPopulatePrefixList(OOCTXT *pctxt, OOAliases *pAliases,
bValid = TRUE;
break;
default:
- bValid = FALSE;
+ bValid = FALSE;
}
-
+
if(bValid)
dListAppend( pctxt, pPrefixList, (void*)pPrefixEntry );
-
+
pAlias = pAlias->next;
}
}
@@ -2412,7 +2412,7 @@ int ooPopulateAliasList(OOCTXT *pctxt, OOAliases *pAliases,
pAlias = pAlias->next;
continue;
}
- pAliasEntry = (H225AliasAddress*)memAlloc(pctxt,
+ pAliasEntry = (H225AliasAddress*)memAlloc(pctxt,
sizeof(H225AliasAddress));
if(!pAliasEntry)
{
@@ -2445,7 +2445,7 @@ int ooPopulateAliasList(OOCTXT *pctxt, OOAliases *pAliases,
pAliasEntry->u.h323_ID.nchars = strlen(pAlias->value);
pAliasEntry->u.h323_ID.data = (ASN116BITCHAR*)memAllocZ
(pctxt, strlen(pAlias->value)*sizeof(ASN116BITCHAR));
-
+
if(!pAliasEntry->u.h323_ID.data)
{
OOTRACEERR1("ERROR:Memory - ooPopulateAliasList - h323_id\n");
@@ -2458,12 +2458,12 @@ int ooPopulateAliasList(OOCTXT *pctxt, OOAliases *pAliases,
break;
case T_H225AliasAddress_url_ID:
pAliasEntry->t = T_H225AliasAddress_url_ID;
- pAliasEntry->u.url_ID = (ASN1IA5String)memAlloc(pctxt,
+ pAliasEntry->u.url_ID = (ASN1IA5String)memAlloc(pctxt,
strlen(pAlias->value)+1);
if(!pAliasEntry->u.url_ID)
{
OOTRACEERR1("ERROR:Memory - ooPopulateAliasList - url_id\n");
- memFreePtr(pctxt, pAliasEntry);
+ memFreePtr(pctxt, pAliasEntry);
return OO_FAILED;
}
strcpy(*(char**)&pAliasEntry->u.url_ID, pAlias->value);
@@ -2471,7 +2471,7 @@ int ooPopulateAliasList(OOCTXT *pctxt, OOAliases *pAliases,
break;
case T_H225AliasAddress_email_ID:
pAliasEntry->t = T_H225AliasAddress_email_ID;
- pAliasEntry->u.email_ID = (ASN1IA5String)memAlloc(pctxt,
+ pAliasEntry->u.email_ID = (ASN1IA5String)memAlloc(pctxt,
strlen(pAlias->value)+1);
if(!pAliasEntry->u.email_ID)
{
@@ -2484,14 +2484,14 @@ int ooPopulateAliasList(OOCTXT *pctxt, OOAliases *pAliases,
break;
default:
OOTRACEERR1("ERROR: Unhandled alias type\n");
- bValid = FALSE;
+ bValid = FALSE;
}
-
+
if(bValid)
dListAppend( pctxt, pAliasList, (void*)pAliasEntry );
else
memFreePtr(pctxt, pAliasEntry);
-
+
pAlias = pAlias->next;
}
}
@@ -2544,7 +2544,7 @@ OOAliases* ooH323AddAliasToList
int j=0,k=0;
OOAliases *newAlias=NULL;
H225TransportAddress *pTransportAddrss=NULL;
-
+
newAlias = (OOAliases*) memAlloc(pctxt, sizeof(OOAliases));
if(!newAlias)
{
@@ -2562,7 +2562,7 @@ OOAliases* ooH323AddAliasToList
break;
case T_H225AliasAddress_h323_ID:
newAlias->type = T_H225AliasAddress_h323_ID;
- newAlias->value = (char*)memAlloc(pctxt,
+ newAlias->value = (char*)memAlloc(pctxt,
(pAliasAddress->u.h323_ID.nchars+1)*sizeof(char)+1);
for(j=0, k=0; j<(int)pAliasAddress->u.h323_ID.nchars; j++)
@@ -2573,7 +2573,7 @@ OOAliases* ooH323AddAliasToList
}
}
newAlias->value[k] = '\0';
- break;
+ break;
case T_H225AliasAddress_url_ID:
newAlias->type = T_H225AliasAddress_url_ID;
newAlias->value = (char*)memAlloc(pctxt,
@@ -2585,18 +2585,18 @@ OOAliases* ooH323AddAliasToList
newAlias->type = T_H225AliasAddress_transportID;
pTransportAddrss = pAliasAddress->u.transportID;
if(pTransportAddrss->t == T_H225TransportAddress_ip6Address) {
- /* hopefully ip:port value can't exceed more than 30
+ /* hopefully ip:port value can't exceed more than 30
characters */
- newAlias->value = (char*)memAlloc(pctxt,
+ newAlias->value = (char*)memAlloc(pctxt,
INET6_ADDRSTRLEN*sizeof(char)*2);
inet_ntop(AF_INET6, pTransportAddrss->u.ip6Address->ip.data, newAlias->value, INET6_ADDRSTRLEN);
sprintf(newAlias->value+strlen(newAlias->value), ":%d", pTransportAddrss->u.ip6Address->port);
} else if(pTransportAddrss->t == T_H225TransportAddress_ipAddress) {
- /* hopefully ip:port value can't exceed more than 30
+ /* hopefully ip:port value can't exceed more than 30
characters */
- newAlias->value = (char*)memAlloc(pctxt,
+ newAlias->value = (char*)memAlloc(pctxt,
30*sizeof(char));
- sprintf(newAlias->value, "%d.%d.%d.%d:%d",
+ sprintf(newAlias->value, "%d.%d.%d.%d:%d",
pTransportAddrss->u.ipAddress->ip.data[0],
pTransportAddrss->u.ipAddress->ip.data[1],
pTransportAddrss->u.ipAddress->ip.data[2],
@@ -2610,7 +2610,7 @@ OOAliases* ooH323AddAliasToList
break;
case T_H225AliasAddress_email_ID:
newAlias->type = T_H225AliasAddress_email_ID;
- newAlias->value = (char*)memAlloc(pctxt,
+ newAlias->value = (char*)memAlloc(pctxt,
strlen(pAliasAddress->u.email_ID)*sizeof(char)+1);
strcpy(newAlias->value, pAliasAddress->u.email_ID);
@@ -2626,7 +2626,7 @@ OOAliases* ooH323AddAliasToList
return newAlias;
}
-int ooH323GetIpPortFromH225TransportAddress(struct OOH323CallData *call,
+int ooH323GetIpPortFromH225TransportAddress(struct OOH323CallData *call,
H225TransportAddress *h225Address, char *ip, int *port)
{
if (call->versionIP == 6) {
@@ -2646,8 +2646,8 @@ int ooH323GetIpPortFromH225TransportAddress(struct OOH323CallData *call,
call->callToken);
return OO_FAILED;
}
- sprintf(ip, "%d.%d.%d.%d",
- h225Address->u.ipAddress->ip.data[0],
+ sprintf(ip, "%d.%d.%d.%d",
+ h225Address->u.ipAddress->ip.data[0],
h225Address->u.ipAddress->ip.data[1],
h225Address->u.ipAddress->ip.data[2],
h225Address->u.ipAddress->ip.data[3]);
diff --git a/addons/ooh323c/src/ooh323.h b/addons/ooh323c/src/ooh323.h
index 96b54f5f0..3877772af 100644
--- a/addons/ooh323c/src/ooh323.h
+++ b/addons/ooh323c/src/ooh323.h
@@ -1,22 +1,22 @@
/*
* 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.
*
*****************************************************************************/
/**
- * @file ooh323.h
- * This file contains functions to support H.225 messages.
+ * @file ooh323.h
+ * This file contains functions to support H.225 messages.
*/
#ifndef _OOH323HDR_H_
#define _OOH323HDR_H_
@@ -95,7 +95,7 @@ EXTERN int ooOnReceivedFacility
*
* @return OO_OK, on success. OO_FAILED, on failure.
*/
-EXTERN int ooHandleTunneledH245Messages(struct OOH323CallData *call,
+EXTERN int ooHandleTunneledH245Messages(struct OOH323CallData *call,
H225H323_UU_PDU * pH323UUPdu);
/**
@@ -103,7 +103,7 @@ EXTERN int ooHandleTunneledH245Messages(struct OOH323CallData *call,
* @param call Handle to the call
* @param facility Pointer to the facility message.
*/
-EXTERN int ooHandleStartH245FacilityMessage(struct OOH323CallData *call,
+EXTERN int ooHandleStartH245FacilityMessage(struct OOH323CallData *call,
H225Facility_UUIE *facility);
/**
@@ -112,13 +112,13 @@ EXTERN int ooHandleStartH245FacilityMessage(struct OOH323CallData *call,
* @param call Handle to the call.Null when retrieving registered
* aliases.
* @param pAddresses Pointer to the sequence of alias addresses.
- * @param aliasList Handle to alias list to be populated with retrieved
+ * @param aliasList Handle to alias list to be populated with retrieved
* aliases.
*
* @return OO_OK, on success. OO_FAILED, on failure.
*/
EXTERN int ooH323RetrieveAliases
- (struct OOH323CallData *call, H225_SeqOfH225AliasAddress *pAddresses,
+ (struct OOH323CallData *call, H225_SeqOfH225AliasAddress *pAddresses,
OOAliases **aliasList);
/**
@@ -133,16 +133,16 @@ EXTERN int ooPopulatePrefixList(OOCTXT *pctxt, OOAliases *pAliases,
* @param pAliases Pointer to aliases to be used for populating list.
* @param pAliasList Pointer to alias list to be populated.
*
- * @return OO_OK, on success. OO_FAILED, otherwise.
+ * @return OO_OK, on success. OO_FAILED, otherwise.
*/
EXTERN int ooPopulateAliasList(OOCTXT *pctxt, OOAliases *pAliases,
- H225_SeqOfH225AliasAddress *pAliasList, int pAliasType);
+ H225_SeqOfH225AliasAddress *pAliasList, int pAliasType);
/**
* This function is used to search a particular alias in the alias list. The
* search can be on the basis of alias type or value or both.
* @param aliasList Handle to the alias list to be searched.
- * @param type Type of the alias, if search has to consider type as
+ * @param type Type of the alias, if search has to consider type as
* criterion, otherwise 0.
* @param value Value of the alias, if the search has to consider value as
* criterion, NULL otherwise.
@@ -153,7 +153,7 @@ EXTERN OOAliases* ooH323GetAliasFromList
/**
* This function is used to add a new alias to alias list.
* @param pAliasList Pointer to Alias list.
- * @param pctxt Pointer to OOCTXT structure to be used for memory
+ * @param pctxt Pointer to OOCTXT structure to be used for memory
* allocation.
* @param pAliasAddress New alias address to be added.
*
@@ -169,12 +169,12 @@ EXTERN OOAliases* ooH323AddAliasToList
* @param h225Address Pointer to H225TransportAddress structure
* @param ip Pointer to the buffer in which dotted ip address will
* be returned.
- * @param port Pointer to the integer in which port value will be
+ * @param port Pointer to the integer in which port value will be
* returned.
*
* @return OO_OK, on success; OO_FAILED, on failure.
*/
-int ooH323GetIpPortFromH225TransportAddress(struct OOH323CallData *call,
+int ooH323GetIpPortFromH225TransportAddress(struct OOH323CallData *call,
H225TransportAddress *h225Address, char *ip, int *port);
/**
* @}
@@ -184,4 +184,3 @@ int ooH323GetIpPortFromH225TransportAddress(struct OOH323CallData *call,
#endif
#endif
-
diff --git a/addons/ooh323c/src/ooh323ep.c b/addons/ooh323c/src/ooh323ep.c
index 92e6a2479..1dedecdb8 100644
--- a/addons/ooh323c/src/ooh323ep.c
+++ b/addons/ooh323c/src/ooh323ep.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.
*
*****************************************************************************/
@@ -36,7 +36,7 @@ extern DList g_TimerList;
int ooH323EpInitialize
(enum OOCallMode callMode, const char* tracefile)
{
-
+
memset(&gH323ep, 0, sizeof(ooEndPoint));
initContext(&(gH323ep.ctxt));
@@ -46,25 +46,25 @@ int ooH323EpInitialize
{
if(strlen(tracefile)>= MAXFILENAME)
{
- printf("Error:File name longer than allowed maximum %d\n",
+ printf("Error:File name longer than allowed maximum %d\n",
MAXFILENAME-1);
return OO_FAILED;
}
strcpy(gH323ep.traceFile, tracefile);
}
else{
- strcpy(gH323ep.traceFile, DEFAULT_TRACEFILE);
+ strcpy(gH323ep.traceFile, DEFAULT_TRACEFILE);
}
gH323ep.fptraceFile = fopen(gH323ep.traceFile, "a");
if(gH323ep.fptraceFile == NULL)
{
- printf("Error:Failed to open trace file %s for write.\n",
+ printf("Error:Failed to open trace file %s for write.\n",
gH323ep.traceFile);
return OO_FAILED;
}
- /* Initialize default port ranges that will be used by stack.
+ /* Initialize default port ranges that will be used by stack.
Apps can override these by explicitely setting port ranges
*/
@@ -79,12 +79,12 @@ int ooH323EpInitialize
gH323ep.rtpPorts.start = RTPPORTSSTART;
gH323ep.rtpPorts.max = RTPPORTSEND;
gH323ep.rtpPorts.current = RTPPORTSSTART;
-
+
OO_SETFLAG(gH323ep.flags, OO_M_FASTSTART);
OO_SETFLAG(gH323ep.flags, OO_M_TUNNELING);
OO_SETFLAG(gH323ep.flags, OO_M_AUTOANSWER);
OO_CLRFLAG(gH323ep.flags, OO_M_GKROUTED);
-
+
gH323ep.aliases = NULL;
gH323ep.termType = DEFAULT_TERMTYPE;
@@ -107,7 +107,7 @@ int ooH323EpInitialize
ooH323EpSetCallerID(DEFAULT_CALLERID);
-
+
gH323ep.myCaps = NULL;
gH323ep.noOfCaps = 0;
gH323ep.callList = NULL;
@@ -116,7 +116,7 @@ int ooH323EpInitialize
ast_mutex_init(&newCallLock);
ast_mutex_init(&bindPortLock);
gH323ep.dtmfmode = 0;
- gH323ep.callingPartyNumber[0]='\0';
+ gH323ep.callingPartyNumber[0]='\0';
gH323ep.callMode = callMode;
gH323ep.isGateway = FALSE;
@@ -164,7 +164,7 @@ int ooH323EpSetLocalAddress(const char* localip, int listenport)
strcpy(gH323ep.signallingIP, localip);
OOTRACEINFO2("Signalling IP address is set to %s\n", localip);
}
-
+
if(listenport)
{
gH323ep.listenPort = listenport;
@@ -332,7 +332,7 @@ int ooH323EpSetH225MsgCallbacks(OOH225MsgCallbacks h225Callbacks)
return OO_OK;
}
-
+
int ooH323EpSetH323Callbacks(OOH323CALLBACKS h323Callbacks)
{
gH323ep.h323Callbacks.onNewCallCreated = h323Callbacks.onNewCallCreated;
@@ -376,10 +376,10 @@ int ooH323EpDestroy(void)
if(gH323ep.listener)
{
ooSocketClose(*(gH323ep.listener));
- gH323ep.listener = NULL;
+ gH323ep.listener = NULL;
}
- ooGkClientDestroy();
+ ooGkClientDestroy();
if(gH323ep.fptraceFile)
{
@@ -461,7 +461,7 @@ int ooH323EpEnableH245Tunneling(void)
OO_SETFLAG(gH323ep.flags, OO_M_TUNNELING);
return OO_OK;
}
-
+
int ooH323EpDisableH245Tunneling(void)
{
OO_CLRFLAG(gH323ep.flags, OO_M_TUNNELING);
@@ -527,7 +527,7 @@ int ooH323EpSetCallingPartyNumber(const char* number)
int ret=OO_OK;
if(number)
{
- strncpy(gH323ep.callingPartyNumber, number,
+ strncpy(gH323ep.callingPartyNumber, number,
sizeof(gH323ep.callingPartyNumber)-1);
ret = ooH323EpAddAliasDialedDigits((char*)number);
return ret;
@@ -544,7 +544,7 @@ int ooH323EpSetTraceLevel(int traceLevel)
void ooH323EpPrintConfig(void)
{
OOTRACEINFO1("H.323 Endpoint Configuration is as follows:\n");
-
+
OOTRACEINFO2("\tTrace File: %s\n", gH323ep.traceFile);
if(!OO_TESTFLAG(gH323ep.flags, OO_M_FASTSTART))
@@ -575,7 +575,7 @@ void ooH323EpPrintConfig(void)
OOTRACEINFO1("\tAutoAnswer - enabled\n");
else
OOTRACEINFO1("\tAutoAnswer - disabled\n");
-
+
OOTRACEINFO2("\tTerminal Type - %d\n", gH323ep.termType);
OOTRACEINFO2("\tT35 CountryCode - %d\n", gH323ep.t35CountryCode);
@@ -585,7 +585,7 @@ void ooH323EpPrintConfig(void)
OOTRACEINFO2("\tManufacturer Code - %d\n", gH323ep.manufacturerCode);
OOTRACEINFO2("\tProductID - %s\n", gH323ep.productID);
-
+
OOTRACEINFO2("\tVersionID - %s\n", gH323ep.versionID);
OOTRACEINFO2("\tLocal signalling IP address - %s\n", gH323ep.signallingIP);
@@ -595,8 +595,8 @@ void ooH323EpPrintConfig(void)
OOTRACEINFO2("\tCallerID - %s\n", gH323ep.callerid);
- OOTRACEINFO2("\tCall Establishment Timeout - %d seconds\n",
- gH323ep.callEstablishmentTimeout);
+ OOTRACEINFO2("\tCall Establishment Timeout - %d seconds\n",
+ gH323ep.callEstablishmentTimeout);
OOTRACEINFO2("\tMasterSlaveDetermination Timeout - %d seconds\n",
gH323ep.msdTimeout);
@@ -609,7 +609,7 @@ void ooH323EpPrintConfig(void)
OOTRACEINFO2("\tSession Timeout - %d seconds\n", gH323ep.sessionTimeout);
- return;
+ return;
}
@@ -620,7 +620,7 @@ int ooH323EpAddG711Capability(int cap, int txframes, int rxframes, int dir,
cb_StopTransmitChannel stopTransmitChannel)
{
return ooCapabilityAddSimpleCapability(NULL, cap, txframes, rxframes, FALSE,
- dir, startReceiveChannel, startTransmitChannel,
+ dir, startReceiveChannel, startTransmitChannel,
stopReceiveChannel, stopTransmitChannel, FALSE);
}
@@ -631,7 +631,7 @@ int ooH323EpAddG728Capability(int cap, int txframes, int rxframes, int dir,
cb_StopTransmitChannel stopTransmitChannel)
{
return ooCapabilityAddSimpleCapability(NULL, cap, txframes, rxframes, FALSE,
- dir, startReceiveChannel, startTransmitChannel,
+ dir, startReceiveChannel, startTransmitChannel,
stopReceiveChannel, stopTransmitChannel, FALSE);
}
@@ -642,89 +642,89 @@ int ooH323EpAddG729Capability(int cap, int txframes, int rxframes, int dir,
cb_StopTransmitChannel stopTransmitChannel)
{
return ooCapabilityAddSimpleCapability(NULL, cap, txframes, rxframes, FALSE,
- dir, startReceiveChannel, startTransmitChannel,
+ dir, startReceiveChannel, startTransmitChannel,
stopReceiveChannel, stopTransmitChannel, FALSE);
}
-int ooH323EpAddG7231Capability(int cap, int txframes, int rxframes,
+int ooH323EpAddG7231Capability(int cap, int txframes, int rxframes,
OOBOOL silenceSuppression, int dir,
cb_StartReceiveChannel startReceiveChannel,
cb_StartTransmitChannel startTransmitChannel,
cb_StopReceiveChannel stopReceiveChannel,
cb_StopTransmitChannel stopTransmitChannel)
{
- return ooCapabilityAddSimpleCapability(NULL, cap, txframes, rxframes,
- silenceSuppression, dir, startReceiveChannel,
- startTransmitChannel, stopReceiveChannel,
+ return ooCapabilityAddSimpleCapability(NULL, cap, txframes, rxframes,
+ silenceSuppression, dir, startReceiveChannel,
+ startTransmitChannel, stopReceiveChannel,
stopTransmitChannel, FALSE);
}
-int ooH323EpAddG726Capability(int cap, int txframes, int rxframes,
+int ooH323EpAddG726Capability(int cap, int txframes, int rxframes,
OOBOOL silenceSuppression, int dir,
cb_StartReceiveChannel startReceiveChannel,
cb_StartTransmitChannel startTransmitChannel,
cb_StopReceiveChannel stopReceiveChannel,
cb_StopTransmitChannel stopTransmitChannel)
{
- return ooCapabilityAddSimpleCapability(NULL, cap, txframes, rxframes,
- silenceSuppression, dir, startReceiveChannel,
- startTransmitChannel, stopReceiveChannel,
+ return ooCapabilityAddSimpleCapability(NULL, cap, txframes, rxframes,
+ silenceSuppression, dir, startReceiveChannel,
+ startTransmitChannel, stopReceiveChannel,
stopTransmitChannel, FALSE);
}
-int ooH323EpAddAMRNBCapability(int cap, int txframes, int rxframes,
+int ooH323EpAddAMRNBCapability(int cap, int txframes, int rxframes,
OOBOOL silenceSuppression, int dir,
cb_StartReceiveChannel startReceiveChannel,
cb_StartTransmitChannel startTransmitChannel,
cb_StopReceiveChannel stopReceiveChannel,
cb_StopTransmitChannel stopTransmitChannel)
{
- return ooCapabilityAddSimpleCapability(NULL, cap, txframes, rxframes,
- silenceSuppression, dir, startReceiveChannel,
- startTransmitChannel, stopReceiveChannel,
+ return ooCapabilityAddSimpleCapability(NULL, cap, txframes, rxframes,
+ silenceSuppression, dir, startReceiveChannel,
+ startTransmitChannel, stopReceiveChannel,
stopTransmitChannel, FALSE);
}
-int ooH323EpAddSpeexCapability(int cap, int txframes, int rxframes,
+int ooH323EpAddSpeexCapability(int cap, int txframes, int rxframes,
OOBOOL silenceSuppression, int dir,
cb_StartReceiveChannel startReceiveChannel,
cb_StartTransmitChannel startTransmitChannel,
cb_StopReceiveChannel stopReceiveChannel,
cb_StopTransmitChannel stopTransmitChannel)
{
- return ooCapabilityAddSimpleCapability(NULL, cap, txframes, rxframes,
- silenceSuppression, dir, startReceiveChannel,
- startTransmitChannel, stopReceiveChannel,
+ return ooCapabilityAddSimpleCapability(NULL, cap, txframes, rxframes,
+ silenceSuppression, dir, startReceiveChannel,
+ startTransmitChannel, stopReceiveChannel,
stopTransmitChannel, FALSE);
}
-int ooH323EpAddGSMCapability(int cap, ASN1USINT framesPerPkt,
+int ooH323EpAddGSMCapability(int cap, ASN1USINT framesPerPkt,
OOBOOL comfortNoise, OOBOOL scrambled, int dir,
cb_StartReceiveChannel startReceiveChannel,
cb_StartTransmitChannel startTransmitChannel,
cb_StopReceiveChannel stopReceiveChannel,
cb_StopTransmitChannel stopTransmitChannel)
{
- return ooCapabilityAddGSMCapability(NULL, cap, framesPerPkt, comfortNoise,
- scrambled, dir, startReceiveChannel,
+ return ooCapabilityAddGSMCapability(NULL, cap, framesPerPkt, comfortNoise,
+ scrambled, dir, startReceiveChannel,
startTransmitChannel, stopReceiveChannel,
stopTransmitChannel, FALSE);
}
-int ooH323EpAddH263VideoCapability(int cap, unsigned sqcifMPI,
- unsigned qcifMPI, unsigned cifMPI,
- unsigned cif4MPI, unsigned cif16MPI,
- unsigned maxBitRate, int dir,
+int ooH323EpAddH263VideoCapability(int cap, unsigned sqcifMPI,
+ unsigned qcifMPI, unsigned cifMPI,
+ unsigned cif4MPI, unsigned cif16MPI,
+ unsigned maxBitRate, int dir,
cb_StartReceiveChannel startReceiveChannel,
cb_StartTransmitChannel startTransmitChannel,
cb_StopReceiveChannel stopReceiveChannel,
cb_StopTransmitChannel stopTransmitChannel)
{
- return ooCapabilityAddH263VideoCapability(NULL, sqcifMPI, qcifMPI, cifMPI,
+ return ooCapabilityAddH263VideoCapability(NULL, sqcifMPI, qcifMPI, cifMPI,
cif4MPI, cif16MPI, maxBitRate,dir,
startReceiveChannel, startTransmitChannel,
- stopReceiveChannel, stopTransmitChannel,
+ stopReceiveChannel, stopTransmitChannel,
FALSE);
}
@@ -805,7 +805,7 @@ int ooH323EpSetTCPPortRange(int base, int max)
gH323ep.tcpPorts.start = base;
if(max > 65500)
gH323ep.tcpPorts.max = 65500;
- else
+ else
gH323ep.tcpPorts.max = max;
if(gH323ep.tcpPorts.max<gH323ep.tcpPorts.start)
@@ -815,7 +815,7 @@ int ooH323EpSetTCPPortRange(int base, int max)
return OO_FAILED;
}
gH323ep.tcpPorts.current = gH323ep.tcpPorts.start;
-
+
OOTRACEINFO1("TCP port range initialize - successful\n");
return OO_OK;
}
@@ -828,18 +828,18 @@ int ooH323EpSetUDPPortRange(int base, int max)
gH323ep.udpPorts.start = base;
if(max > 65500)
gH323ep.udpPorts.max = 65500;
- else
+ else
gH323ep.udpPorts.max = max;
-
+
if(gH323ep.udpPorts.max<gH323ep.udpPorts.start)
{
OOTRACEERR1("Error: Failed to set udp ports- Max port number"
" less than Start port number\n");
return OO_FAILED;
}
-
+
gH323ep.udpPorts.current = gH323ep.udpPorts.start;
-
+
OOTRACEINFO1("UDP port range initialize - successful\n");
return OO_OK;
@@ -853,18 +853,17 @@ int ooH323EpSetRTPPortRange(int base, int max)
gH323ep.rtpPorts.start = base;
if(max > 65500)
gH323ep.rtpPorts.max = 65500;
- else
+ else
gH323ep.rtpPorts.max = max;
-
+
if(gH323ep.rtpPorts.max<gH323ep.rtpPorts.start)
{
OOTRACEERR1("Error: Failed to set rtp ports- Max port number"
" less than Start port number\n");
return OO_FAILED;
}
-
+
gH323ep.rtpPorts.current = gH323ep.rtpPorts.start;
OOTRACEINFO1("RTP port range initialize - successful\n");
return OO_OK;
}
-
diff --git a/addons/ooh323c/src/ooh323ep.h b/addons/ooh323c/src/ooh323ep.h
index 50ac29dc6..a77b9e38a 100644
--- a/addons/ooh323c/src/ooh323ep.h
+++ b/addons/ooh323c/src/ooh323ep.h
@@ -1,21 +1,21 @@
/*
* 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.
*
*****************************************************************************/
/**
- * @file ooh323ep.h
- * This file contains H323 endpoint related functions.
+ * @file ooh323ep.h
+ * This file contains H323 endpoint related functions.
*/
#ifndef OO_H323EP_H_
#define OO_H323EP_H_
@@ -53,7 +53,7 @@ extern "C" {
#endif /* EXTERN */
struct OOCapPrefs;
-/**
+/**
* @defgroup h323ep H323 Endpoint management functions
* @{
*/
@@ -67,7 +67,7 @@ struct OOCapPrefs;
-
+
/**
* This structure is used to define the port ranges to be used
* by the application.
@@ -78,19 +78,19 @@ typedef struct OOH323Ports {
int current; /*!< Current port number. */
} OOH323Ports;
-/**
+/**
* Structure to store all configuration information related to the
- * endpoint created by an application
+ * endpoint created by an application
*/
typedef struct OOH323EndPoint {
-
- /**
+
+ /**
* This context should be used for allocation of memory for
* items within the endpoint structure.
*/
OOCTXT ctxt;
- /**
+ /**
* This context should be used for allocation of memory for
* message structures.
*/
@@ -107,11 +107,11 @@ typedef struct OOH323EndPoint {
/** Range of port numbers to be used for RTP connections */
OOH323Ports rtpPorts;
-
+
ASN1UINT flags;
- int termType; /* 50 - Terminal entity with No MC,
- 60 - Gateway entity with no MC,
+ int termType; /* 50 - Terminal entity with No MC,
+ 60 - Gateway entity with no MC,
70 - Terminal Entity with MC, but no MP etc.*/
int t35CountryCode;
int t35Extension;
@@ -166,14 +166,14 @@ EXTERN int ooH323EpInitialize
(enum OOCallMode callMode, const char* tracefile);
/**
- * This function is used to represent the H.323 application endpoint as
+ * This function is used to represent the H.323 application endpoint as
* gateway, instead of an H.323 phone endpoint.
*
* @return OO_OK, on success. OO_FAILED, on failure.
*/
EXTERN int ooH323EpSetAsGateway(void);
-EXTERN void ooH323EpSetVersionInfo(int t35countrycode, int t35extensions, int manufacturer,
+EXTERN void ooH323EpSetVersionInfo(int t35countrycode, int t35extensions, int manufacturer,
char* vendor, char* version);
/**
@@ -183,7 +183,7 @@ EXTERN void ooH323EpSetVersionInfo(int t35countrycode, int t35extensions, int ma
* @param listenport Port to be used for listening for incoming calls.
*
* @return OO_OK, on success. OO_FAILED, on failure.
- */
+ */
EXTERN int ooH323EpSetLocalAddress(const char* localip, int listenport);
/**
@@ -192,7 +192,7 @@ EXTERN int ooH323EpSetLocalAddress(const char* localip, int listenport);
* @param base Starting port number for the range
* @param max Ending port number for the range.
*
- * @return OO_OK, on success. OO_FAILED, on failure.
+ * @return OO_OK, on success. OO_FAILED, on failure.
*/
EXTERN int ooH323EpSetTCPPortRange(int base, int max);
@@ -202,7 +202,7 @@ EXTERN int ooH323EpSetTCPPortRange(int base, int max);
* @param base Starting port number for the range
* @param max Ending port number for the range.
*
- * @return OO_OK, on success. OO_FAILED, on failure.
+ * @return OO_OK, on success. OO_FAILED, on failure.
*/
EXTERN int ooH323EpSetUDPPortRange(int base, int max);
@@ -212,7 +212,7 @@ EXTERN int ooH323EpSetUDPPortRange(int base, int max);
* @param base Starting port number for the range
* @param max Ending port number for the range.
*
- * @return OO_OK, on success. OO_FAILED, on failure.
+ * @return OO_OK, on success. OO_FAILED, on failure.
*/
EXTERN int ooH323EpSetRTPPortRange(int base, int max);
@@ -252,7 +252,7 @@ EXTERN int ooH323EpAddAliasURLID(const char* url);
/**
* This function is used to add an email id as an alias for the endpoint.
* @param email Email id to be set as an alias.
- *
+ *
* @return OO_OK, on success. OO_FAILED, on failure.
*/
EXTERN int ooH323EpAddAliasEmailID(const char* email);
@@ -266,7 +266,7 @@ EXTERN int ooH323EpAddAliasEmailID(const char* email);
EXTERN int ooH323EpAddAliasTransportID(const char* ipaddress);
/**
- * This function is used to clear all the aliases used by the
+ * This function is used to clear all the aliases used by the
* H323 endpoint.
*
* @return OO_OK, on success. OO_FAILED, on failure.
@@ -284,9 +284,9 @@ EXTERN int ooH323EpSetH225MsgCallbacks(OOH225MsgCallbacks h225Callbacks);
/**
* This function is used to set high level H.323 callbacks for the endpoint.
- * Make sure all unused callbacks in the structure are set to NULL before
+ * Make sure all unused callbacks in the structure are set to NULL before
* calling this function.
- * @param h323Callbacks Callback structure containing various high level
+ * @param h323Callbacks Callback structure containing various high level
* callbacks.
* @return OO_OK, on success. OO_FAILED, on failure
*/
@@ -294,8 +294,8 @@ EXTERN int ooH323EpSetH323Callbacks(OOH323CALLBACKS h323Callbacks);
/**
- * This function is the last function to be invoked after done using the
- * stack. It closes the H323 Endpoint for an application, releasing all
+ * This function is the last function to be invoked after done using the
+ * stack. It closes the H323 Endpoint for an application, releasing all
* the associated memory.
*
* @return OO_OK on success
@@ -321,8 +321,8 @@ EXTERN int ooH323EpEnableAutoAnswer(void);
EXTERN int ooH323EpDisableAutoAnswer(void);
/**
- * This function is used to enable manual ringback. By default the stack sends
- * alerting message automatically on behalf of the endpoint application.
+ * This function is used to enable manual ringback. By default the stack sends
+ * alerting message automatically on behalf of the endpoint application.
* However, if endpoint application wants to do alerting user part first before
* sending out alerting message, it can enable this feature.
*
@@ -331,7 +331,7 @@ EXTERN int ooH323EpDisableAutoAnswer(void);
EXTERN int ooH323EpEnableManualRingback(void);
/**
- * This function is used to disable manual ringback. By default the
+ * This function is used to disable manual ringback. By default the
* manual ringback feature is disabled, i.e, the stack sends alerting on behalf
* of the application automatically.
*
@@ -407,7 +407,7 @@ EXTERN int ooH323EpDisableGkRouted(void);
* @param productID New value for the product id.
*
* @return OO_OK, on success. OO_FAILED, on failure.
- */
+ */
EXTERN int ooH323EpSetProductID (const char * productID);
/**
@@ -429,7 +429,7 @@ EXTERN int ooH323EpSetCallerID (const char * callerID);
/**
* This function is used to set calling party number to be used for outbound
- * calls.Note, you can override it for a specific call by using
+ * calls.Note, you can override it for a specific call by using
* ooCallSetCallingPartyNumber function.
* @param number e164 number to be used as calling party number.
*
@@ -438,7 +438,7 @@ EXTERN int ooH323EpSetCallerID (const char * callerID);
EXTERN int ooH323EpSetCallingPartyNumber(const char * number);
/**
- * This function is used to print the current configuration information of
+ * This function is used to print the current configuration information of
* the H323 endpoint to log file.
*/
void ooH323EpPrintConfig(void);
@@ -447,7 +447,7 @@ void ooH323EpPrintConfig(void);
/**
* This function is used to add G728 capability to the H323 endpoint.
* @param cap Type of G728 capability to be added.
- * @param txframes Number of frames per packet for transmission.
+ * @param txframes Number of frames per packet for transmission.
* @param rxframes Number of frames per packet for reception.
* @param dir Direction of capability.OORX, OOTX, OORXANDTX
* @param startReceiveChannel Callback function to start receive channel.
@@ -455,10 +455,10 @@ void ooH323EpPrintConfig(void);
* @param stopReceiveChannel Callback function to stop receive channel.
* @param stopTransmitChannel Callback function to stop transmit channel.
*
- * @return OO_OK, on success. OO_FAILED, on failure.
+ * @return OO_OK, on success. OO_FAILED, on failure.
*/
EXTERN int ooH323EpAddG728Capability
- (int cap, int txframes, int rxframes, int dir,
+ (int cap, int txframes, int rxframes, int dir,
cb_StartReceiveChannel startReceiveChannel,
cb_StartTransmitChannel startTransmitChannel,
cb_StopReceiveChannel stopReceiveChannel,
@@ -467,7 +467,7 @@ EXTERN int ooH323EpAddG728Capability
/**
* This function is used to add G729 capability to the H323 endpoint.
* @param cap Type of G729 capability to be added.
- * @param txframes Number of frames per packet for transmission.
+ * @param txframes Number of frames per packet for transmission.
* @param rxframes Number of frames per packet for reception.
* @param dir Direction of capability.OORX, OOTX, OORXANDTX
* @param startReceiveChannel Callback function to start receive channel.
@@ -475,10 +475,10 @@ EXTERN int ooH323EpAddG728Capability
* @param stopReceiveChannel Callback function to stop receive channel.
* @param stopTransmitChannel Callback function to stop transmit channel.
*
- * @return OO_OK, on success. OO_FAILED, on failure.
+ * @return OO_OK, on success. OO_FAILED, on failure.
*/
EXTERN int ooH323EpAddG729Capability
- (int cap, int txframes, int rxframes, int dir,
+ (int cap, int txframes, int rxframes, int dir,
cb_StartReceiveChannel startReceiveChannel,
cb_StartTransmitChannel startTransmitChannel,
cb_StopReceiveChannel stopReceiveChannel,
@@ -488,7 +488,7 @@ EXTERN int ooH323EpAddG729Capability
/**
* This function is used to add G7231 capability to the H323 endpoint.
* @param cap Type of G7231 capability to be added.
- * @param txframes Number of frames per packet for transmission.
+ * @param txframes Number of frames per packet for transmission.
* @param rxframes Number of frames per packet for reception.
* @param silenceSuppression Silence Suppression support
* @param dir Direction of capability.OORX, OOTX, OORXANDTX
@@ -497,9 +497,9 @@ EXTERN int ooH323EpAddG729Capability
* @param stopReceiveChannel Callback function to stop receive channel.
* @param stopTransmitChannel Callback function to stop transmit channel.
*
- * @return OO_OK, on success. OO_FAILED, on failure.
+ * @return OO_OK, on success. OO_FAILED, on failure.
*/
-EXTERN int ooH323EpAddG7231Capability(int cap, int txframes, int rxframes,
+EXTERN int ooH323EpAddG7231Capability(int cap, int txframes, int rxframes,
OOBOOL silenceSuppression, int dir,
cb_StartReceiveChannel startReceiveChannel,
cb_StartTransmitChannel startTransmitChannel,
@@ -509,7 +509,7 @@ EXTERN int ooH323EpAddG7231Capability(int cap, int txframes, int rxframes,
/**
* This function is used to add G711 capability to the H323 endpoint.
* @param cap Type of G711 capability to be added.
- * @param txframes Number of frames per packet for transmission.
+ * @param txframes Number of frames per packet for transmission.
* @param rxframes Number of frames per packet for reception.
* @param dir Direction of capability.OORX, OOTX, OORXANDTX
* @param startReceiveChannel Callback function to start receive channel.
@@ -517,10 +517,10 @@ EXTERN int ooH323EpAddG7231Capability(int cap, int txframes, int rxframes,
* @param stopReceiveChannel Callback function to stop receive channel.
* @param stopTransmitChannel Callback function to stop transmit channel.
*
- * @return OO_OK, on success. OO_FAILED, on failure.
+ * @return OO_OK, on success. OO_FAILED, on failure.
*/
EXTERN int ooH323EpAddG711Capability
- (int cap, int txframes, int rxframes, int dir,
+ (int cap, int txframes, int rxframes, int dir,
cb_StartReceiveChannel startReceiveChannel,
cb_StartTransmitChannel startTransmitChannel,
cb_StopReceiveChannel stopReceiveChannel,
@@ -530,8 +530,8 @@ EXTERN int ooH323EpAddG711Capability
/**
* This function is used to add a new GSM capability to the endpoint.
* @param cap Type of GSM capability to be added.
- * @param framesPerPkt Number of GSM frames pre packet.
- * @param comfortNoise Comfort noise spec for the capability.
+ * @param framesPerPkt Number of GSM frames pre packet.
+ * @param comfortNoise Comfort noise spec for the capability.
* @param scrambled Scrambled enabled/disabled for the capability.
* @param dir Direction of capability.OORX, OOTX, OORXANDTX
* @param startReceiveChannel Callback function to start receive channel.
@@ -539,10 +539,10 @@ EXTERN int ooH323EpAddG711Capability
* @param stopReceiveChannel Callback function to stop receive channel.
* @param stopTransmitChannel Callback function to stop transmit channel.
*
- * @return OO_OK, on success. OO_FAILED, on failure.
+ * @return OO_OK, on success. OO_FAILED, on failure.
*/
-EXTERN int ooH323EpAddGSMCapability(int cap, ASN1USINT framesPerPkt,
- OOBOOL comfortNoise,OOBOOL scrambled,int dir,
+EXTERN int ooH323EpAddGSMCapability(int cap, ASN1USINT framesPerPkt,
+ OOBOOL comfortNoise,OOBOOL scrambled,int dir,
cb_StartReceiveChannel startReceiveChannel,
cb_StartTransmitChannel startTransmitChannel,
cb_StopReceiveChannel stopReceiveChannel,
@@ -550,18 +550,18 @@ EXTERN int ooH323EpAddGSMCapability(int cap, ASN1USINT framesPerPkt,
/**
* This function is used to add H263 video capability to the H323 endpoint.
* @param cap Capability type - OO_H263VIDEO
- * @param sqcifMPI Minimum picture interval for encoding/decoding
+ * @param sqcifMPI Minimum picture interval for encoding/decoding
* of SQCIF pictures.
- * @param qcifMPI Minimum picture interval for encoding/decoding
+ * @param qcifMPI Minimum picture interval for encoding/decoding
* of QCIF pictures.
- * @param cifMPI Minimum picture interval for encoding/decoding
+ * @param cifMPI Minimum picture interval for encoding/decoding
* of CIF pictures.
- * @param cif4MPI Minimum picture interval for encoding/decoding
+ * @param cif4MPI Minimum picture interval for encoding/decoding
* of CIF4 pictures.
- * @param cif16MPI Minimum picture interval for encoding/decoding
+ * @param cif16MPI Minimum picture interval for encoding/decoding
* of CIF16 pictures.
* @param maxBitRate Maximum bit rate in units of 100 bits/s at
- * which a transmitter can transmit video or a
+ * which a transmitter can transmit video or a
* receiver can receive video.
* @param dir Direction of capability.OORX, OOTX, OORXANDTX
* @param startReceiveChannel Callback function to start receive channel.
@@ -569,12 +569,12 @@ EXTERN int ooH323EpAddGSMCapability(int cap, ASN1USINT framesPerPkt,
* @param stopReceiveChannel Callback function to stop receive channel.
* @param stopTransmitChannel Callback function to stop transmit channel.
*
- * @return OO_OK, on success. OO_FAILED, on failure.
+ * @return OO_OK, on success. OO_FAILED, on failure.
*/
-EXTERN int ooH323EpAddH263VideoCapability(int cap, unsigned sqcifMPI,
- unsigned qcifMPI, unsigned cifMPI,
- unsigned cif4MPI, unsigned cif16MPI,
- unsigned maxBitRate, int dir,
+EXTERN int ooH323EpAddH263VideoCapability(int cap, unsigned sqcifMPI,
+ unsigned qcifMPI, unsigned cifMPI,
+ unsigned cif4MPI, unsigned cif16MPI,
+ unsigned maxBitRate, int dir,
cb_StartReceiveChannel startReceiveChannel,
cb_StartTransmitChannel startTransmitChannel,
cb_StopReceiveChannel stopReceiveChannel,
diff --git a/addons/ooh323c/src/oohdr.h b/addons/ooh323c/src/oohdr.h
index b7f9590c9..36d319d94 100644
--- a/addons/ooh323c/src/oohdr.h
+++ b/addons/ooh323c/src/oohdr.h
@@ -1,15 +1,15 @@
/*
* Copyright (C) 1997-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.
*
*****************************************************************************/
diff --git a/addons/ooh323c/src/ooper.h b/addons/ooh323c/src/ooper.h
index 6a1174a2b..0c6895dca 100644
--- a/addons/ooh323c/src/ooper.h
+++ b/addons/ooh323c/src/ooper.h
@@ -1,15 +1,15 @@
/*
* Copyright (C) 1997-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,4 +19,3 @@
#endif
-
diff --git a/addons/ooh323c/src/ooports.c b/addons/ooh323c/src/ooports.c
index 6ff9b4c0b..7b0a85033 100644
--- a/addons/ooh323c/src/ooports.c
+++ b/addons/ooh323c/src/ooports.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.
*
*****************************************************************************/
@@ -90,7 +90,7 @@ int ooBindPort (OOH323PortType type, OOSOCKET socket, char *ip)
}
}
-#ifdef _WIN32
+#ifdef _WIN32
int ooBindOSAllocatedPort(OOSOCKET socket, char *ip)
{
OOIPADDR ipAddrs;
@@ -98,14 +98,14 @@ int ooBindOSAllocatedPort(OOSOCKET socket, char *ip)
struct sockaddr_in name;
size = sizeof(struct sockaddr_in);
ret= ooSocketStrToAddr (ip, &ipAddrs);
- if((ret=ooSocketBind(socket, ipAddrs,
+ if((ret=ooSocketBind(socket, ipAddrs,
0))==ASN_OK)
{
ret = ooSocketGetSockName(socket, &name, &size);
if(ret == ASN_OK)
{
return name.sin_port;
-
+
}
}
diff --git a/addons/ooh323c/src/ooports.h b/addons/ooh323c/src/ooports.h
index 0b53e8af8..56770013e 100644
--- a/addons/ooh323c/src/ooports.h
+++ b/addons/ooh323c/src/ooports.h
@@ -1,22 +1,22 @@
/*
* 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.
*
*****************************************************************************/
/**
- * @file ooports.h
- * This file contains functions to manage ports used by the stack.
+ * @file ooports.h
+ * This file contains functions to manage ports used by the stack.
*/
#ifndef _OOPORTS_H_
@@ -43,7 +43,7 @@ extern "C" {
/**
* Get the next port of type TCP/UDP/RTP from the corresponding range.
- * When max value for the range is reached, it starts again from the
+ * When max value for the range is reached, it starts again from the
* first port number of the range.
*
* @param ep Reference to the H323 Endpoint structure.
@@ -69,7 +69,7 @@ EXTERN int ooGetNextPort (OOH323PortType type);
EXTERN int ooBindPort (OOH323PortType type, OOSOCKET socket, char *ip);
/**
- * This function is supported for windows version only.
+ * This function is supported for windows version only.
* 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.
@@ -80,7 +80,7 @@ EXTERN int ooBindPort (OOH323PortType type, OOSOCKET socket, char *ip);
* socket is bound and in case of failure just returns
* a negative value.
*/
-#ifdef _WIN32
+#ifdef _WIN32
EXTERN int ooBindOSAllocatedPort(OOSOCKET socket, char *ip);
#endif
diff --git a/addons/ooh323c/src/ooq931.c b/addons/ooh323c/src/ooq931.c
index 4d6d99368..1ca361c2c 100644
--- a/addons/ooh323c/src/ooq931.c
+++ b/addons/ooh323c/src/ooq931.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.
*
*****************************************************************************/
@@ -49,7 +49,7 @@ static ASN1OBJID gProtocolID = {
6, { 0, 0, 8, 2250, 0, 4 }
};
-EXTERN int ooQ931Decode
+EXTERN int ooQ931Decode
(OOH323CallData *call, Q931Message* msg, int length, ASN1OCTET *data, int docallbacks)
{
int offset, x;
@@ -77,13 +77,13 @@ EXTERN int ooQ931Decode
if(msg->fromDestination)
OOTRACEDBGB1(" from = destination\n");
else
- OOTRACEDBGB1(" from = originator\n");
+ OOTRACEDBGB1(" from = originator\n");
msg->messageType = data[4];
OOTRACEDBGB2(" messageType = %x\n", msg->messageType);
-
+
/* Have preamble, start getting the informationElements into buffers */
offset = 5;
while (offset < length) {
@@ -101,10 +101,10 @@ EXTERN int ooQ931Decode
the Q931 documentation claims the length is a single byte,
unfortunately all H.323 based apps have a 16 bit length here, so
we allow for said longer length. There is presumably an addendum
- to Q931 which describes this, and provides a means to
- discriminate between the old 1 byte and the new 2 byte systems.
+ to Q931 which describes this, and provides a means to
+ discriminate between the old 1 byte and the new 2 byte systems.
However, at present we assume it is always 2 bytes until we find
- something that breaks it.
+ something that breaks it.
*/
len <<= 8;
len |= data[offset++];
@@ -125,27 +125,27 @@ EXTERN int ooQ931Decode
}
else alen = len;
- ie = (Q931InformationElement*)
+ ie = (Q931InformationElement*)
memAlloc (pctxt, sizeof(*ie) - sizeof(ie->data) + alen);
if(!ie)
{
- OOTRACEERR3("Error:Memory - ooQ931Decode - ie(%s, %s)\n",
+ OOTRACEERR3("Error:Memory - ooQ931Decode - ie(%s, %s)\n",
call->callType, call->callToken);
return OO_FAILED;
}
ie->discriminator = discriminator;
ie->offset = ieOff;
ie->length = len;
- if (alen != 0)
+ if (alen != 0)
memcpy(ie->data, data + offset, alen);
offset += len;
}
else {
- ie = (Q931InformationElement*) memAlloc (pctxt,
+ ie = (Q931InformationElement*) memAlloc (pctxt,
sizeof(*ie));
if(!ie)
{
- OOTRACEERR3("Error:Memory - ooQ931Decode - ie(%s, %s)\n",
+ OOTRACEERR3("Error:Memory - ooQ931Decode - ie(%s, %s)\n",
call->callType, call->callToken);
return OO_FAILED;
}
@@ -188,14 +188,14 @@ EXTERN int ooQ931Decode
gH323ep.h323Callbacks.onReceivedDTMF(call, (char *)ie->data);
}
}
- /* Extract calling party number TODO:Give respect to presentation and
+ /* Extract calling party number TODO:Give respect to presentation and
screening indicators ;-) */
if(ie->discriminator == Q931CallingPartyNumberIE)
{
OOTRACEDBGB1(" CallingPartyNumber IE = {\n");
if(ie->length < OO_MAX_NUMBER_LENGTH)
{
- int numoffset=1;
+ int numoffset=1;
if(!(0x80 & ie->data[0])) numoffset = 2;
memcpy(number, ie->data+numoffset,ie->length-numoffset);
number[ie->length-numoffset]='\0';
@@ -204,7 +204,7 @@ EXTERN int ooQ931Decode
ooCallSetCallingPartyNumber(call, number);
}
else{
- OOTRACEERR3("Error:Calling party number too long. (%s, %s)\n",
+ OOTRACEERR3("Error:Calling party number too long. (%s, %s)\n",
call->callType, call->callToken);
}
OOTRACEDBGB1(" }\n");
@@ -223,7 +223,7 @@ EXTERN int ooQ931Decode
ooCallSetCalledPartyNumber(call, number);
}
else{
- OOTRACEERR3("Error:Calling party number too long. (%s, %s)\n",
+ OOTRACEERR3("Error:Calling party number too long. (%s, %s)\n",
call->callType, call->callToken);
}
OOTRACEDBGB1(" }\n");
@@ -252,8 +252,8 @@ EXTERN int ooQ931Decode
if (rv != ASN_OK)
return rv;
}
-
- /*cisco router sends Q931Notify without UU ie,
+
+ /*cisco router sends Q931Notify without UU ie,
we just ignore notify message as of now as handling is optional for
end point*/
if(msg->messageType != Q931NotifyMsg && msg->messageType != Q931StatusMsg)
@@ -261,7 +261,7 @@ EXTERN int ooQ931Decode
return rv;
}
-EXTERN Q931InformationElement* ooQ931GetIE (const Q931Message* q931msg,
+EXTERN Q931InformationElement* ooQ931GetIE (const Q931Message* q931msg,
int ieCode)
{
DListNode* curNode;
@@ -373,20 +373,20 @@ EXTERN void ooQ931Print (const Q931Message* q931msg) {
printf("Q.931 Message:\n");
printf(" protocolDiscriminator: %u\n", q931msg->protocolDiscriminator);
printf(" callReference: %u\n", q931msg->callReference);
- printf(" from: %s\n", (q931msg->fromDestination ?
+ printf(" from: %s\n", (q931msg->fromDestination ?
"destination" : "originator"));
- printf(" messageType: %s (0x%X)\n\n",
- ooQ931GetMessageTypeName(q931msg->messageType, buf),
+ printf(" messageType: %s (0x%X)\n\n",
+ ooQ931GetMessageTypeName(q931msg->messageType, buf),
q931msg->messageType);
for(i = 0, curNode = q931msg->ies.head; i < q931msg->ies.count; i++) {
Q931InformationElement *ie = (Q931InformationElement*) curNode->data;
int length = (ie->length >= 0) ? ie->length : -ie->length;
printf(" IE[%u] (offset 0x%X):\n", i, (unsigned)ie->offset);
- printf(" discriminator: %s (0x%X)\n",
+ printf(" discriminator: %s (0x%X)\n",
ooQ931GetIEName(ie->discriminator, buf), (unsigned)ie->discriminator);
printf(" data length: %i\n", length);
-
+
curNode = curNode->next;
printf("\n");
}
@@ -395,9 +395,9 @@ EXTERN void ooQ931Print (const Q931Message* q931msg) {
int ooCreateQ931Message(OOCTXT* pctxt, Q931Message **q931msg, int msgType)
{
/* OOCTXT *pctxt = &gH323ep.msgctxt; */
-
+
*q931msg = (Q931Message*)memAllocZ(pctxt, sizeof(Q931Message));
-
+
if(!*q931msg)
{
OOTRACEERR1("Error:Memory - ooCreateQ931Message - q931msg\n");
@@ -483,7 +483,7 @@ int ooGenerateCallIdentifier(H225CallIdentifier *callid)
ASN1INT64 timestamp;
int i=0;
#ifdef _WIN32
-
+
SYSTEMTIME systemTime;
GetLocalTime(&systemTime);
SystemTimeToFileTime(&systemTime, (LPFILETIME)&timestamp);
@@ -534,7 +534,7 @@ int ooEncodeUUIE(OOCTXT* pctxt, Q931Message *q931msg)
OOTRACEERR1("ERROR: Invalid Q931 message in add user-user IE\n");
return OO_FAILED;
}
-
+
if(!q931msg->userInfo)
{
OOTRACEERR1("ERROR: No User-User IE to encode\n");
@@ -542,8 +542,8 @@ int ooEncodeUUIE(OOCTXT* pctxt, Q931Message *q931msg)
}
setPERBuffer(pctxt, msgbuf, sizeof(msgbuf), aligned);
-
- if(asn1PE_H225H323_UserInformation (pctxt,
+
+ if(asn1PE_H225H323_UserInformation (pctxt,
q931msg->userInfo)==ASN_OK)
{
OOTRACEDBGC1("UserInfo encoding - successful\n");
@@ -565,11 +565,11 @@ int ooEncodeUUIE(OOCTXT* pctxt, Q931Message *q931msg)
ie->discriminator = Q931UserUserIE;
ie->length = len;
memcpy(ie->data, msgptr, len);
- /* Add the user to user IE NOTE: ALL IEs SHOULD BE IN ASCENDING ORDER OF
- THEIR DISCRIMINATOR AS PER SPEC.
+ /* Add the user to user IE NOTE: ALL IEs SHOULD BE IN ASCENDING ORDER OF
+ THEIR DISCRIMINATOR AS PER SPEC.
*/
dListInit (&(q931msg->ies));
- if((dListAppend (pctxt,
+ if((dListAppend (pctxt,
&(q931msg->ies), ie)) == NULL)
{
OOTRACEERR1("Error: Failed to add UUIE in outgoing message\n");
@@ -592,10 +592,10 @@ int ooDecodeUUIE(OOCTXT* pctxt, Q931Message *q931Msg)
OOTRACEERR1("Error: ooDecodeUUIE failed - NULL q931 message\n");
return OO_FAILED;
}
-
+
/* Search for UserUser IE */
- for(i = 0, curNode = q931Msg->ies.head; i < q931Msg->ies.count;
- i++, curNode = curNode->next)
+ for(i = 0, curNode = q931Msg->ies.head; i < q931Msg->ies.count;
+ i++, curNode = curNode->next)
{
ie = (Q931InformationElement*) curNode->data;
if(ie && ie->discriminator == Q931UserUserIE)
@@ -606,7 +606,7 @@ int ooDecodeUUIE(OOCTXT* pctxt, Q931Message *q931Msg)
OOTRACEERR1("No UserUser IE found in ooDecodeUUIE\n");
return OO_FAILED;
}
-
+
/* Decode user-user ie */
q931Msg->userInfo = (H225H323_UserInformation *) memAlloc(pctxt,
sizeof(H225H323_UserInformation));
@@ -630,7 +630,7 @@ int ooDecodeUUIE(OOCTXT* pctxt, Q931Message *q931Msg)
}
#ifndef _COMPACT
-static void ooQ931PrintMessage
+static void ooQ931PrintMessage
(OOH323CallData* call, ASN1OCTET *msgbuf, ASN1UINT msglen)
{
@@ -649,7 +649,7 @@ static void ooQ931PrintMessage
ret = ooQ931Decode (call, &q931Msg, msglen, msgbuf, 0);
if(ret != OO_OK)
{
- OOTRACEERR3("Error:Failed decoding Q931 message. (%s, %s)\n",
+ OOTRACEERR3("Error:Failed decoding Q931 message. (%s, %s)\n",
call->callType, call->callToken);
}
finishPrint();
@@ -660,7 +660,7 @@ static void ooQ931PrintMessage
-int ooEncodeH225Message(OOH323CallData *call, Q931Message *pq931Msg,
+int ooEncodeH225Message(OOH323CallData *call, Q931Message *pq931Msg,
char *msgbuf, int size)
{
int len=0, i=0, j=0, ieLen=0;
@@ -683,7 +683,7 @@ int ooEncodeH225Message(OOH323CallData *call, Q931Message *pq931Msg,
else if(pq931Msg->messageType == Q931CallProceedingMsg){
msgbuf[i++] = OOCallProceeding;
}
- else if(pq931Msg->messageType == Q931AlertingMsg ||
+ else if(pq931Msg->messageType == Q931AlertingMsg ||
pq931Msg->messageType == Q931ProgressMsg){
msgbuf[i++] = OOAlert;
}
@@ -712,17 +712,17 @@ int ooEncodeH225Message(OOH323CallData *call, Q931Message *pq931Msg,
stat = ooEncodeUUIE(call->msgctxt, pq931Msg);
if(stat != OO_OK)
{
- OOTRACEERR3("Error:Failed to encode uuie. (%s, %s)\n", call->callType,
+ OOTRACEERR3("Error:Failed to encode uuie. (%s, %s)\n", call->callType,
call->callToken);
return OO_FAILED;
}
-
+
msgbuf[i++] = 3; /* TPKT version */
msgbuf[i++] = 0; /* TPKT resevred */
/* 1st octet of length, will be populated once len is determined */
- msgbuf[i++] = 0;
+ msgbuf[i++] = 0;
/* 2nd octet of length, will be populated once len is determined */
- msgbuf[i++] = 0;
+ msgbuf[i++] = 0;
/* Q931 protocol discriminator */
msgbuf[i++] = pq931Msg->protocolDiscriminator;
msgbuf[i++] = 2; /* length of call ref is two octets */
@@ -732,22 +732,22 @@ int ooEncodeH225Message(OOH323CallData *call, Q931Message *pq931Msg,
else
i++; /* fromOriginator*/
-
+
msgbuf[i++] = pq931Msg->callReference; /* populate 2nd octet */
msgbuf[i++] = pq931Msg->messageType; /* type of q931 message */
/* Note: the order in which ies are added is important. It is in the
- ascending order of ie codes.
+ ascending order of ie codes.
*/
/* Add bearer IE */
if(pq931Msg->bearerCapabilityIE)
- {
+ {
msgbuf[i++] = Q931BearerCapabilityIE; /* ie discriminator */
msgbuf[i++] = pq931Msg->bearerCapabilityIE->length;
- memcpy(msgbuf+i, pq931Msg->bearerCapabilityIE->data,
+ memcpy(msgbuf+i, pq931Msg->bearerCapabilityIE->data,
pq931Msg->bearerCapabilityIE->length);
i += pq931Msg->bearerCapabilityIE->length;
- }
+ }
/* Add cause IE */
if(pq931Msg->causeIE)
@@ -756,8 +756,8 @@ int ooEncodeH225Message(OOH323CallData *call, Q931Message *pq931Msg,
msgbuf[i++] = pq931Msg->causeIE->length;
memcpy(msgbuf+i, pq931Msg->causeIE->data, pq931Msg->causeIE->length);
i += pq931Msg->causeIE->length;
- }
-
+ }
+
/* Add progress indicator IE */
if(pq931Msg->messageType == Q931AlertingMsg || pq931Msg->messageType == Q931ProgressMsg)
{
@@ -797,7 +797,7 @@ int ooEncodeH225Message(OOH323CallData *call, Q931Message *pq931Msg,
pq931Msg->calledPartyNumberIE->length);
i += pq931Msg->calledPartyNumberIE->length;
}
-
+
/* Add keypad ie */
if(pq931Msg->keypadIE)
{
@@ -814,19 +814,19 @@ int ooEncodeH225Message(OOH323CallData *call, Q931Message *pq931Msg,
i += pq931Msg->callstateIE->length;
}
- /* Note: Have to fix this, though it works. Need to get rid of ie list.
+ /* Note: Have to fix this, though it works. Need to get rid of ie list.
Right now we only put UUIE in ie list. Can be easily removed.
*/
- for(j = 0, curNode = pq931Msg->ies.head; j < (int)pq931Msg->ies.count; j++)
+ for(j = 0, curNode = pq931Msg->ies.head; j < (int)pq931Msg->ies.count; j++)
{
Q931InformationElement *ie = (Q931InformationElement*) curNode->data;
-
+
ieLen = ie->length;
/* Add the ie discriminator in message buffer */
- msgbuf[i++] = ie->discriminator;
-
+ msgbuf[i++] = ie->discriminator;
+
/* For user-user IE, we have to add protocol discriminator */
if (ie->discriminator == Q931UserUserIE)
{
@@ -838,7 +838,7 @@ int ooEncodeH225Message(OOH323CallData *call, Q931Message *pq931Msg,
memcpy((msgbuf + i), ie->data, ieLen);
i += ieLen;
-
+
}
else
{
@@ -847,13 +847,13 @@ int ooEncodeH225Message(OOH323CallData *call, Q931Message *pq931Msg,
}
}
// len = i+1-4; /* complete message length */
-
+
/* Tpkt length octets populated with total length of the message */
if(msgbuf[0] != OOFacility)
{
len = i-1;
- msgbuf[3] = (len >> 8);
+ msgbuf[3] = (len >> 8);
msgbuf[4] = len; /* including tpkt header */
}
else{
@@ -861,7 +861,7 @@ int ooEncodeH225Message(OOH323CallData *call, Q931Message *pq931Msg,
msgbuf[6] = (len >> 8);
msgbuf[7] = len;
}
-
+
#ifndef _COMPACT
if(msgbuf[0] != OOFacility)
ooQ931PrintMessage (call, (unsigned char *)msgbuf+5, len-4);
@@ -977,18 +977,18 @@ int ooHandleFastStartChannels(OOH323CallData *pCall)
}
-int ooSetFastStartResponse(OOH323CallData *pCall, Q931Message *pQ931msg,
+int ooSetFastStartResponse(OOH323CallData *pCall, Q931Message *pQ931msg,
ASN1UINT *fsCount, ASN1DynOctStr **fsElem)
{
/* OOCTXT *pctxt = &gH323ep.msgctxt; */
- OOCTXT *pctxt = pCall->msgctxt;
+ OOCTXT *pctxt = pCall->msgctxt;
int ret = 0, i=0, j=0, remoteMediaPort=0, remoteMediaControlPort = 0, dir=0;
char remoteMediaIP[2+8*4+7], remoteMediaControlIP[2+8*4+7];
DListNode *pNode = NULL;
H245OpenLogicalChannel *olc = NULL, printOlc;
ooH323EpCapability *epCap = NULL;
ASN1DynOctStr *pFS=NULL;
- H245H2250LogicalChannelParameters *h2250lcp = NULL;
+ H245H2250LogicalChannelParameters *h2250lcp = NULL;
ooLogicalChannel* pChannel;
@@ -1005,26 +1005,26 @@ int ooSetFastStartResponse(OOH323CallData *pCall, Q931Message *pQ931msg,
(*fsElem)[k].numocts = pCall->pFastStartRes->elem[k].numocts;
pData = (ASN1OCTET*) memAlloc(
pctxt, (*fsElem)[k].numocts * sizeof(ASN1OCTET));
- memcpy(pData,
- pCall->pFastStartRes->elem[k].data,
+ memcpy(pData,
+ pCall->pFastStartRes->elem[k].data,
pCall->pFastStartRes->elem[k].numocts);
(*fsElem)[k].data = pData;
}
return ASN_OK;
}
-
-
+
+
/* If fast start supported and remote endpoint has sent faststart element */
- if(OO_TESTFLAG(pCall->flags, OO_M_FASTSTART) &&
+ if(OO_TESTFLAG(pCall->flags, OO_M_FASTSTART) &&
pCall->remoteFastStartOLCs.count>0)
{
- pFS = (ASN1DynOctStr*)memAlloc(pctxt,
+ pFS = (ASN1DynOctStr*)memAlloc(pctxt,
pCall->remoteFastStartOLCs.count*sizeof(ASN1DynOctStr));
if(!pFS)
{
- OOTRACEERR3("Error:Memory - ooSetFastStartResponse - pFS (%s, %s)\n",
- pCall->callType, pCall->callToken);
+ OOTRACEERR3("Error:Memory - ooSetFastStartResponse - pFS (%s, %s)\n",
+ pCall->callType, pCall->callToken);
return OO_FAILED;
}
memset(pFS, 0, pCall->remoteFastStartOLCs.count*sizeof(ASN1DynOctStr));
@@ -1037,7 +1037,7 @@ int ooSetFastStartResponse(OOH323CallData *pCall, Q931Message *pQ931msg,
olc = (H245OpenLogicalChannel*)pNode->data;
/* Don't support both direction channel */
- if(olc->forwardLogicalChannelParameters.dataType.t !=
+ if(olc->forwardLogicalChannelParameters.dataType.t !=
T_H245DataType_nullData &&
olc->m.reverseLogicalChannelParametersPresent)
{
@@ -1047,18 +1047,18 @@ int ooSetFastStartResponse(OOH323CallData *pCall, Q931Message *pQ931msg,
}
/* Check forward logic channel */
- if(olc->forwardLogicalChannelParameters.dataType.t !=
+ if(olc->forwardLogicalChannelParameters.dataType.t !=
T_H245DataType_nullData)
{
/* Forward Channel - remote transmits - local receives */
- OOTRACEDBGC4("Processing received forward olc %d (%s, %s)\n",
- olc->forwardLogicalChannelNumber, pCall->callType,
+ OOTRACEDBGC4("Processing received forward olc %d (%s, %s)\n",
+ olc->forwardLogicalChannelNumber, pCall->callType,
pCall->callToken);
dir = OORX;
- epCap = ooIsDataTypeSupported(pCall,
+ epCap = ooIsDataTypeSupported(pCall,
&olc->forwardLogicalChannelParameters.dataType,
OORX);
-
+
if(!epCap) { continue; } /* Not Supported Channel */
OOTRACEINFO1("Receive Channel data type supported\n");
@@ -1066,8 +1066,8 @@ int ooSetFastStartResponse(OOH323CallData *pCall, Q931Message *pQ931msg,
T_H245OpenLogicalChannel_forwardLogicalChannelParameters_multiplexParameters_h2250LogicalChannelParameters)
{
OOTRACEERR4("ERROR:Unknown multiplex parameter type for "
- "channel %d (%s, %s)\n",
- olc->forwardLogicalChannelNumber,
+ "channel %d (%s, %s)\n",
+ olc->forwardLogicalChannelNumber,
pCall->callType, pCall->callToken);
memFreePtr(pCall->pctxt, epCap);
epCap = NULL;
@@ -1080,7 +1080,7 @@ int ooSetFastStartResponse(OOH323CallData *pCall, Q931Message *pQ931msg,
{
OOTRACEINFO4("Receive channel with sessionID %d already "
- "established.(%s, %s)\n", olc->forwardLogicalChannelParameters.multiplexParameters.u.h2250LogicalChannelParameters->sessionID,
+ "established.(%s, %s)\n", olc->forwardLogicalChannelParameters.multiplexParameters.u.h2250LogicalChannelParameters->sessionID,
pCall->callType, pCall->callToken);
memFreePtr(pCall->pctxt, epCap);
epCap = NULL;
@@ -1090,8 +1090,8 @@ int ooSetFastStartResponse(OOH323CallData *pCall, Q931Message *pQ931msg,
/* Extract mediaControlChannel info, if supplied */
if(h2250lcp->m.mediaControlChannelPresent)
{
- if(OO_OK != ooGetIpPortFromH245TransportAddress(pCall,
- &h2250lcp->mediaControlChannel,
+ if(OO_OK != ooGetIpPortFromH245TransportAddress(pCall,
+ &h2250lcp->mediaControlChannel,
remoteMediaControlIP, &remoteMediaControlPort))
{
OOTRACEERR3("Error: Invalid media control channel address "
@@ -1106,11 +1106,11 @@ int ooSetFastStartResponse(OOH323CallData *pCall, Q931Message *pQ931msg,
else if(olc->m.reverseLogicalChannelParametersPresent)
{
/* Reverse channel - remote receives - local transmits */
- OOTRACEDBGC4("Processing received reverse olc %d (%s, %s)\n",
- olc->forwardLogicalChannelNumber, pCall->callType,
+ OOTRACEDBGC4("Processing received reverse olc %d (%s, %s)\n",
+ olc->forwardLogicalChannelNumber, pCall->callType,
pCall->callToken);
dir = OOTX;
- epCap = ooIsDataTypeSupported(pCall,
+ epCap = ooIsDataTypeSupported(pCall,
&olc->reverseLogicalChannelParameters.dataType,
OOTX);
@@ -1118,12 +1118,12 @@ int ooSetFastStartResponse(OOH323CallData *pCall, Q931Message *pQ931msg,
OOTRACEINFO1("Transmit Channel data type supported\n");
- if(olc->reverseLogicalChannelParameters.multiplexParameters.t !=
+ if(olc->reverseLogicalChannelParameters.multiplexParameters.t !=
T_H245OpenLogicalChannel_reverseLogicalChannelParameters_multiplexParameters_h2250LogicalChannelParameters)
{
OOTRACEERR4("ERROR:Unknown multiplex parameter type for "
- "channel %d (%s, %s)\n",
- olc->forwardLogicalChannelNumber,
+ "channel %d (%s, %s)\n",
+ olc->forwardLogicalChannelNumber,
pCall->callType, pCall->callToken);
memFreePtr(pCall->pctxt, epCap);
epCap = NULL;
@@ -1141,7 +1141,7 @@ int ooSetFastStartResponse(OOH323CallData *pCall, Q931Message *pQ931msg,
epCap = NULL;
continue;
}
-
+
/* Extract the remote media endpoint address */
h2250lcp = olc->reverseLogicalChannelParameters.multiplexParameters.u.h2250LogicalChannelParameters;
if(!h2250lcp)
@@ -1153,7 +1153,7 @@ int ooSetFastStartResponse(OOH323CallData *pCall, Q931Message *pQ931msg,
epCap = NULL;
return OO_FAILED;
}
-
+
/* Reverse Channel info will be always present, crash proof */
if(!h2250lcp->m.mediaChannelPresent)
{
@@ -1166,8 +1166,8 @@ int ooSetFastStartResponse(OOH323CallData *pCall, Q931Message *pQ931msg,
}
/* Get IP, PORT of reverse channel */
- if(OO_OK != ooGetIpPortFromH245TransportAddress(pCall,
- &h2250lcp->mediaChannel,
+ if(OO_OK != ooGetIpPortFromH245TransportAddress(pCall,
+ &h2250lcp->mediaChannel,
remoteMediaIP, &remoteMediaPort))
{
OOTRACEERR3("Error: Invalid media channel address "
@@ -1180,8 +1180,8 @@ int ooSetFastStartResponse(OOH323CallData *pCall, Q931Message *pQ931msg,
/* Extract mediaControlChannel info, if supplied */
if(h2250lcp->m.mediaControlChannelPresent)
{
- if(OO_OK != ooGetIpPortFromH245TransportAddress(pCall,
- &h2250lcp->mediaControlChannel,
+ if(OO_OK != ooGetIpPortFromH245TransportAddress(pCall,
+ &h2250lcp->mediaControlChannel,
remoteMediaControlIP, &remoteMediaControlPort))
{
OOTRACEERR3("Error: Invalid media control channel address "
@@ -1194,7 +1194,7 @@ int ooSetFastStartResponse(OOH323CallData *pCall, Q931Message *pQ931msg,
}
if(dir & OOTX)
- {
+ {
/* According to the spec if we are accepting olc for transmission
from called endpoint to calling endpoint, called endpoint should
insert a unqiue forwardLogicalChannelNumber into olc
@@ -1204,28 +1204,28 @@ int ooSetFastStartResponse(OOH323CallData *pCall, Q931Message *pQ931msg,
pCall->logicalChanNoCur = pCall->logicalChanNoBase;
}
-
+
ooBuildFastStartOLC(pCall, olc, epCap, pctxt, dir);
-
+
pChannel = ooFindLogicalChannelByLogicalChannelNo
(pCall, olc->forwardLogicalChannelNumber);
-
+
/* start receive and tramsmit channel listening */
if(dir & OORX)
{
strcpy(pChannel->remoteIP, remoteMediaControlIP);
pChannel->remoteMediaControlPort = remoteMediaControlPort;
if(epCap->startReceiveChannel)
- {
- epCap->startReceiveChannel(pCall, pChannel);
- OOTRACEINFO4("Receive channel of type %s started (%s, %s)\n",
+ {
+ epCap->startReceiveChannel(pCall, pChannel);
+ OOTRACEINFO4("Receive channel of type %s started (%s, %s)\n",
(epCap->capType == OO_CAP_TYPE_AUDIO)?"audio":"video",
pCall->callType, pCall->callToken);
}
else{
OOTRACEERR4("ERROR:No callback registered to start receive %s"
- " channel (%s, %s)\n",
- (epCap->capType == OO_CAP_TYPE_AUDIO)?"audio":"video",
+ " channel (%s, %s)\n",
+ (epCap->capType == OO_CAP_TYPE_AUDIO)?"audio":"video",
pCall->callType, pCall->callToken);
return OO_FAILED;
}
@@ -1237,15 +1237,15 @@ int ooSetFastStartResponse(OOH323CallData *pCall, Q931Message *pQ931msg,
pChannel->remoteMediaControlPort = remoteMediaControlPort;
if(epCap->startTransmitChannel)
- {
- epCap->startTransmitChannel(pCall, pChannel);
+ {
+ epCap->startTransmitChannel(pCall, pChannel);
OOTRACEINFO3("Transmit channel of type audio started "
"(%s, %s)\n", pCall->callType, pCall->callToken);
/*OO_SETFLAG (pCall->flags, OO_M_AUDIO);*/
}
else{
OOTRACEERR3("ERROR:No callback registered to start transmit"
- " audio channel (%s, %s)\n", pCall->callType,
+ " audio channel (%s, %s)\n", pCall->callType,
pCall->callToken);
return OO_FAILED;
}
@@ -1276,7 +1276,7 @@ int ooSetFastStartResponse(OOH323CallData *pCall, Q931Message *pQ931msg,
ret = asn1PD_H245OpenLogicalChannel(pctxt, &(printOlc));
if(ret != ASN_OK)
{
- OOTRACEERR3("Error: Failed decoding FastStart Element (%s, %s)\n",
+ OOTRACEERR3("Error: Failed decoding FastStart Element (%s, %s)\n",
pCall->callType, pCall->callToken);
ooFreeQ931Message(pctxt, pQ931msg);
if(pCall->callState < OO_CALL_CLEAR)
@@ -1287,7 +1287,7 @@ int ooSetFastStartResponse(OOH323CallData *pCall, Q931Message *pQ931msg,
return OO_FAILED;
}
finishPrint();
- removeEventHandler(pctxt);
+ removeEventHandler(pctxt);
/* end print call */
olc = NULL;
@@ -1302,18 +1302,18 @@ int ooSetFastStartResponse(OOH323CallData *pCall, Q931Message *pQ931msg,
ASN1OCTET* pData;
//*fsPresent = TRUE;
*fsCount = j;
- *fsElem = pFS;
+ *fsElem = pFS;
/* save the fast start response for later use in ALERTING, CONNECT */
pCall->pFastStartRes = (FastStartResponse*)
memAlloc(pCall->pctxt, sizeof(FastStartResponse));
pCall->pFastStartRes->n = j;
- pCall->pFastStartRes->elem = (ASN1DynOctStr*) memAlloc(pCall->pctxt,
+ pCall->pFastStartRes->elem = (ASN1DynOctStr*) memAlloc(pCall->pctxt,
pCall->pFastStartRes->n * sizeof(ASN1DynOctStr));
for(k = 0; k < pCall->pFastStartRes->n; k ++) {
pCall->pFastStartRes->elem[k].numocts = (*fsElem)[k].numocts;
- pData = (ASN1OCTET*) memAlloc(pCall->pctxt,
+ pData = (ASN1OCTET*) memAlloc(pCall->pctxt,
pCall->pFastStartRes->elem[k].numocts * sizeof(ASN1OCTET));
memcpy(pData, (*fsElem)[k].data, (*fsElem)[k].numocts);
pCall->pFastStartRes->elem[k].data = pData;
@@ -1321,7 +1321,7 @@ int ooSetFastStartResponse(OOH323CallData *pCall, Q931Message *pQ931msg,
}
else{
OOTRACEINFO3("None of the faststart elements received in setup can be"
- " supported, rejecting faststart.(%s, %s)\n",
+ " supported, rejecting faststart.(%s, %s)\n",
pCall->callType, pCall->callToken);
//*fsPresent = FALSE;
OO_CLRFLAG(pCall->flags, OO_M_FASTSTART);
@@ -1360,23 +1360,23 @@ int ooSendTCSandMSD(OOH323CallData *call)
int ooSendCallProceeding(OOH323CallData *call)
{
- int ret;
+ int ret;
H225VendorIdentifier *vendor;
H225CallProceeding_UUIE *callProceeding;
Q931Message *q931msg=NULL;
/* OOCTXT *pctxt = &gH323ep.msgctxt; */
OOCTXT *pctxt = call->msgctxt;
- OOTRACEDBGC3("Building CallProceeding (%s, %s)\n", call->callType,
+ OOTRACEDBGC3("Building CallProceeding (%s, %s)\n", call->callType,
call->callToken);
ret = ooCreateQ931Message(pctxt, &q931msg, Q931CallProceedingMsg);
if(ret != OO_OK)
- {
+ {
OOTRACEERR1("Error: In allocating memory for - H225 Call "
"Proceeding message\n");
return OO_FAILED;
}
-
+
q931msg->callReference = call->callReference;
q931msg->userInfo = (H225H323_UserInformation*)memAlloc(pctxt,
@@ -1387,12 +1387,12 @@ int ooSendCallProceeding(OOH323CallData *call)
return OO_FAILED;
}
memset (q931msg->userInfo, 0, sizeof(H225H323_UserInformation));
- q931msg->userInfo->h323_uu_pdu.m.h245TunnelingPresent=1;
- q931msg->userInfo->h323_uu_pdu.h245Tunneling =
- OO_TESTFLAG(call->flags, OO_M_TUNNELING);
- q931msg->userInfo->h323_uu_pdu.h323_message_body.t =
+ q931msg->userInfo->h323_uu_pdu.m.h245TunnelingPresent=1;
+ q931msg->userInfo->h323_uu_pdu.h245Tunneling =
+ OO_TESTFLAG(call->flags, OO_M_TUNNELING);
+ q931msg->userInfo->h323_uu_pdu.h323_message_body.t =
T_H225H323_UU_PDU_h323_message_body_callProceeding;
-
+
callProceeding = (H225CallProceeding_UUIE*)memAlloc(pctxt,
sizeof(H225CallProceeding_UUIE));
if(!callProceeding)
@@ -1408,12 +1408,12 @@ int ooSendCallProceeding(OOH323CallData *call)
callProceeding->maintainConnection = FALSE;
callProceeding->m.callIdentifierPresent = 1;
- callProceeding->callIdentifier.guid.numocts =
+ callProceeding->callIdentifier.guid.numocts =
call->callIdentifier.guid.numocts;
- memcpy(callProceeding->callIdentifier.guid.data,
- call->callIdentifier.guid.data,
+ memcpy(callProceeding->callIdentifier.guid.data,
+ call->callIdentifier.guid.data,
call->callIdentifier.guid.numocts);
- callProceeding->protocolIdentifier = gProtocolID;
+ callProceeding->protocolIdentifier = gProtocolID;
/* Pose as Terminal or Gateway */
if(gH323ep.isGateway)
@@ -1426,26 +1426,26 @@ int ooSendCallProceeding(OOH323CallData *call)
if(gH323ep.productID)
{
vendor->m.productIdPresent = 1;
- vendor->productId.numocts = ASN1MIN(strlen(gH323ep.productID),
+ vendor->productId.numocts = ASN1MIN(strlen(gH323ep.productID),
sizeof(vendor->productId.data));
- strncpy((char *)vendor->productId.data, gH323ep.productID,
+ strncpy((char *)vendor->productId.data, gH323ep.productID,
vendor->productId.numocts);
}
if(gH323ep.versionID)
{
vendor->m.versionIdPresent = 1;
- vendor->versionId.numocts = ASN1MIN(strlen(gH323ep.versionID),
+ vendor->versionId.numocts = ASN1MIN(strlen(gH323ep.versionID),
sizeof(vendor->versionId.data));
- strncpy((char *)vendor->versionId.data, gH323ep.versionID,
- vendor->versionId.numocts);
+ strncpy((char *)vendor->versionId.data, gH323ep.versionID,
+ vendor->versionId.numocts);
}
vendor->vendor.t35CountryCode = gH323ep.t35CountryCode;
vendor->vendor.t35Extension = gH323ep.t35Extension;
vendor->vendor.manufacturerCode = gH323ep.manufacturerCode;
-
- OOTRACEDBGA3("Built Call Proceeding(%s, %s)\n", call->callType,
- call->callToken);
+
+ OOTRACEDBGA3("Built Call Proceeding(%s, %s)\n", call->callType,
+ call->callToken);
ret = ooSendH225Msg(call, q931msg);
if(ret != OO_OK)
{
@@ -1460,7 +1460,7 @@ int ooSendCallProceeding(OOH323CallData *call)
int ooSendAlerting(OOH323CallData *call)
{
- int ret;
+ int ret;
H225Alerting_UUIE *alerting;
H225VendorIdentifier *vendor;
Q931Message *q931msg=NULL;
@@ -1469,7 +1469,7 @@ int ooSendAlerting(OOH323CallData *call)
ret = ooCreateQ931Message(pctxt, &q931msg, Q931AlertingMsg);
if(ret != OO_OK)
- {
+ {
OOTRACEERR1("Error: In allocating memory for - H225 "
"Alerting message\n");
return OO_FAILED;
@@ -1487,13 +1487,13 @@ int ooSendAlerting(OOH323CallData *call)
return OO_FAILED;
}
memset (q931msg->userInfo, 0, sizeof(H225H323_UserInformation));
- q931msg->userInfo->h323_uu_pdu.m.h245TunnelingPresent=1;
- q931msg->userInfo->h323_uu_pdu.h245Tunneling = OO_TESTFLAG(call->flags,
- OO_M_TUNNELING);
- q931msg->userInfo->h323_uu_pdu.h323_message_body.t =
+ q931msg->userInfo->h323_uu_pdu.m.h245TunnelingPresent=1;
+ q931msg->userInfo->h323_uu_pdu.h245Tunneling = OO_TESTFLAG(call->flags,
+ OO_M_TUNNELING);
+ q931msg->userInfo->h323_uu_pdu.h323_message_body.t =
T_H225H323_UU_PDU_h323_message_body_alerting;
-
- alerting = (H225Alerting_UUIE*)memAlloc(pctxt,
+
+ alerting = (H225Alerting_UUIE*)memAlloc(pctxt,
sizeof(H225Alerting_UUIE));
if(!alerting)
{
@@ -1510,7 +1510,7 @@ int ooSendAlerting(OOH323CallData *call)
/*Populate aliases */
alerting->m.alertingAddressPresent = TRUE;
if(call->ourAliases)
- ret = ooPopulateAliasList(pctxt, call->ourAliases,
+ ret = ooPopulateAliasList(pctxt, call->ourAliases,
&alerting->alertingAddress, 0);
else
ret = ooPopulateAliasList(pctxt, gH323ep.aliases,
@@ -1522,7 +1522,7 @@ int ooSendAlerting(OOH323CallData *call)
return OO_FAILED;
}
alerting->m.presentationIndicatorPresent = TRUE;
- alerting->presentationIndicator.t =
+ alerting->presentationIndicator.t =
T_H225PresentationIndicator_presentationAllowed;
alerting->m.screeningIndicatorPresent = TRUE;
alerting->screeningIndicator = userProvidedNotScreened;
@@ -1530,12 +1530,12 @@ int ooSendAlerting(OOH323CallData *call)
alerting->m.callIdentifierPresent = 1;
- alerting->callIdentifier.guid.numocts =
+ alerting->callIdentifier.guid.numocts =
call->callIdentifier.guid.numocts;
- memcpy(alerting->callIdentifier.guid.data,
- call->callIdentifier.guid.data,
+ memcpy(alerting->callIdentifier.guid.data,
+ call->callIdentifier.guid.data,
call->callIdentifier.guid.numocts);
- alerting->protocolIdentifier = gProtocolID;
+ alerting->protocolIdentifier = gProtocolID;
/* Pose as Terminal or Gateway */
if(gH323ep.isGateway)
@@ -1548,26 +1548,26 @@ int ooSendAlerting(OOH323CallData *call)
if(gH323ep.productID)
{
vendor->m.productIdPresent = 1;
- vendor->productId.numocts = ASN1MIN(strlen(gH323ep.productID),
+ vendor->productId.numocts = ASN1MIN(strlen(gH323ep.productID),
sizeof(vendor->productId.data));
- strncpy((char *)vendor->productId.data, gH323ep.productID,
+ strncpy((char *)vendor->productId.data, gH323ep.productID,
vendor->productId.numocts);
}
if(gH323ep.versionID)
{
vendor->m.versionIdPresent = 1;
- vendor->versionId.numocts = ASN1MIN(strlen(gH323ep.versionID),
+ vendor->versionId.numocts = ASN1MIN(strlen(gH323ep.versionID),
sizeof(vendor->versionId.data));
- strncpy((char *)vendor->versionId.data, gH323ep.versionID,
- vendor->versionId.numocts);
+ strncpy((char *)vendor->versionId.data, gH323ep.versionID,
+ vendor->versionId.numocts);
}
-
+
vendor->vendor.t35CountryCode = gH323ep.t35CountryCode;
vendor->vendor.t35Extension = gH323ep.t35Extension;
vendor->vendor.manufacturerCode = gH323ep.manufacturerCode;
-
+
if (!call->fsSent) {
- ret = ooSetFastStartResponse(call, q931msg,
+ ret = ooSetFastStartResponse(call, q931msg,
&alerting->fastStart.n, &alerting->fastStart.elem);
if(ret != ASN_OK) { return ret; }
if(alerting->fastStart.n > 0) {
@@ -1580,7 +1580,7 @@ int ooSendAlerting(OOH323CallData *call)
}
OOTRACEDBGA3("Built Alerting (%s, %s)\n", call->callType, call->callToken);
-
+
ret = ooSendH225Msg(call, q931msg);
if(ret != OO_OK)
{
@@ -1597,7 +1597,7 @@ int ooSendAlerting(OOH323CallData *call)
int ooSendProgress(OOH323CallData *call)
{
- int ret;
+ int ret;
H225Progress_UUIE *progress;
H225VendorIdentifier *vendor;
Q931Message *q931msg=NULL;
@@ -1607,7 +1607,7 @@ int ooSendProgress(OOH323CallData *call)
ret = ooCreateQ931Message(pctxt, &q931msg, Q931ProgressMsg);
if(ret != OO_OK)
- {
+ {
OOTRACEERR1("Error: In allocating memory for - H225 "
"Alerting message\n");
return OO_FAILED;
@@ -1623,13 +1623,13 @@ int ooSendProgress(OOH323CallData *call)
return OO_FAILED;
}
memset (q931msg->userInfo, 0, sizeof(H225H323_UserInformation));
- q931msg->userInfo->h323_uu_pdu.m.h245TunnelingPresent=1;
- q931msg->userInfo->h323_uu_pdu.h245Tunneling = OO_TESTFLAG(call->flags,
- OO_M_TUNNELING);
- q931msg->userInfo->h323_uu_pdu.h323_message_body.t =
+ q931msg->userInfo->h323_uu_pdu.m.h245TunnelingPresent=1;
+ q931msg->userInfo->h323_uu_pdu.h245Tunneling = OO_TESTFLAG(call->flags,
+ OO_M_TUNNELING);
+ q931msg->userInfo->h323_uu_pdu.h323_message_body.t =
T_H225H323_UU_PDU_h323_message_body_progress;
-
- progress = (H225Progress_UUIE*)memAlloc(pctxt,
+
+ progress = (H225Progress_UUIE*)memAlloc(pctxt,
sizeof(H225Progress_UUIE));
if(!progress)
{
@@ -1643,12 +1643,12 @@ int ooSendProgress(OOH323CallData *call)
progress->multipleCalls = FALSE;
progress->maintainConnection = FALSE;
- progress->callIdentifier.guid.numocts =
+ progress->callIdentifier.guid.numocts =
call->callIdentifier.guid.numocts;
- memcpy(progress->callIdentifier.guid.data,
- call->callIdentifier.guid.data,
+ memcpy(progress->callIdentifier.guid.data,
+ call->callIdentifier.guid.data,
call->callIdentifier.guid.numocts);
- progress->protocolIdentifier = gProtocolID;
+ progress->protocolIdentifier = gProtocolID;
/* Pose as Terminal or Gateway */
if(gH323ep.isGateway)
@@ -1661,26 +1661,26 @@ int ooSendProgress(OOH323CallData *call)
if(gH323ep.productID)
{
vendor->m.productIdPresent = 1;
- vendor->productId.numocts = ASN1MIN(strlen(gH323ep.productID),
+ vendor->productId.numocts = ASN1MIN(strlen(gH323ep.productID),
sizeof(vendor->productId.data));
- strncpy((char *)vendor->productId.data, gH323ep.productID,
+ strncpy((char *)vendor->productId.data, gH323ep.productID,
vendor->productId.numocts);
}
if(gH323ep.versionID)
{
vendor->m.versionIdPresent = 1;
- vendor->versionId.numocts = ASN1MIN(strlen(gH323ep.versionID),
+ vendor->versionId.numocts = ASN1MIN(strlen(gH323ep.versionID),
sizeof(vendor->versionId.data));
- strncpy((char *)vendor->versionId.data, gH323ep.versionID,
- vendor->versionId.numocts);
+ strncpy((char *)vendor->versionId.data, gH323ep.versionID,
+ vendor->versionId.numocts);
}
-
+
vendor->vendor.t35CountryCode = gH323ep.t35CountryCode;
vendor->vendor.t35Extension = gH323ep.t35Extension;
vendor->vendor.manufacturerCode = gH323ep.manufacturerCode;
-
+
if (!call->fsSent) {
- ret = ooSetFastStartResponse(call, q931msg,
+ ret = ooSetFastStartResponse(call, q931msg,
&progress->fastStart.n, &progress->fastStart.elem);
if(ret != ASN_OK) { return ret; }
if(progress->fastStart.n > 0) {
@@ -1694,7 +1694,7 @@ int ooSendProgress(OOH323CallData *call)
/* Add h245 listener address. Do not add H245 listener address in case
of tunneling. */
- if (/* (!OO_TESTFLAG(call->flags, OO_M_FASTSTART) ||
+ if (/* (!OO_TESTFLAG(call->flags, OO_M_FASTSTART) ||
call->remoteFastStartOLCs.count == 0) && */
!OO_TESTFLAG (call->flags, OO_M_TUNNELING) &&
!call->h245listener && ooCreateH245Listener(call) == OO_OK)
@@ -1702,7 +1702,7 @@ int ooSendProgress(OOH323CallData *call)
if (call->versionIP == 6) {
progress->m.h245AddressPresent = TRUE;
progress->h245Address.t = T_H225TransportAddress_ip6Address;
-
+
h245Ip6Addr = (H225TransportAddress_ip6Address*)
memAllocZ (pctxt, sizeof(H225TransportAddress_ip6Address));
if(!h245Ip6Addr)
@@ -1718,7 +1718,7 @@ int ooSendProgress(OOH323CallData *call)
} else {
progress->m.h245AddressPresent = TRUE;
progress->h245Address.t = T_H225TransportAddress_ipAddress;
-
+
h245IpAddr = (H225TransportAddress_ipAddress*)
memAllocZ (pctxt, sizeof(H225TransportAddress_ipAddress));
if(!h245IpAddr)
@@ -1735,7 +1735,7 @@ int ooSendProgress(OOH323CallData *call)
}
OOTRACEDBGA3("Built Progress (%s, %s)\n", call->callType, call->callToken);
-
+
ret = ooSendH225Msg(call, q931msg);
if(ret != OO_OK)
{
@@ -1860,20 +1860,20 @@ int ooSendStartH245Facility(OOH323CallData *call)
sizeof(H225H323_UserInformation));
if(!pQ931Msg->userInfo)
{
- OOTRACEERR3("ERROR:Memory - ooSendFacility - userInfo(%s, %s)\n",
+ OOTRACEERR3("ERROR:Memory - ooSendFacility - userInfo(%s, %s)\n",
call->callType, call->callToken);
return OO_FAILED;
}
memset (pQ931Msg->userInfo, 0, sizeof(H225H323_UserInformation));
- pQ931Msg->userInfo->h323_uu_pdu.m.h245TunnelingPresent=1;
+ pQ931Msg->userInfo->h323_uu_pdu.m.h245TunnelingPresent=1;
- pQ931Msg->userInfo->h323_uu_pdu.h245Tunneling =
- OO_TESTFLAG (call->flags, OO_M_TUNNELING);
+ pQ931Msg->userInfo->h323_uu_pdu.h245Tunneling =
+ OO_TESTFLAG (call->flags, OO_M_TUNNELING);
- pQ931Msg->userInfo->h323_uu_pdu.h323_message_body.t =
+ pQ931Msg->userInfo->h323_uu_pdu.h323_message_body.t =
T_H225H323_UU_PDU_h323_message_body_facility;
-
- facility = (H225Facility_UUIE*)
+
+ facility = (H225Facility_UUIE*)
memAllocZ (pctxt, sizeof(H225Facility_UUIE));
if(!facility)
@@ -1886,12 +1886,12 @@ int ooSendStartH245Facility(OOH323CallData *call)
pQ931Msg->userInfo->h323_uu_pdu.h323_message_body.u.facility = facility;
/* Populate Facility UUIE */
- facility->protocolIdentifier = gProtocolID;
+ facility->protocolIdentifier = gProtocolID;
facility->m.callIdentifierPresent = 1;
- facility->callIdentifier.guid.numocts =
+ facility->callIdentifier.guid.numocts =
call->callIdentifier.guid.numocts;
- memcpy(facility->callIdentifier.guid.data,
- call->callIdentifier.guid.data,
+ memcpy(facility->callIdentifier.guid.data,
+ call->callIdentifier.guid.data,
call->callIdentifier.guid.numocts);
facility->reason.t = T_H225FacilityReason_startH245;
@@ -1953,22 +1953,22 @@ int ooSendStartH245Facility(OOH323CallData *call)
int ooSendStatus(OOH323CallData *call)
{
- int ret;
+ int ret;
H225Status_UUIE *status;
Q931Message *q931msg=NULL;
/* OOCTXT *pctxt = &gH323ep.msgctxt; */
OOCTXT *pctxt = call->msgctxt;
- OOTRACEDBGC3("Building StatusMsg (%s, %s)\n", call->callType,
+ OOTRACEDBGC3("Building StatusMsg (%s, %s)\n", call->callType,
call->callToken);
ret = ooCreateQ931Message(pctxt, &q931msg, Q931StatusMsg);
if(ret != OO_OK)
- {
+ {
OOTRACEERR1("Error: In allocating memory for - H225 Status "
"message\n");
return OO_FAILED;
}
-
+
q931msg->callReference = call->callReference;
q931msg->userInfo = (H225H323_UserInformation*)memAllocZ(pctxt,
@@ -1978,12 +1978,12 @@ int ooSendStatus(OOH323CallData *call)
OOTRACEERR1("ERROR:Memory - ooSendStatus - userInfo\n");
return OO_FAILED;
}
- q931msg->userInfo->h323_uu_pdu.m.h245TunnelingPresent=1;
- q931msg->userInfo->h323_uu_pdu.h245Tunneling =
- OO_TESTFLAG(call->flags, OO_M_TUNNELING);
- q931msg->userInfo->h323_uu_pdu.h323_message_body.t =
+ q931msg->userInfo->h323_uu_pdu.m.h245TunnelingPresent=1;
+ q931msg->userInfo->h323_uu_pdu.h245Tunneling =
+ OO_TESTFLAG(call->flags, OO_M_TUNNELING);
+ q931msg->userInfo->h323_uu_pdu.h323_message_body.t =
T_H225H323_UU_PDU_h323_message_body_status;
-
+
status = (H225Status_UUIE*)memAllocZ(pctxt,
sizeof(H225Status_UUIE));
if(!status)
@@ -1993,18 +1993,18 @@ int ooSendStatus(OOH323CallData *call)
}
q931msg->userInfo->h323_uu_pdu.h323_message_body.u.status = status;
- status->callIdentifier.guid.numocts =
+ status->callIdentifier.guid.numocts =
call->callIdentifier.guid.numocts;
- memcpy(status->callIdentifier.guid.data,
- call->callIdentifier.guid.data,
+ memcpy(status->callIdentifier.guid.data,
+ call->callIdentifier.guid.data,
call->callIdentifier.guid.numocts);
- status->protocolIdentifier = gProtocolID;
+ status->protocolIdentifier = gProtocolID;
ooQ931SetCauseIE(pctxt, q931msg, Q931StatusEnquiryResponse, 0, 0);
ooQ931SetCallStateIE(pctxt, q931msg, 10);
- OOTRACEDBGA3("Built Status (%s, %s)\n", call->callType,
- call->callToken);
+ OOTRACEDBGA3("Built Status (%s, %s)\n", call->callType,
+ call->callToken);
ret = ooSendH225Msg(call, q931msg);
if(ret != OO_OK)
{
@@ -2019,22 +2019,22 @@ int ooSendStatus(OOH323CallData *call)
int ooSendStatusInquiry(OOH323CallData *call)
{
- int ret;
+ int ret;
H225StatusInquiry_UUIE *statusInq;
Q931Message *q931msg=NULL;
/* OOCTXT *pctxt = &gH323ep.msgctxt; */
OOCTXT *pctxt = call->msgctxt;
- OOTRACEDBGC3("Building StatusInquryMsg (%s, %s)\n", call->callType,
+ OOTRACEDBGC3("Building StatusInquryMsg (%s, %s)\n", call->callType,
call->callToken);
ret = ooCreateQ931Message(pctxt, &q931msg, Q931StatusEnquiryMsg);
if(ret != OO_OK)
- {
+ {
OOTRACEERR1("Error: In allocating memory for - H225 Status "
"message\n");
return OO_FAILED;
}
-
+
q931msg->callReference = call->callReference;
q931msg->userInfo = (H225H323_UserInformation*)memAllocZ(pctxt,
@@ -2044,12 +2044,12 @@ int ooSendStatusInquiry(OOH323CallData *call)
OOTRACEERR1("ERROR:Memory - ooSendStatus - userInfo\n");
return OO_FAILED;
}
- q931msg->userInfo->h323_uu_pdu.m.h245TunnelingPresent=1;
- q931msg->userInfo->h323_uu_pdu.h245Tunneling =
- OO_TESTFLAG(call->flags, OO_M_TUNNELING);
- q931msg->userInfo->h323_uu_pdu.h323_message_body.t =
+ q931msg->userInfo->h323_uu_pdu.m.h245TunnelingPresent=1;
+ q931msg->userInfo->h323_uu_pdu.h245Tunneling =
+ OO_TESTFLAG(call->flags, OO_M_TUNNELING);
+ q931msg->userInfo->h323_uu_pdu.h323_message_body.t =
T_H225H323_UU_PDU_h323_message_body_statusInquiry;
-
+
statusInq = (H225StatusInquiry_UUIE*)memAllocZ(pctxt,
sizeof(H225StatusInquiry_UUIE));
if(!statusInq)
@@ -2059,15 +2059,15 @@ int ooSendStatusInquiry(OOH323CallData *call)
}
q931msg->userInfo->h323_uu_pdu.h323_message_body.u.statusInquiry = statusInq;
- statusInq->callIdentifier.guid.numocts =
+ statusInq->callIdentifier.guid.numocts =
call->callIdentifier.guid.numocts;
- memcpy(statusInq->callIdentifier.guid.data,
- call->callIdentifier.guid.data,
+ memcpy(statusInq->callIdentifier.guid.data,
+ call->callIdentifier.guid.data,
call->callIdentifier.guid.numocts);
- statusInq->protocolIdentifier = gProtocolID;
+ statusInq->protocolIdentifier = gProtocolID;
- OOTRACEDBGA3("Built StatusInquiry (%s, %s)\n", call->callType,
- call->callToken);
+ OOTRACEDBGA3("Built StatusInquiry (%s, %s)\n", call->callType,
+ call->callToken);
ret = ooSendH225Msg(call, q931msg);
if(ret != OO_OK)
{
@@ -2081,7 +2081,7 @@ int ooSendStatusInquiry(OOH323CallData *call)
}
int ooSendReleaseComplete(OOH323CallData *call)
{
- int ret;
+ int ret;
Q931Message *q931msg=NULL;
H225ReleaseComplete_UUIE *releaseComplete;
enum Q931CauseValues cause = Q931ErrorInCauseIE;
@@ -2093,7 +2093,7 @@ int ooSendReleaseComplete(OOH323CallData *call)
call->callType, call->callToken);
ret = ooCreateQ931Message(pctxt, &q931msg, Q931ReleaseCompleteMsg);
if(ret != OO_OK)
- {
+ {
OOTRACEERR3("Error: In ooCreateQ931Message - H225 Release Complete "
"message(%s, %s)\n", call->callType, call->callToken);
if(call->callState < OO_CALL_CLEAR)
@@ -2124,38 +2124,38 @@ int ooSendReleaseComplete(OOH323CallData *call)
return OO_FAILED;
}
memset(releaseComplete, 0, sizeof(H225ReleaseComplete_UUIE));
- q931msg->userInfo->h323_uu_pdu.h323_message_body.t =
+ q931msg->userInfo->h323_uu_pdu.h323_message_body.t =
T_H225H323_UU_PDU_h323_message_body_releaseComplete;
-
+
/* Get cause value and h225 reason code corresponding to OOCallClearReason*/
- ooQ931GetCauseAndReasonCodeFromCallClearReason(call->callEndReason,
+ ooQ931GetCauseAndReasonCodeFromCallClearReason(call->callEndReason,
&cause, &h225ReasonCode);
if (call->q931cause == 0)
call->q931cause = cause;
/* Set Cause IE */
ooQ931SetCauseIE(pctxt, q931msg, call->q931cause, 0, 0);
-
+
/* Set H225 releaseComplete reasonCode */
releaseComplete->m.reasonPresent = TRUE;
releaseComplete->reason.t = h225ReasonCode;
/* Add user-user ie */
- q931msg->userInfo->h323_uu_pdu.h323_message_body.t =
+ q931msg->userInfo->h323_uu_pdu.h323_message_body.t =
T_H225H323_UU_PDU_h323_message_body_releaseComplete;
-
- q931msg->userInfo->h323_uu_pdu.h323_message_body.u.releaseComplete =
+
+ q931msg->userInfo->h323_uu_pdu.h323_message_body.u.releaseComplete =
releaseComplete;
releaseComplete->m.callIdentifierPresent = 1;
releaseComplete->protocolIdentifier = gProtocolID;
- releaseComplete->callIdentifier.guid.numocts =
+ releaseComplete->callIdentifier.guid.numocts =
call->callIdentifier.guid.numocts;
- memcpy(releaseComplete->callIdentifier.guid.data,
+ memcpy(releaseComplete->callIdentifier.guid.data,
call->callIdentifier.guid.data,
call->callIdentifier.guid.numocts);
OOTRACEDBGA3("Built Release Complete message (%s, %s)\n",
call->callType, call->callToken);
- /* Send H225 message */
+ /* Send H225 message */
ret = ooSendH225Msg(call, q931msg);
if(ret != OO_OK)
{
@@ -2193,11 +2193,11 @@ int ooAcceptCall(OOH323CallData *call)
H225VendorIdentifier *vendor;
Q931Message *q931msg=NULL;
/* OOCTXT *pctxt = &gH323ep.msgctxt; */
- OOCTXT *pctxt = call->msgctxt;
+ OOCTXT *pctxt = call->msgctxt;
ret = ooCreateQ931Message(pctxt, &q931msg, Q931ConnectMsg);
if(ret != OO_OK)
- {
+ {
OOTRACEERR1("Error: In allocating memory for - H225 "
"Connect message\n");
return OO_FAILED;
@@ -2205,7 +2205,7 @@ int ooAcceptCall(OOH323CallData *call)
q931msg->callReference = call->callReference;
/* Set bearer capability */
- if(OO_OK != ooSetBearerCapabilityIE(pctxt, q931msg, Q931CCITTStd,
+ if(OO_OK != ooSetBearerCapabilityIE(pctxt, q931msg, Q931CCITTStd,
// Q931TransferUnrestrictedDigital, Q931TransferPacketMode,
// Q931TransferRatePacketMode, Q931UserInfoLayer1G722G725))
Q931TransferSpeech, Q931TransferCircuitMode,
@@ -2223,16 +2223,16 @@ int ooAcceptCall(OOH323CallData *call)
{
OOTRACEERR1("ERROR:Memory - ooAcceptCall - userInfo\n");
return OO_FAILED;
- }
+ }
- q931msg->userInfo->h323_uu_pdu.m.h245TunnelingPresent=TRUE;
+ q931msg->userInfo->h323_uu_pdu.m.h245TunnelingPresent=TRUE;
- q931msg->userInfo->h323_uu_pdu.h245Tunneling =
- OO_TESTFLAG (call->flags, OO_M_TUNNELING);
+ q931msg->userInfo->h323_uu_pdu.h245Tunneling =
+ OO_TESTFLAG (call->flags, OO_M_TUNNELING);
- q931msg->userInfo->h323_uu_pdu.h323_message_body.t =
+ q931msg->userInfo->h323_uu_pdu.h323_message_body.t =
T_H225H323_UU_PDU_h323_message_body_connect;
-
+
connect = (H225Connect_UUIE*)
memAllocZ (pctxt, sizeof(H225Connect_UUIE));
@@ -2248,28 +2248,28 @@ int ooAcceptCall(OOH323CallData *call)
connect->m.maintainConnectionPresent = 1;
connect->multipleCalls = FALSE;
connect->maintainConnection = FALSE;
-
-
+
+
connect->conferenceID.numocts = 16;
for (i = 0; i < 16; i++)
connect->conferenceID.data[i] = i + 1;
connect->m.callIdentifierPresent = 1;
- connect->callIdentifier.guid.numocts =
+ connect->callIdentifier.guid.numocts =
call->callIdentifier.guid.numocts;
- memcpy(connect->callIdentifier.guid.data, call->callIdentifier.guid.data,
+ memcpy(connect->callIdentifier.guid.data, call->callIdentifier.guid.data,
call->callIdentifier.guid.numocts);
-
+
connect->conferenceID.numocts = call->confIdentifier.numocts;
memcpy(connect->conferenceID.data, call->confIdentifier.data,
call->confIdentifier.numocts);
/* Populate alias addresses */
connect->m.connectedAddressPresent = TRUE;
if(call->ourAliases)
- ret = ooPopulateAliasList(pctxt, call->ourAliases,
+ ret = ooPopulateAliasList(pctxt, call->ourAliases,
&connect->connectedAddress, 0);
else
- ret = ooPopulateAliasList(pctxt, gH323ep.aliases,
+ ret = ooPopulateAliasList(pctxt, gH323ep.aliases,
&connect->connectedAddress, 0);
if(OO_OK != ret)
{
@@ -2278,12 +2278,12 @@ int ooAcceptCall(OOH323CallData *call)
return OO_FAILED;
}
connect->m.presentationIndicatorPresent = TRUE;
- connect->presentationIndicator.t =
+ connect->presentationIndicator.t =
T_H225PresentationIndicator_presentationAllowed;
connect->m.screeningIndicatorPresent = TRUE;
connect->screeningIndicator = userProvidedNotScreened;
- connect->protocolIdentifier = gProtocolID;
+ connect->protocolIdentifier = gProtocolID;
/* Pose as Terminal or Gateway */
if(gH323ep.isGateway)
@@ -2291,32 +2291,32 @@ int ooAcceptCall(OOH323CallData *call)
else
connect->destinationInfo.m.terminalPresent = TRUE;
-
+
connect->destinationInfo.m.vendorPresent = 1;
vendor = &connect->destinationInfo.vendor;
-
+
vendor->vendor.t35CountryCode = gH323ep.t35CountryCode;
vendor->vendor.t35Extension = gH323ep.t35Extension;
vendor->vendor.manufacturerCode = gH323ep.manufacturerCode;
if(gH323ep.productID)
{
vendor->m.productIdPresent = 1;
- vendor->productId.numocts = ASN1MIN(strlen(gH323ep.productID),
+ vendor->productId.numocts = ASN1MIN(strlen(gH323ep.productID),
sizeof(vendor->productId.data));
- strncpy((char *)vendor->productId.data, gH323ep.productID,
+ strncpy((char *)vendor->productId.data, gH323ep.productID,
vendor->productId.numocts);
}
if(gH323ep.versionID)
{
vendor->m.versionIdPresent = 1;
- vendor->versionId.numocts = ASN1MIN(strlen(gH323ep.versionID),
+ vendor->versionId.numocts = ASN1MIN(strlen(gH323ep.versionID),
sizeof(vendor->versionId.data));
- strncpy((char *)vendor->versionId.data, gH323ep.versionID,
- vendor->versionId.numocts);
+ strncpy((char *)vendor->versionId.data, gH323ep.versionID,
+ vendor->versionId.numocts);
}
if (!call->fsSent) {
- ret = ooSetFastStartResponse(call, q931msg,
+ ret = ooSetFastStartResponse(call, q931msg,
&connect->fastStart.n, &connect->fastStart.elem);
if(ret != ASN_OK) { return ret; }
if(connect->fastStart.n > 0) {
@@ -2345,7 +2345,7 @@ int ooAcceptCall(OOH323CallData *call)
of fast-start. why? */
/* May 20110205 */
/* Send h245 listener addr any case if H245 connection isn't established */
- if (/* (!OO_TESTFLAG(call->flags, OO_M_FASTSTART) ||
+ if (/* (!OO_TESTFLAG(call->flags, OO_M_FASTSTART) ||
call->remoteFastStartOLCs.count == 0) && */
!OO_TESTFLAG (call->flags, OO_M_TUNNELING) &&
( (!call->h245listener && ooCreateH245Listener(call) == OO_OK) ||
@@ -2354,7 +2354,7 @@ int ooAcceptCall(OOH323CallData *call)
connect->m.h245AddressPresent = TRUE;
if (call->versionIP == 6) {
connect->h245Address.t = T_H225TransportAddress_ip6Address;
-
+
h245Ip6Addr = (H225TransportAddress_ip6Address*)
memAllocZ (pctxt, sizeof(H225TransportAddress_ip6Address));
if(!h245Ip6Addr)
@@ -2369,7 +2369,7 @@ int ooAcceptCall(OOH323CallData *call)
connect->h245Address.u.ip6Address = h245Ip6Addr;
} else {
connect->h245Address.t = T_H225TransportAddress_ipAddress;
-
+
h245IpAddr = (H225TransportAddress_ipAddress*)
memAllocZ (pctxt, sizeof(H225TransportAddress_ipAddress));
if(!h245IpAddr)
@@ -2405,7 +2405,7 @@ int ooAcceptCall(OOH323CallData *call)
memReset(call->msgctxt);
call->callState = OO_CALL_CONNECTED;
-
+
if (call->rtdrCount > 0 && call->rtdrInterval > 0) {
return ooSendRoundTripDelayRequest(call);
}
@@ -2433,7 +2433,7 @@ int ooH323HandleCallFwdRequest(OOH323CallData *call)
strcpy(fwdedCall->remoteIP, call->pCallFwdData->ip);
}
fwdedCall->remotePort = call->pCallFwdData->port;
-
+
if(call->pCallFwdData->aliases)
{
alias = call->pCallFwdData->aliases;
@@ -2465,7 +2465,7 @@ int ooH323HandleCallFwdRequest(OOH323CallData *call)
for (i = 0; i < 16; i++) {
fwdedCall->confIdentifier.data[i] = irand++;
}
-
+
if(gH323ep.gkClient && !OO_TESTFLAG(fwdedCall->flags, OO_M_DISABLEGK))
{
@@ -2569,7 +2569,7 @@ int ooH323MakeCall(char *dest, char *callToken, ooCallOptions *opts)
ooCleanCall(call);
return OO_FAILED;
}
-
+
/* Check whether we have ip address */
if(!ooUtilsIsStrEmpty(tmp)) {
ip = tmp;
@@ -2593,7 +2593,7 @@ int ooH323MakeCall(char *dest, char *callToken, ooCallOptions *opts)
for (i = 0; i < 16; i++) {
call->confIdentifier.data[i] = irand++;
}
-
+
if(gH323ep.gkClient && !OO_TESTFLAG(call->flags, OO_M_DISABLEGK))
{
@@ -2635,19 +2635,19 @@ int ooH323MakeCall(char *dest, char *callToken, ooCallOptions *opts)
int ooH323CallAdmitted(OOH323CallData *call)
{
int ret=0;
-
+
if(!call)
{
/* Call not supplied. Must locate it in list */
OOTRACEERR1("ERROR: Invalid call parameter to ooH323CallAdmitted");
- return OO_FAILED;
+ return OO_FAILED;
}
if(!strcmp(call->callType, "outgoing")) {
ret = ooCreateH225Connection(call);
if(ret != OO_OK)
{
- OOTRACEERR3("ERROR:Failed to create H225 connection to %s:%d\n",
+ OOTRACEERR3("ERROR:Failed to create H225 connection to %s:%d\n",
call->remoteIP, call->remotePort);
if(call->callState< OO_CALL_CLEAR)
{
@@ -2660,7 +2660,7 @@ int ooH323CallAdmitted(OOH323CallData *call)
if(gH323ep.h323Callbacks.onOutgoingCall) {
/* Outgoing call callback function */
if (gH323ep.h323Callbacks.onOutgoingCall(call) != OO_OK) {
- OOTRACEERR3("ERROR:Failed to setup media to (%s,%d)\n",
+ OOTRACEERR3("ERROR:Failed to setup media to (%s,%d)\n",
call->callType, call->callToken);
if(call->callState< OO_CALL_CLEAR)
{
@@ -2670,10 +2670,10 @@ int ooH323CallAdmitted(OOH323CallData *call)
return OO_FAILED;
}
}
-
+
ret = ooH323MakeCall_helper(call);
- }
- else {
+ }
+ else {
/* incoming call */
if(gH323ep.h323Callbacks.onIncomingCall) {
/* Incoming call callback function */
@@ -2690,7 +2690,7 @@ int ooH323CallAdmitted(OOH323CallData *call)
}
}
}
-
+
return OO_OK;
}
@@ -2711,7 +2711,7 @@ int ooH323MakeCall_helper(OOH323CallData *call)
/* pctxt = &gH323ep.msgctxt; */
pctxt = call->msgctxt;
-
+
ret = ooCreateQ931Message(pctxt, &q931msg, Q931SetupMsg);
if(ret != OO_OK)
{
@@ -2722,7 +2722,7 @@ int ooH323MakeCall_helper(OOH323CallData *call)
q931msg->callReference = call->callReference;
/* Set bearer capability */
- if(OO_OK != ooSetBearerCapabilityIE(pctxt, q931msg, Q931CCITTStd,
+ if(OO_OK != ooSetBearerCapabilityIE(pctxt, q931msg, Q931CCITTStd,
// Q931TransferUnrestrictedDigital, Q931TransferPacketMode,
call->transfercap, Q931TransferCircuitMode,
// Q931TransferRatePacketMode, Q931UserInfoLayer1G722G725))
@@ -2737,11 +2737,11 @@ int ooH323MakeCall_helper(OOH323CallData *call)
if(call->callingPartyNumber && call->callingPartyNumber[0])
ooQ931SetCallingPartyNumberIE(pctxt, q931msg,
(const char*)call->callingPartyNumber, 1, 0, 0, 0);
-
+
/* Set called party number Q931 IE */
if(call->calledPartyNumber)
- ooQ931SetCalledPartyNumberIE(pctxt, q931msg,
+ ooQ931SetCalledPartyNumberIE(pctxt, q931msg,
(const char*)call->calledPartyNumber, 1, 0);
else if(call->remoteAliases) {
pAlias = call->remoteAliases;
@@ -2752,17 +2752,17 @@ int ooH323MakeCall_helper(OOH323CallData *call)
}
if(pAlias)
{
- call->calledPartyNumber = (char*)memAlloc(call->pctxt,
+ call->calledPartyNumber = (char*)memAlloc(call->pctxt,
strlen(pAlias->value)+1);
if(!call->calledPartyNumber)
{
OOTRACEERR3("Error:Memory - ooH323MakeCall_helper - "
- "calledPartyNumber(%s, %s)\n", call->callType,
+ "calledPartyNumber(%s, %s)\n", call->callType,
call->callToken);
return OO_FAILED;
}
strcpy(call->calledPartyNumber, pAlias->value);
- ooQ931SetCalledPartyNumberIE(pctxt, q931msg,
+ ooQ931SetCalledPartyNumberIE(pctxt, q931msg,
(const char*)call->calledPartyNumber, 1, 0);
}
@@ -2786,17 +2786,17 @@ int ooH323MakeCall_helper(OOH323CallData *call)
}
memset (setup, 0, sizeof(H225Setup_UUIE));
setup->protocolIdentifier = gProtocolID;
-
+
/* Populate Alias Address.*/
if(call->ourAliases || gH323ep.aliases)
- {
+ {
setup->m.sourceAddressPresent = TRUE;
if(call->ourAliases)
- ret = ooPopulateAliasList(pctxt, call->ourAliases,
+ ret = ooPopulateAliasList(pctxt, call->ourAliases,
&setup->sourceAddress, 0);
else if(gH323ep.aliases)
- ret = ooPopulateAliasList(pctxt, gH323ep.aliases,
+ ret = ooPopulateAliasList(pctxt, gH323ep.aliases,
&setup->sourceAddress, 0);
if(OO_OK != ret)
{
@@ -2807,7 +2807,7 @@ int ooH323MakeCall_helper(OOH323CallData *call)
}
setup->m.presentationIndicatorPresent = TRUE;
- setup->presentationIndicator.t =
+ setup->presentationIndicator.t =
T_H225PresentationIndicator_presentationAllowed;
setup->m.screeningIndicatorPresent = TRUE;
setup->screeningIndicator = userProvidedNotScreened;
@@ -2821,7 +2821,7 @@ int ooH323MakeCall_helper(OOH323CallData *call)
if(call->remoteAliases)
{
setup->m.destinationAddressPresent = TRUE;
- ret = ooPopulateAliasList(pctxt, call->remoteAliases,
+ ret = ooPopulateAliasList(pctxt, call->remoteAliases,
&setup->destinationAddress, 0);
if(OO_OK != ret)
{
@@ -2842,31 +2842,31 @@ int ooH323MakeCall_helper(OOH323CallData *call)
setup->sourceInfo.vendor.vendor.t35CountryCode = gH323ep.t35CountryCode;
setup->sourceInfo.vendor.vendor.t35Extension = gH323ep.t35Extension;
setup->sourceInfo.vendor.vendor.manufacturerCode= gH323ep.manufacturerCode;
-
+
if(gH323ep.productID)
{
setup->sourceInfo.vendor.m.productIdPresent=TRUE;
setup->sourceInfo.vendor.productId.numocts = ASN1MIN(
- strlen(gH323ep.productID),
+ strlen(gH323ep.productID),
sizeof(setup->sourceInfo.vendor.productId.data));
- strncpy((char*)setup->sourceInfo.vendor.productId.data,
+ strncpy((char*)setup->sourceInfo.vendor.productId.data,
gH323ep.productID, setup->sourceInfo.vendor.productId.numocts);
}
else
setup->sourceInfo.vendor.m.productIdPresent=FALSE;
-
+
if(gH323ep.versionID)
{
setup->sourceInfo.vendor.m.versionIdPresent=TRUE;
setup->sourceInfo.vendor.versionId.numocts = ASN1MIN(
- strlen(gH323ep.versionID),
+ strlen(gH323ep.versionID),
sizeof(setup->sourceInfo.vendor.versionId.data));
- strncpy((char*)setup->sourceInfo.vendor.versionId.data,
+ strncpy((char*)setup->sourceInfo.vendor.versionId.data,
gH323ep.versionID, setup->sourceInfo.vendor.versionId.numocts);
}
else
setup->sourceInfo.vendor.m.versionIdPresent=FALSE;
-
+
setup->sourceInfo.mc = FALSE;
setup->sourceInfo.undefinedNode = FALSE;
@@ -2880,7 +2880,7 @@ int ooH323MakeCall_helper(OOH323CallData *call)
if(!destCallSignalIp6Address)
{
OOTRACEERR3("Error:Memory - ooH323MakeCall_helper - "
- "destCallSignal6Address. (%s, %s)\n", call->callType,
+ "destCallSignal6Address. (%s, %s)\n", call->callType,
call->callToken);
return OO_FAILED;
}
@@ -2897,7 +2897,7 @@ int ooH323MakeCall_helper(OOH323CallData *call)
if(!destCallSignalIpAddress)
{
OOTRACEERR3("Error:Memory - ooH323MakeCall_helper - "
- "destCallSignalAddress. (%s, %s)\n", call->callType,
+ "destCallSignalAddress. (%s, %s)\n", call->callType,
call->callToken);
return OO_FAILED;
}
@@ -2963,19 +2963,19 @@ int ooH323MakeCall_helper(OOH323CallData *call)
for(k=0; k< call->capPrefs.index; k++)
{
OOTRACEDBGC5("Preffered capability at index %d is %s. (%s, %s)\n",
- k, ooGetCapTypeText(call->capPrefs.order[k]),
+ k, ooGetCapTypeText(call->capPrefs.order[k]),
call->callType, call->callToken);
if(call->ourCaps) {
epCap = call->ourCaps;
OOTRACEDBGC3("Using call specific capabilities in faststart of "
- "setup message. (%s, %s)\n", call->callType,
+ "setup message. (%s, %s)\n", call->callType,
call->callToken);
}
else{
epCap = gH323ep.myCaps;
OOTRACEDBGC3("Using end-point capabilities for faststart of setup"
- "message. (%s, %s)\n", call->callType,
+ "message. (%s, %s)\n", call->callType,
call->callToken);
}
@@ -2986,8 +2986,8 @@ int ooH323MakeCall_helper(OOH323CallData *call)
if(!epCap)
{
OOTRACEWARN4("Warn:Preferred capability %s is abscent in "
- "capability list. (%s, %s)\n",
- ooGetCapTypeText(call->capPrefs.order[k]),
+ "capability list. (%s, %s)\n",
+ ooGetCapTypeText(call->capPrefs.order[k]),
call->callType, call->callToken);
continue;
}
@@ -2997,12 +2997,12 @@ int ooH323MakeCall_helper(OOH323CallData *call)
if (epCap->capType == OO_CAP_TYPE_DATA)
continue;
- OOTRACEDBGC4("Building olcs with capability %s. (%s, %s)\n",
- ooGetCapTypeText(epCap->cap), call->callType,
+ OOTRACEDBGC4("Building olcs with capability %s. (%s, %s)\n",
+ ooGetCapTypeText(epCap->cap), call->callType,
call->callToken);
if(epCap->dir & OORX)
{
- olc = (H245OpenLogicalChannel*)memAlloc(pctxt,
+ olc = (H245OpenLogicalChannel*)memAlloc(pctxt,
sizeof(H245OpenLogicalChannel));
if(!olc)
{
@@ -3017,10 +3017,10 @@ int ooH323MakeCall_helper(OOH323CallData *call)
return OO_FAILED;
}
memset(olc, 0, sizeof(H245OpenLogicalChannel));
- olc->forwardLogicalChannelNumber = call->logicalChanNoCur++;
+ olc->forwardLogicalChannelNumber = call->logicalChanNoCur++;
if(call->logicalChanNoCur > call->logicalChanNoMax)
call->logicalChanNoCur = call->logicalChanNoBase;
-
+
ooBuildFastStartOLC(call, olc, epCap, pctxt, OORX);
/* Do not specify msg buffer let automatic allocation work */
setPERBuffer(pctxt, NULL, 0, aligned);
@@ -3058,19 +3058,19 @@ int ooH323MakeCall_helper(OOH323CallData *call)
return OO_FAILED;
}
finishPrint();
- removeEventHandler(pctxt);
+ removeEventHandler(pctxt);
olc = NULL;
i++;
OOTRACEDBGC5("Added RX fs element %d with capability %s(%s, %s)\n",
- i, ooGetCapTypeText(epCap->cap), call->callType,
+ i, ooGetCapTypeText(epCap->cap), call->callType,
call->callToken);
}
if(epCap->dir & OOTX)
{
- olc = (H245OpenLogicalChannel*)memAlloc(pctxt,
+ olc = (H245OpenLogicalChannel*)memAlloc(pctxt,
sizeof(H245OpenLogicalChannel));
if(!olc)
{
@@ -3085,10 +3085,10 @@ int ooH323MakeCall_helper(OOH323CallData *call)
return OO_FAILED;
}
memset(olc, 0, sizeof(H245OpenLogicalChannel));
- olc->forwardLogicalChannelNumber = call->logicalChanNoCur++;
+ olc->forwardLogicalChannelNumber = call->logicalChanNoCur++;
if(call->logicalChanNoCur > call->logicalChanNoMax)
call->logicalChanNoCur = call->logicalChanNoBase;
-
+
ooBuildFastStartOLC(call, olc, epCap, pctxt, OOTX);
/* Do not specify msg buffer let automatic allocation work */
setPERBuffer(pctxt, NULL, 0, aligned);
@@ -3125,13 +3125,13 @@ int ooH323MakeCall_helper(OOH323CallData *call)
return OO_FAILED;
}
finishPrint();
- removeEventHandler(pctxt);
+ removeEventHandler(pctxt);
olc = NULL;
i++;
OOTRACEDBGC5("Added TX fs element %d with capability %s(%s, %s)\n",
- i, ooGetCapTypeText(epCap->cap), call->callType,
+ i, ooGetCapTypeText(epCap->cap), call->callType,
call->callToken);
}
@@ -3139,7 +3139,7 @@ int ooH323MakeCall_helper(OOH323CallData *call)
OOTRACEDBGA4("Added %d fast start elements to SETUP message (%s, %s)\n",
i, call->callType, call->callToken);
setup->fastStart.n = i;
- setup->fastStart.elem = pFS;
+ setup->fastStart.elem = pFS;
}
setup->conferenceID.numocts= call->confIdentifier.numocts;
@@ -3149,14 +3149,14 @@ int ooH323MakeCall_helper(OOH323CallData *call)
setup->conferenceGoal.t = T_H225Setup_UUIE_conferenceGoal_create;
/* H.225 point to point call */
setup->callType.t = T_H225CallType_pointToPoint;
-
+
/* Populate optional fields */
setup->m.callIdentifierPresent = TRUE;
/*ooGenerateCallIdentifier(&setup->callIdentifier);*/
setup->callIdentifier.guid.numocts = call->callIdentifier.guid.numocts;
- memcpy(setup->callIdentifier.guid.data, call->callIdentifier.guid.data,
+ memcpy(setup->callIdentifier.guid.data, call->callIdentifier.guid.data,
call->callIdentifier.guid.numocts);
-
+
setup->m.mediaWaitForConnectPresent = TRUE;
if(OO_TESTFLAG(call->flags, OO_M_MEDIAWAITFORCONN)) {
setup->mediaWaitForConnect = TRUE;
@@ -3167,24 +3167,24 @@ int ooH323MakeCall_helper(OOH323CallData *call)
setup->m.canOverlapSendPresent = TRUE;
setup->canOverlapSend = FALSE;
- /* Populate the userInfo structure with the setup UUIE */
-
- q931msg->userInfo->h323_uu_pdu.h323_message_body.t =
+ /* Populate the userInfo structure with the setup UUIE */
+
+ q931msg->userInfo->h323_uu_pdu.h323_message_body.t =
T_H225H323_UU_PDU_h323_message_body_setup;
q931msg->userInfo->h323_uu_pdu.h323_message_body.u.setup = setup;
- q931msg->userInfo->h323_uu_pdu.m.h245TunnelingPresent=1;
-
- q931msg->userInfo->h323_uu_pdu.h245Tunneling =
+ q931msg->userInfo->h323_uu_pdu.m.h245TunnelingPresent=1;
+
+ q931msg->userInfo->h323_uu_pdu.h245Tunneling =
OO_TESTFLAG (call->flags, OO_M_TUNNELING);
- /* For H.323 version 4 and higher, if fast connect, tunneling should be
+ /* For H.323 version 4 and higher, if fast connect, tunneling should be
supported.
why?
*/
- OOTRACEDBGA3("Built SETUP message (%s, %s)\n", call->callType,
+ OOTRACEDBGA3("Built SETUP message (%s, %s)\n", call->callType,
call->callToken);
-
+
/* H225 message callback */
if(gH323ep.h225Callbacks.onBuiltSetup)
gH323ep.h225Callbacks.onBuiltSetup(call, q931msg);
@@ -3204,7 +3204,7 @@ int ooH323MakeCall_helper(OOH323CallData *call)
int ooQ931SendDTMFAsKeyPadIE(OOH323CallData *call, const char* data)
{
- int ret;
+ int ret;
H225Information_UUIE *information=NULL;
Q931Message *q931msg=NULL;
/* OOCTXT *pctxt = &gH323ep.msgctxt; */
@@ -3212,7 +3212,7 @@ int ooQ931SendDTMFAsKeyPadIE(OOH323CallData *call, const char* data)
ret = ooCreateQ931Message(pctxt, &q931msg, Q931InformationMsg);
if(ret != OO_OK)
- {
+ {
OOTRACEERR3("Error: In allocating memory for - H225 Information message."
"(%s, %s)\n", call->callType, call->callToken);
return OO_FAILED;
@@ -3230,13 +3230,13 @@ int ooQ931SendDTMFAsKeyPadIE(OOH323CallData *call, const char* data)
memReset(call->msgctxt);
return OO_FAILED;
}
- q931msg->userInfo->h323_uu_pdu.m.h245TunnelingPresent=1;
- q931msg->userInfo->h323_uu_pdu.h245Tunneling = OO_TESTFLAG(call->flags,
- OO_M_TUNNELING);
- q931msg->userInfo->h323_uu_pdu.h323_message_body.t =
+ q931msg->userInfo->h323_uu_pdu.m.h245TunnelingPresent=1;
+ q931msg->userInfo->h323_uu_pdu.h245Tunneling = OO_TESTFLAG(call->flags,
+ OO_M_TUNNELING);
+ q931msg->userInfo->h323_uu_pdu.h323_message_body.t =
T_H225H323_UU_PDU_h323_message_body_information;
-
- information = (H225Information_UUIE*)memAllocZ(pctxt,
+
+ information = (H225Information_UUIE*)memAllocZ(pctxt,
sizeof(H225Information_UUIE));
if(!information)
{
@@ -3246,21 +3246,21 @@ int ooQ931SendDTMFAsKeyPadIE(OOH323CallData *call, const char* data)
memReset(call->msgctxt);
return OO_FAILED;
}
- q931msg->userInfo->h323_uu_pdu.h323_message_body.u.information =
- information;
+ q931msg->userInfo->h323_uu_pdu.h323_message_body.u.information =
+ information;
information->m.callIdentifierPresent = 1;
- information->callIdentifier.guid.numocts =
+ information->callIdentifier.guid.numocts =
call->callIdentifier.guid.numocts;
- memcpy(information->callIdentifier.guid.data,
- call->callIdentifier.guid.data,
+ memcpy(information->callIdentifier.guid.data,
+ call->callIdentifier.guid.data,
call->callIdentifier.guid.numocts);
information->protocolIdentifier = gProtocolID;
-
+
/*Add keypad IE*/
ret = ooQ931SetKeypadIE(pctxt, q931msg, data);
if(ret != OO_OK)
{
- OOTRACEERR3("Error:Creating keypad IE for (%s, %s)\n", call->callType,
+ OOTRACEERR3("Error:Creating keypad IE for (%s, %s)\n", call->callType,
call->callToken);
/* memReset(&gH323ep.msgctxt); */
memReset(call->msgctxt);
@@ -3297,9 +3297,9 @@ int ooH323ForwardCall(char* callToken, char *dest)
OOTRACEERR2("ERROR: Invalid call token for forward - %s\n", callToken);
return OO_FAILED;
}
- OOTRACEDBGA3("Building Facility message for call forward (%s, %s)\n",
+ OOTRACEDBGA3("Building Facility message for call forward (%s, %s)\n",
call->callType, call->callToken);
- call->pCallFwdData = (OOCallFwdData*)memAllocZ(call->pctxt,
+ call->pCallFwdData = (OOCallFwdData*)memAllocZ(call->pctxt,
sizeof(OOCallFwdData));
if(!call->pCallFwdData)
{
@@ -3308,7 +3308,7 @@ int ooH323ForwardCall(char* callToken, char *dest)
return OO_FAILED;
}
- ret = ooParseDestination(call, dest, ip, 2+8*4+7,
+ ret = ooParseDestination(call, dest, ip, 2+8*4+7,
&call->pCallFwdData->aliases);
if(ret != OO_OK)
{
@@ -3345,20 +3345,20 @@ int ooH323ForwardCall(char* callToken, char *dest)
sizeof(H225H323_UserInformation));
if(!pQ931Msg->userInfo)
{
- OOTRACEERR3("ERROR:Memory - ooH323ForwardCall - userInfo(%s, %s)\n",
+ OOTRACEERR3("ERROR:Memory - ooH323ForwardCall - userInfo(%s, %s)\n",
call->callType, call->callToken);
return OO_FAILED;
}
memset (pQ931Msg->userInfo, 0, sizeof(H225H323_UserInformation));
- pQ931Msg->userInfo->h323_uu_pdu.m.h245TunnelingPresent=1;
+ pQ931Msg->userInfo->h323_uu_pdu.m.h245TunnelingPresent=1;
- pQ931Msg->userInfo->h323_uu_pdu.h245Tunneling =
- OO_TESTFLAG (call->flags, OO_M_TUNNELING);
+ pQ931Msg->userInfo->h323_uu_pdu.h245Tunneling =
+ OO_TESTFLAG (call->flags, OO_M_TUNNELING);
- pQ931Msg->userInfo->h323_uu_pdu.h323_message_body.t =
+ pQ931Msg->userInfo->h323_uu_pdu.h323_message_body.t =
T_H225H323_UU_PDU_h323_message_body_facility;
-
- facility = (H225Facility_UUIE*)
+
+ facility = (H225Facility_UUIE*)
memAllocZ (pctxt, sizeof(H225Facility_UUIE));
if(!facility)
@@ -3369,18 +3369,18 @@ int ooH323ForwardCall(char* callToken, char *dest)
}
pQ931Msg->userInfo->h323_uu_pdu.h323_message_body.u.facility = facility;
-
- facility->protocolIdentifier = gProtocolID;
+
+ facility->protocolIdentifier = gProtocolID;
facility->m.callIdentifierPresent = 1;
- facility->callIdentifier.guid.numocts =
+ facility->callIdentifier.guid.numocts =
call->callIdentifier.guid.numocts;
- memcpy(facility->callIdentifier.guid.data,
- call->callIdentifier.guid.data,
+ memcpy(facility->callIdentifier.guid.data,
+ call->callIdentifier.guid.data,
call->callIdentifier.guid.numocts);
facility->reason.t = T_H225FacilityReason_callForwarded;
-
+
if(!ooUtilsIsStrEmpty(call->pCallFwdData->ip))
{
facility->m.alternativeAddressPresent = TRUE;
@@ -3394,7 +3394,7 @@ int ooH323ForwardCall(char* callToken, char *dest)
"(%s, %s)\n", call->callType, call->callToken);
return OO_FAILED;
}
- inet_pton(AF_INET6, call->pCallFwdData->ip,
+ inet_pton(AF_INET6, call->pCallFwdData->ip,
fwdCallSignalIp6Address->ip.data);
fwdCallSignalIp6Address->ip.numocts=16;
@@ -3410,7 +3410,7 @@ int ooH323ForwardCall(char* callToken, char *dest)
"(%s, %s)\n", call->callType, call->callToken);
return OO_FAILED;
}
- inet_pton(AF_INET, call->pCallFwdData->ip,
+ inet_pton(AF_INET, call->pCallFwdData->ip,
fwdCallSignalIpAddress->ip.data);
fwdCallSignalIpAddress->ip.numocts=4;
@@ -3420,14 +3420,14 @@ int ooH323ForwardCall(char* callToken, char *dest)
}
if(call->pCallFwdData->aliases)
- {
+ {
facility->m.alternativeAliasAddressPresent = TRUE;
- ret = ooPopulateAliasList(pctxt, call->pCallFwdData->aliases,
+ ret = ooPopulateAliasList(pctxt, call->pCallFwdData->aliases,
&facility->alternativeAliasAddress, 0);
if(ret != OO_OK)
{
OOTRACEERR3("Error:Failed to populate alternate aliases in "
- "ooH323ForwardCall. (%s, %s)\n", call->callType,
+ "ooH323ForwardCall. (%s, %s)\n", call->callType,
call->callToken);
return OO_FAILED;
}
@@ -3452,7 +3452,7 @@ int ooH323HangCall(char * callToken, OOCallClearReason reason, int q931cause)
call= ooFindCallByToken(callToken);
if(!call)
{
- OOTRACEWARN2("WARN: Call hangup failed - Call %s not present\n",
+ OOTRACEWARN2("WARN: Call hangup failed - Call %s not present\n",
callToken);
return OO_FAILED;
}
@@ -3467,8 +3467,8 @@ int ooH323HangCall(char * callToken, OOCallClearReason reason, int q931cause)
}
int ooSetBearerCapabilityIE
- (OOCTXT* pctxt, Q931Message *pmsg, enum Q931CodingStandard codingStandard,
- enum Q931InformationTransferCapability capability,
+ (OOCTXT* pctxt, Q931Message *pmsg, enum Q931CodingStandard codingStandard,
+ enum Q931InformationTransferCapability capability,
enum Q931TransferMode transferMode, enum Q931TransferRate transferRate,
enum Q931UserInfoLayer1Protocol userInfoLayer1)
{
@@ -3481,7 +3481,7 @@ int ooSetBearerCapabilityIE
pmsg->bearerCapabilityIE = NULL;
}
- pmsg->bearerCapabilityIE = (Q931InformationElement*)
+ pmsg->bearerCapabilityIE = (Q931InformationElement*)
memAlloc(pctxt, sizeof(Q931InformationElement)+size-1);
if(!pmsg->bearerCapabilityIE)
{
@@ -3495,7 +3495,7 @@ int ooSetBearerCapabilityIE
pmsg->bearerCapabilityIE->data[0] = (ASN1OCTET)(0x80 | ((codingStandard&3) << 5) | (capability&31));
pmsg->bearerCapabilityIE->data[1] = (0x80 | ((transferMode & 3) << 5) | (transferRate & 31));
-
+
pmsg->bearerCapabilityIE->data[2] = (0x80 | (1<<5) | userInfoLayer1);
return OO_OK;
@@ -3507,7 +3507,7 @@ int ooQ931SetKeypadIE(OOCTXT* pctxt, Q931Message *pmsg, const char* data)
/* OOCTXT *pctxt = &gH323ep.msgctxt; */
len = strlen(data);
- pmsg->keypadIE = (Q931InformationElement*)
+ pmsg->keypadIE = (Q931InformationElement*)
memAlloc(pctxt, sizeof(Q931InformationElement)+len-1);
if(!pmsg->keypadIE)
{
@@ -3525,7 +3525,7 @@ int ooQ931SetKeypadIE(OOCTXT* pctxt, Q931Message *pmsg, const char* data)
int ooQ931SetCallingPartyNumberIE
- (OOCTXT* pctxt, Q931Message *pmsg, const char *number, unsigned plan, unsigned type,
+ (OOCTXT* pctxt, Q931Message *pmsg, const char *number, unsigned plan, unsigned type,
unsigned presentation, unsigned screening)
{
unsigned len = 0;
@@ -3538,7 +3538,7 @@ int ooQ931SetCallingPartyNumberIE
}
len = strlen(number);
- pmsg->callingPartyNumberIE = (Q931InformationElement*)
+ pmsg->callingPartyNumberIE = (Q931InformationElement*)
memAlloc(pctxt, sizeof(Q931InformationElement)+len+2-1);
if(!pmsg->callingPartyNumberIE)
{
@@ -3568,7 +3568,7 @@ int ooQ931SetCalledPartyNumberIE
}
len = strlen(number);
- pmsg->calledPartyNumberIE = (Q931InformationElement*)
+ pmsg->calledPartyNumberIE = (Q931InformationElement*)
memAlloc(pctxt, sizeof(Q931InformationElement)+len+1-1);
if(!pmsg->calledPartyNumberIE)
{
@@ -3592,7 +3592,7 @@ int ooQ931SetCallStateIE
pmsg->callstateIE = NULL;
}
- pmsg->callstateIE = (Q931InformationElement*)
+ pmsg->callstateIE = (Q931InformationElement*)
memAllocZ(pctxt, sizeof(Q931InformationElement));
if(!pmsg->callstateIE)
{
@@ -3602,12 +3602,12 @@ int ooQ931SetCallStateIE
pmsg->callstateIE->discriminator = Q931CallStateIE;
pmsg->callstateIE->length = 1;
pmsg->callstateIE->data[0] = callstate;
-
+
return OO_OK;
}
int ooQ931SetCauseIE
- (OOCTXT* pctxt, Q931Message *pmsg, enum Q931CauseValues cause, unsigned coding,
+ (OOCTXT* pctxt, Q931Message *pmsg, enum Q931CauseValues cause, unsigned coding,
unsigned location)
{
/* OOCTXT *pctxt = &gH323ep.msgctxt; */
@@ -3617,7 +3617,7 @@ int ooQ931SetCauseIE
pmsg->causeIE = NULL;
}
- pmsg->causeIE = (Q931InformationElement*)
+ pmsg->causeIE = (Q931InformationElement*)
memAlloc(pctxt, sizeof(Q931InformationElement)+1);
if(!pmsg->causeIE)
{
@@ -3629,13 +3629,13 @@ int ooQ931SetCauseIE
pmsg->causeIE->data[0] = (0x80 | ((coding & 0x03) <<5) | (location & 0x0F));
pmsg->causeIE->data[1] = (0x80 | cause);
-
+
return OO_OK;
}
/* Build a Facility message and tunnel H.245 message through it */
-int ooSendAsTunneledMessage(OOH323CallData *call, ASN1OCTET* msgbuf,
+int ooSendAsTunneledMessage(OOH323CallData *call, ASN1OCTET* msgbuf,
int h245Len, int h245MsgType, int associatedChan)
{
Q931Message *pQ931Msg = NULL;
@@ -3647,7 +3647,7 @@ int ooSendAsTunneledMessage(OOH323CallData *call, ASN1OCTET* msgbuf,
/* OOCTXT *pctxt = &gH323ep.msgctxt; */
OOCTXT *pctxt = call->msgctxt;
- OOTRACEDBGA4("Building Facility message for tunneling %s (%s, %s)\n",
+ OOTRACEDBGA4("Building Facility message for tunneling %s (%s, %s)\n",
ooGetMsgTypeText(h245MsgType), call->callType, call->callToken);
ret = ooCreateQ931Message(pctxt, &pQ931Msg, Q931FacilityMsg);
@@ -3671,14 +3671,14 @@ int ooSendAsTunneledMessage(OOH323CallData *call, ASN1OCTET* msgbuf,
return OO_FAILED;
}
memset (pQ931Msg->userInfo, 0, sizeof(H225H323_UserInformation));
- pQ931Msg->userInfo->h323_uu_pdu.m.h245TunnelingPresent=1;
+ pQ931Msg->userInfo->h323_uu_pdu.m.h245TunnelingPresent=1;
- pQ931Msg->userInfo->h323_uu_pdu.h245Tunneling =
+ pQ931Msg->userInfo->h323_uu_pdu.h245Tunneling =
OO_TESTFLAG (call->flags, OO_M_TUNNELING);
- pQ931Msg->userInfo->h323_uu_pdu.h323_message_body.t =
+ pQ931Msg->userInfo->h323_uu_pdu.h323_message_body.t =
T_H225H323_UU_PDU_h323_message_body_facility;
-
+
facility = (H225Facility_UUIE*)
memAllocZ (pctxt, sizeof(H225Facility_UUIE));
@@ -3693,13 +3693,13 @@ int ooSendAsTunneledMessage(OOH323CallData *call, ASN1OCTET* msgbuf,
pQ931Msg->userInfo->h323_uu_pdu.h323_message_body.u.facility = facility;
/* Populate Facility UUIE */
- facility->protocolIdentifier = gProtocolID;
+ facility->protocolIdentifier = gProtocolID;
facility->m.callIdentifierPresent = 1;
- facility->callIdentifier.guid.numocts =
+ facility->callIdentifier.guid.numocts =
call->callIdentifier.guid.numocts;
- memcpy(facility->callIdentifier.guid.data,
- call->callIdentifier.guid.data,
+ memcpy(facility->callIdentifier.guid.data,
+ call->callIdentifier.guid.data,
call->callIdentifier.guid.numocts);
facility->reason.t = T_H225FacilityReason_transportedInformation;
@@ -3711,7 +3711,7 @@ int ooSendAsTunneledMessage(OOH323CallData *call, ASN1OCTET* msgbuf,
pH245Control = (H225H323_UU_PDU_h245Control*)
&pH323UUPDU->h245Control;
- elem = (ASN1DynOctStr*) memAlloc(pctxt,
+ elem = (ASN1DynOctStr*) memAlloc(pctxt,
sizeof(ASN1DynOctStr));
if(!elem)
{
@@ -3726,7 +3726,7 @@ int ooSendAsTunneledMessage(OOH323CallData *call, ASN1OCTET* msgbuf,
pQ931Msg->tunneledMsgType = h245MsgType;
pQ931Msg->logicalChannelNo = associatedChan;
-
+
ret = ooSendH225Msg(call, pQ931Msg);
if(ret != OO_OK)
{
@@ -3734,7 +3734,7 @@ int ooSendAsTunneledMessage(OOH323CallData *call, ASN1OCTET* msgbuf,
"outbound queue.(%s, %s)\n", call->callType, call->callToken);
}
- /* Can't do memReset here because if we are sending H.245 message as a
+ /* Can't do memReset here because if we are sending H.245 message as a
response to received tunneled h.245 message, we can't reset unless the \
main received H225 message processing is finished. Rule. No reset when
tunneling
@@ -3749,12 +3749,12 @@ int ooCallEstbTimerExpired(void *data)
ooTimerCallback *cbData = (ooTimerCallback*) data;
OOH323CallData *call = cbData->call;
- OOTRACEINFO3("Call Establishment timer expired. (%s, %s)\n",
- call->callType, call->callToken);
+ OOTRACEINFO3("Call Establishment timer expired. (%s, %s)\n",
+ call->callType, call->callToken);
memFreePtr(call->pctxt, cbData);
if(call->callState < OO_CALL_CLEAR){
call->callState = OO_CALL_CLEAR;
- call->callEndReason = OO_REASON_LOCAL_CLEARED;
+ call->callEndReason = OO_REASON_LOCAL_CLEARED;
}
return OO_OK;
@@ -3762,7 +3762,7 @@ int ooCallEstbTimerExpired(void *data)
int ooQ931GetCauseAndReasonCodeFromCallClearReason
- (OOCallClearReason clearReason, enum Q931CauseValues *cause,
+ (OOCallClearReason clearReason, enum Q931CauseValues *cause,
unsigned *reasonCode)
{
switch(clearReason)
@@ -3782,7 +3782,7 @@ int ooQ931GetCauseAndReasonCodeFromCallClearReason
break;
case OO_REASON_GK_NOCALLERUSER:
*reasonCode = T_H225ReleaseCompleteReason_callerNotRegistered;
- *cause = Q931SubscriberAbsent;
+ *cause = Q931SubscriberAbsent;
break;
case OO_REASON_GK_UNREACHABLE:
*reasonCode = T_H225ReleaseCompleteReason_unreachableGatekeeper;
@@ -3832,7 +3832,7 @@ int ooQ931GetCauseAndReasonCodeFromCallClearReason
*cause = Q931NoRouteToDestination;
break;
case OO_REASON_NOUSER:
- *reasonCode = T_H225ReleaseCompleteReason_undefinedReason;
+ *reasonCode = T_H225ReleaseCompleteReason_undefinedReason;
*cause = Q931SubscriberAbsent;
break;
case OO_REASON_UNKNOWN:
@@ -3956,10 +3956,10 @@ int ooParseDestination
parsedIP[0] = '\0';
OOTRACEINFO2("Parsing destination %s\n", dest);
-
+
/* Test for an IP address:Note that only supports dotted IPv4.
IPv6 won't pass the test and so will numeric IP representation*/
-
+
sscanf(dest, "%d.%d.%d.%d:%d", &iEk, &iDon, &iTeen, &iChaar, &iPort);
if((iEk > 0 && iEk <= 255) &&
(iDon >= 0 && iDon <= 255) &&
@@ -3977,7 +3977,7 @@ int ooParseDestination
"ooParseDestination\n");
return OO_FAILED;
}
-
+
strcpy(parsedIP, buf);
return OO_OK;
}
@@ -4084,13 +4084,13 @@ int ooParseDestination
}
}
-
+
/* e-164 */
/* strspn(dest, "1234567890*#,") == strlen(dest)*/
/* Dialed digits test*/
for(i=0; *(alias+i) != '\0'; i++)
{
- if(!isdigit(alias[i]) && alias[i] != '#' && alias[i] != '*' &&
+ if(!isdigit(alias[i]) && alias[i] != '#' && alias[i] != '*' &&
alias[i] != ',')
break;
}
@@ -4198,13 +4198,13 @@ const char* ooGetQ931CauseValueText(int val)
{
switch(val)
{
- case Q931UnallocatedNumber:
+ case Q931UnallocatedNumber:
return "Q931UnallocatedNumber";
case Q931NoRouteToNetwork:
return "Q931NoRouteToNetwork";
case Q931NoRouteToDestination:
return "Q931NoRouteToDestination";
- case Q931ChannelUnacceptable:
+ case Q931ChannelUnacceptable:
return "Q931ChannelUnacceptable";
case Q931NormalCallClearing:
return "Q931NormalCallClearing";
@@ -4255,4 +4255,3 @@ const char* ooGetQ931CauseValueText(int val)
}
return "Unsupported Cause Type";
}
-
diff --git a/addons/ooh323c/src/ooq931.h b/addons/ooh323c/src/ooq931.h
index 8da389328..31e53e929 100644
--- a/addons/ooh323c/src/ooq931.h
+++ b/addons/ooh323c/src/ooq931.h
@@ -1,21 +1,21 @@
/*
* 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.
*
*****************************************************************************/
/**
- * @file ooq931.h
- * This file contains functions to support call signalling.
+ * @file ooq931.h
+ * This file contains functions to support call signalling.
*/
#ifndef _OOQ931HDR_H_
@@ -37,7 +37,7 @@ extern "C" {
#endif /* MAKE_DLL */
#endif /* EXTERN */
-/**
+/**
* @defgroup q931 Q.931/H.2250 Message Handling
* @{
*/
@@ -48,11 +48,11 @@ extern "C" {
#define OO_MAX_CALL_TOKEN 999999
/* Q.931 packet must be at least 5 bytes long */
-#define Q931_E_TOOSHORT (-1001)
+#define Q931_E_TOOSHORT (-1001)
/* callReference field must be 2 bytes long */
-#define Q931_E_INVCALLREF (-1002)
+#define Q931_E_INVCALLREF (-1002)
/* invalid length of message */
-#define Q931_E_INVLENGTH (-1003)
+#define Q931_E_INVLENGTH (-1003)
enum Q931MsgTypes {
Q931NationalEscapeMsg = 0x00,
@@ -217,8 +217,8 @@ enum Q931UserInfoLayer1Protocol{
/*
Structure to build store outgoing encoded UUIE
- The different fields in the structure have octet lengths
- as specified in the spec.
+ The different fields in the structure have octet lengths
+ as specified in the spec.
*/
typedef struct Q931InformationElement {
int discriminator;
@@ -228,8 +228,8 @@ typedef struct Q931InformationElement {
} Q931InformationElement;
/**
- * Q.931 message structure. Contains context for memory allocation,
- * protocol discriminator, call reference, meesage type and list of
+ * Q.931 message structure. Contains context for memory allocation,
+ * protocol discriminator, call reference, meesage type and list of
* user-user information elements (IEs).
*/
typedef struct Q931Message {
@@ -240,7 +240,7 @@ typedef struct Q931Message {
ASN1UINT tunneledMsgType; /* The H245 message this message is tunneling*/
ASN1INT logicalChannelNo; /* channel number associated with tunneled */
/* message, 0 if no channel */
- DList ies;
+ DList ies;
Q931InformationElement *bearerCapabilityIE;
Q931InformationElement *callingPartyNumberIE;
Q931InformationElement *calledPartyNumberIE;
@@ -266,13 +266,13 @@ struct OOH323CallData;
/*
* These are message callbacks which can be used by user applications
- * to perform application specific things on receiving a particular
+ * to perform application specific things on receiving a particular
* message or before sending a particular message. For ex. user application
* can change values of some parameters of setup message before it is actually
* sent out.
*/
/**
- * This callback is triggered when an H.225 SETUP message is received by
+ * This callback is triggered when an H.225 SETUP message is received by
* the application.
* @param call The call the message is associated with.
* @param pmsg Q.931 message structure.
@@ -282,7 +282,7 @@ typedef int (*cb_OnReceivedSetup)
(struct OOH323CallData *call, struct Q931Message *pmsg);
/**
- * This callback is triggered when an H.225 CONNECT message is received by
+ * This callback is triggered when an H.225 CONNECT message is received by
* the application.
* @param call The call the message is associated with.
* @param pmsg Q.931 message structure.
@@ -292,8 +292,8 @@ typedef int (*cb_OnReceivedConnect)
(struct OOH323CallData *call, struct Q931Message *pmsg);
/**
- * This callback is triggered after an H.225 SETUP message has been
- * constructed and is ready to be sent out. It provides the application
+ * This callback is triggered after an H.225 SETUP message has been
+ * constructed and is ready to be sent out. It provides the application
* with an opportunity to add additional non-standard information.
* @param call The call the message is associated with.
* @param pmsg Q.931 message structure.
@@ -303,8 +303,8 @@ typedef int (*cb_OnBuiltSetup)
(struct OOH323CallData *call, struct Q931Message *pmsg);
/**
- * This callback is triggered after an H.225 CONNECT message has been
- * constructed and is ready to be sent out. It provides the application
+ * This callback is triggered after an H.225 CONNECT message has been
+ * constructed and is ready to be sent out. It provides the application
* with an opportunity to add additional non-standard information.
* @param call The call the message is associated with.
* @param pmsg Q.931 message structure.
@@ -314,7 +314,7 @@ typedef int (*cb_OnBuiltConnect)
(struct OOH323CallData *call, struct Q931Message *pmsg);
/**
- * This structure holds the various callback functions that are
+ * This structure holds the various callback functions that are
* triggered when H.225 messages are received or constructed.
* @see ooH323EpSetH225MsgCallbacks
*/
@@ -326,8 +326,8 @@ typedef struct OOH225MsgCallbacks {
} OOH225MsgCallbacks;
/**
- * This function is invoked to decode a Q931 message.
- *
+ * This function is invoked to decode a Q931 message.
+ *
* @param call Handle to call which owns the message.
* @param msg Pointer to the Q931 message
* @param length Length of the encoded data
@@ -335,18 +335,18 @@ typedef struct OOH225MsgCallbacks {
*
* @return Completion status - 0 on success, -1 on failure
*/
-EXTERN int ooQ931Decode
+EXTERN int ooQ931Decode
(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
* ies. It decodes the User-User ie and populates the userInfo field of the
* message.
- * @param q931Msg Pointer to the message whose User-User ie has to be
- * decoded.
+ * @param q931Msg Pointer to the message whose User-User ie has to be
+ * decoded.
*
* @return OO_OK, on success. OO_FAILED, on failure.
- */
+ */
EXTERN int ooDecodeUUIE(OOCTXT* pctxt, Q931Message *q931Msg);
/**
@@ -360,20 +360,20 @@ EXTERN int ooDecodeUUIE(OOCTXT* pctxt, Q931Message *q931Msg);
EXTERN int ooEncodeUUIE(OOCTXT* pctxt, Q931Message *q931msg);
/**
- * This function is invoked to retrieve an IE element from a Q931 message.
- *
+ * This function is invoked to retrieve an IE element from a Q931 message.
+ *
* @param q931msg Pointer to the Q931 message
* @param ieCode IE code for the IE element to be retrieved
*
- * @return Pointer to a Q931InformationElement contating
+ * @return Pointer to a Q931InformationElement contating
* the IE element.
*/
-EXTERN Q931InformationElement* ooQ931GetIE (const Q931Message* q931msg,
+EXTERN Q931InformationElement* ooQ931GetIE (const Q931Message* q931msg,
int ieCode);
/**
- * This function is invoked to print a Q931 message.
- *
+ * This function is invoked to print a Q931 message.
+ *
* @param q931msg Pointer to the Q931 message
*
* @return - none
@@ -382,8 +382,8 @@ EXTERN void ooQ931Print (const Q931Message* q931msg);
/**
- * This function is invoked to create an outgoing Q931 message.
- *
+ * This function is invoked to create an outgoing Q931 message.
+ *
* @param msg Reference to the pointer of type Q931 message.
* @param msgType Type of Q931 message to be created
*
@@ -392,7 +392,7 @@ EXTERN void ooQ931Print (const Q931Message* q931msg);
EXTERN int ooCreateQ931Message(OOCTXT* pctxt, Q931Message **msg, int msgType);
/**
- * This function is invoked to generate a unique call reference number.
+ * This function is invoked to generate a unique call reference number.
*
* @return - call reference number
*/
@@ -409,8 +409,8 @@ EXTERN ASN1USINT ooGenerateCallReference(void);
EXTERN int ooGenerateCallIdentifier(H225CallIdentifier *callid);
/**
- * This function is invoked to release the memory used up by a Q931 message
- *
+ * This function is invoked to release the memory used up by a Q931 message
+ *
* @param q931Msg Pointer to a Q931 message which has to be freed.
*
* @return Completion status - 0 on success, -1 on failure
@@ -418,10 +418,10 @@ EXTERN int ooGenerateCallIdentifier(H225CallIdentifier *callid);
EXTERN int ooFreeQ931Message(OOCTXT* pctxt, Q931Message *q931Msg);
/**
- * This function is invoked to retrive the outgoing message buffer for
+ * This function is invoked to retrive the outgoing message buffer for
* Q931 message
*
- * @param call Pointer to call for which outgoing Q931 message has to be
+ * @param call Pointer to call for which outgoing Q931 message has to be
* retrieved.
* @param msgbuf Pointer to a buffer in which retrieved message will
* be returned.
@@ -436,11 +436,11 @@ EXTERN int ooGetOutgoingQ931Msgbuf
(struct OOH323CallData *call, ASN1OCTET * msgbuf, int* len, int *msgType);
/**
- * This function is invoked to send a ReleaseComplete message for
+ * This function is invoked to send a ReleaseComplete message for
* the currently active call.
*
- * @param call Pointer to the call for which ReleaseComplete message have
- * to be sent.
+ * @param call Pointer to the call for which ReleaseComplete message have
+ * to be sent.
*
* @return Completion status - 0 on success, -1 on failure
*/
@@ -451,18 +451,18 @@ EXTERN int ooSendReleaseComplete(struct OOH323CallData *call);
* received setup message.
*
* @param call Pointer to the call for which CallProceeding message have to
- * be sent.
+ * be sent.
*
* @return Completion status - 0 on success, -1 on failure
*/
EXTERN int ooSendCallProceeding(struct OOH323CallData *call);
/**
- * This function is invoked to send alerting message in response to received
- * setup message.
+ * This function is invoked to send alerting message in response to received
+ * setup message.
*
- * @param call Pointer to the call for which Alerting message have to be
- * sent.
+ * @param call Pointer to the call for which Alerting message have to be
+ * sent.
*
* @return Completion status - 0 on success, -1 on failure
*/
@@ -477,8 +477,8 @@ EXTERN int ooSendStatusInquiry(struct OOH323CallData *call);
/**
* This function is invoked to send Facility message.
*
- * @param call Pointer to the call for which Facility message have to be
- * sent.
+ * @param call Pointer to the call for which Facility message have to be
+ * sent.
*
* @return Completion status - 0 on success, -1 on failure
*/
@@ -497,11 +497,11 @@ EXTERN int ooQ931SendDTMFAsKeyPadIE
(struct OOH323CallData *call, const char* data);
/**
- * This function is invoked to send a Connect message in response to received
- * setup message.
+ * This function is invoked to send a Connect message in response to received
+ * setup message.
*
- * @param call Pointer to the call for which connect message has to be
- * sent.
+ * @param call Pointer to the call for which connect message has to be
+ * sent.
*
* @return Completion status - 0 on success, -1 on failure
*/
@@ -509,7 +509,7 @@ EXTERN int ooSendConnect(struct OOH323CallData *call);
/**
* This function is used to send a SETUP message for outgoing call. It first
- * creates an H.225 TCP connection with the remote end point and then sends
+ * creates an H.225 TCP connection with the remote end point and then sends
* SETUP message over this connection.
* @param dest Destination - IP:Port/alias.
* @param callToken Unique token for the new call.
@@ -541,7 +541,7 @@ EXTERN int ooH323HandleCallFwdRequest(struct OOH323CallData *call);
/**
* This function is used for forwarding/redirecting a call to third party.
* @param callToken callToken for the call which has to be redirected.
- * @param dest Address to which call has to be forwarded. Can be
+ * @param dest Address to which call has to be forwarded. Can be
* IP:Port or alias.
*
* @return OO_OK, on success. OO_FAILED, on failure.
@@ -559,7 +559,7 @@ EXTERN int ooH323ForwardCall(char* callToken, char *dest);
EXTERN int ooH323HangCall(char * callToken, OOCallClearReason reason, int q931);
-/**
+/**
* Function to accept a call by sending connect. This function is used
* as a helper function to ooSendConnect.
* @param call Pointer to the call for which connect has to be sent
@@ -602,7 +602,7 @@ int ooGenerateCallToken (char *callToken, size_t size);
/**
- * This function sends an encoded H.245 message buffer as a tunneled
+ * This function sends an encoded H.245 message buffer as a tunneled
* H.245 Facility message.
* @param call Pointer to the call for which H.245 message has to
* be tunneled.
@@ -617,28 +617,28 @@ int ooGenerateCallToken (char *callToken, size_t size);
* @return OO_OK, on success. OO_FAILED, on failure.
*/
EXTERN int ooSendAsTunneledMessage
-(struct OOH323CallData *call, ASN1OCTET* msgbuf,
- int h245Len, int h245MsgType, int associatedChan);
-
+(struct OOH323CallData *call, ASN1OCTET* msgbuf,
+ int h245Len, int h245MsgType, int associatedChan);
+
/**
* This function is used to encode an H.225 message.
* @param call Handle to the call.
* @param pq931Msg Pointer to the message to be encoded.
- * @param msgbuf Pointer to the buffer in which encoded message will
+ * @param msgbuf Pointer to the buffer in which encoded message will
* be returned.
* @param size Size of the buffer passed.
*
* @return OO_OK, on success. OO_FAILED, on failure.
*/
-int ooEncodeH225Message(struct OOH323CallData *call, Q931Message *pq931Msg,
+int ooEncodeH225Message(struct OOH323CallData *call, Q931Message *pq931Msg,
char *msgbuf, int size);
/**
- * This is a callback function which is called when there is no CONNECT
+ * This is a callback function which is called when there is no CONNECT
* response from the remote endpoint after the SETUP has been sent and timeout
* period has passed.
- * @param data The callback data registered at the time of timer
+ * @param data The callback data registered at the time of timer
* creation.
*
* @return OO_OK, on success. OO_FAILED, on failure.
@@ -670,8 +670,8 @@ EXTERN int ooQ931SetKeypadIE(OOCTXT* pctxt, Q931Message *pmsg, const char* data)
* @return OO_OK on success, OO_FAILED, on failure.
*/
EXTERN int ooSetBearerCapabilityIE
- (OOCTXT* pctxt, Q931Message *pmsg, enum Q931CodingStandard codingStandard,
- enum Q931InformationTransferCapability capability,
+ (OOCTXT* pctxt, Q931Message *pmsg, enum Q931CodingStandard codingStandard,
+ enum Q931InformationTransferCapability capability,
enum Q931TransferMode transferMode, enum Q931TransferRate transferRate,
enum Q931UserInfoLayer1Protocol userInfoLayer1);
@@ -703,10 +703,10 @@ EXTERN int ooQ931SetCalledPartyNumberIE
* @return OO_OK, on success. OO_FAILED, on failure.
*/
EXTERN int ooQ931SetCallingPartyNumberIE
- (OOCTXT* pctxt, Q931Message *pmsg, const char *number, unsigned plan, unsigned type,
+ (OOCTXT* pctxt, Q931Message *pmsg, const char *number, unsigned plan, unsigned type,
unsigned presentation, unsigned screening);
-/**
+/**
* This function is used to set a cause ie for a q931 message.
* @param pmsg Valid Q931 Message
* @param cause Q931 Cause Value
@@ -716,15 +716,15 @@ EXTERN int ooQ931SetCallingPartyNumberIE
* @return OO_OK, on success. OO_FAILED, on failure.
*/
EXTERN int ooQ931SetCauseIE
- (OOCTXT *pctxt, Q931Message *pmsg,enum Q931CauseValues cause, unsigned coding,
+ (OOCTXT *pctxt, Q931Message *pmsg,enum Q931CauseValues cause, unsigned coding,
unsigned location);
EXTERN int ooQ931SetCallStateIE
(OOCTXT *pctxt, Q931Message *pmsg, unsigned char callstate);
/**
- * This function is used to convert a call clear reason to cause and
- * reason code. It is used when local user is endoing the call and
+ * This function is used to convert a call clear reason to cause and
+ * reason code. It is used when local user is endoing the call and
* sending releaseComplete.
* @param clearReason Reason for ending call.
* @param cause Pointer to Q931CauseVaules enum in which cause
@@ -735,7 +735,7 @@ EXTERN int ooQ931SetCallStateIE
* @return OO_OK, on success. OO_FAILED, on failure.
*/
EXTERN int ooQ931GetCauseAndReasonCodeFromCallClearReason
- (OOCallClearReason clearReason, enum Q931CauseValues *cause,
+ (OOCallClearReason clearReason, enum Q931CauseValues *cause,
unsigned *reasonCode);
/**
@@ -750,7 +750,7 @@ EXTERN OOCallClearReason ooGetCallClearReasonFromCauseAndReasonCode
(enum Q931CauseValues cause, unsigned reasonCode);
/**
- * This function is used to retrieve the description text for a
+ * This function is used to retrieve the description text for a
* message type.
*
* @param msgType Message type.
@@ -775,8 +775,8 @@ EXTERN int ooSendStartH245Facility(struct OOH323CallData *call);
EXTERN int ooSendFSUpdate(struct OOH323CallData *call);
EXTERN int ooHandleFastStartChannels(struct OOH323CallData *pCall);
-/**
- * @}
+/**
+ * @}
*/
#ifdef __cplusplus
}
diff --git a/addons/ooh323c/src/ootrace.c b/addons/ooh323c/src/ootrace.c
index ba77e7fd1..3e097faa5 100644
--- a/addons/ooh323c/src/ootrace.c
+++ b/addons/ooh323c/src/ootrace.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.
*
*****************************************************************************/
@@ -47,7 +47,7 @@ void ooTrace(OOUINT32 traceLevel, const char * fmtspec, ...) {
if(traceLevel > gs_traceLevel) return;
va_start (arglist, fmtspec);
/* memset(logMessage, 0, MAXLOGMSGLEN);*/
- vsprintf(logMessage, fmtspec, arglist);
+ vsprintf(logMessage, fmtspec, arglist);
va_end(arglist);
ooTraceLogMessage(logMessage);
}
@@ -59,18 +59,18 @@ void ooTraceLogMessage(const char * logMessage)
static int lasttime=25;
int printDate =0;
static int printTime=1;
-
+
#ifdef _WIN32
-
+
SYSTEMTIME systemTime;
GetLocalTime(&systemTime);
- GetTimeFormat(LOCALE_SYSTEM_DEFAULT,0, &systemTime, "HH':'mm':'ss",
+ GetTimeFormat(LOCALE_SYSTEM_DEFAULT,0, &systemTime, "HH':'mm':'ss",
timeString, 100);
GetTimeFormat(LOCALE_SYSTEM_DEFAULT,0, &systemTime, "H", currtime, 3);
if(lasttime> atoi(currtime))
printDate=1;
lasttime = atoi(currtime);
-
+
#else
struct tm *ptime;
char dateString[10];
@@ -80,10 +80,10 @@ void ooTraceLogMessage(const char * logMessage)
strftime(currtime, 3, "%H", ptime);
if(lasttime>atoi(currtime))
printDate = 1;
- lasttime = atoi(currtime);
+ lasttime = atoi(currtime);
#endif
-
+
#ifdef _WIN32
if(printDate)
{
@@ -92,25 +92,25 @@ void ooTraceLogMessage(const char * logMessage)
systemTime.wMonth, systemTime.wDay, systemTime.wYear);
}
if(printTime) {
- fprintf(gH323ep.fptraceFile, "%s:%03d %s", timeString,
+ fprintf(gH323ep.fptraceFile, "%s:%03d %s", timeString,
systemTime.wMilliseconds, logMessage);
}
else
fprintf(gH323ep.fptraceFile, "%s", logMessage);
-
+
fflush(gH323ep.fptraceFile);
#else
if(printDate)
{
printDate = 0;
strftime(dateString, 10, "%d", ptime);
- fprintf(gH323ep.fptraceFile, "---------Date %s---------\n",
+ fprintf(gH323ep.fptraceFile, "---------Date %s---------\n",
dateString);
}
if(printTime) {
struct timeval systemTime;
gettimeofday(&systemTime, NULL);
- fprintf(gH323ep.fptraceFile, "%s:%03ld %s", timeString,
+ fprintf(gH323ep.fptraceFile, "%s:%03ld %s", timeString,
(long) systemTime.tv_usec/1000, logMessage);
}
else
@@ -118,7 +118,7 @@ void ooTraceLogMessage(const char * logMessage)
fflush(gH323ep.fptraceFile);
#endif
-
+
if(strchr(logMessage, '\n'))
printTime = 1;
else
@@ -131,4 +131,3 @@ int ooLogAsn1Error(int stat, const char * fname, int lno)
OOTRACEERR4("Asn1Error: %d at %s:%d\n", stat, fname, lno);
return stat;
}
-
diff --git a/addons/ooh323c/src/ootrace.h b/addons/ooh323c/src/ootrace.h
index 1f4e6c570..72b211913 100644
--- a/addons/ooh323c/src/ootrace.h
+++ b/addons/ooh323c/src/ootrace.h
@@ -1,21 +1,21 @@
/*
* 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.
*
*****************************************************************************/
/**
- * @file ootrace.h
+ * @file ootrace.h
* This file defines the trace functionality
*/
#include "ooCommon.h"
@@ -67,7 +67,7 @@
#define OOTRACEINFO4(a,b,c,d) ooTrace(OOTRCLVLINFO,a,b,c,d)
#define OOTRACEINFO5(a,b,c,d,e) ooTrace(OOTRCLVLINFO,a,b,c,d,e)
#define OOTRACEINFO6(a,b,c,d,e,f) ooTrace(OOTRCLVLINFO,a,b,c,d,e, f)
-#ifndef _COMPACT
+#ifndef _COMPACT
#define OOTRACEDBGA1(a) ooTrace(OOTRCLVLDBGA,a)
#define OOTRACEDBGA2(a,b) ooTrace(OOTRCLVLDBGA,a,b)
#define OOTRACEDBGA3(a,b,c) ooTrace(OOTRCLVLDBGA,a,b,c)
@@ -83,13 +83,13 @@
#define OOTRACEDBGC4(a,b,c,d) ooTrace(OOTRCLVLDBGC,a,b,c,d)
#define OOTRACEDBGC5(a,b,c,d,e) ooTrace(OOTRCLVLDBGC,a,b,c,d,e)
#else
-#define OOTRACEDBGA1(a)
+#define OOTRACEDBGA1(a)
#define OOTRACEDBGA2(a,b)
#define OOTRACEDBGA3(a,b,c)
#define OOTRACEDBGA4(a,b,c,d)
#define OOTRACEDBGA5(a,b,c,d,e)
#define OOTRACEDBGB1(a)
-#define OOTRACEDBGB2(a,b)
+#define OOTRACEDBGB2(a,b)
#define OOTRACEDBGB3(a,b,c)
#define OOTRACEDBGB4(a,b,c,d)
#define OOTRACEDBGC1(a)
@@ -113,11 +113,11 @@ extern "C" {
/**
* This function is used to set the trace level.
- * @param traceLevel New trace level. Various values are: OOTRCLVLERR,
+ * @param traceLevel New trace level. Various values are: OOTRCLVLERR,
* OOTRCLVLWARN, OOTRCLVLINFO, OOTRCLVLDBGA, OOTRCLVLDBGB,
* OOTRCLVLDBGC
*
- * @return None
+ * @return None
*/
EXTERN void ooSetTraceThreshold(OOUINT32 traceLevel);
@@ -126,7 +126,7 @@ EXTERN void ooSetTraceThreshold(OOUINT32 traceLevel);
*
* @param traceLevel Trace level for the message.
* @param fmtspec Printf style format spec.
- * @param ... Printf style variable list of arguments
+ * @param ... Printf style variable list of arguments
*
* @return - none
*/
diff --git a/addons/ooh323c/src/ootypes.h b/addons/ooh323c/src/ootypes.h
index 9583e9e1b..cc7cd7c36 100644
--- a/addons/ooh323c/src/ootypes.h
+++ b/addons/ooh323c/src/ootypes.h
@@ -1,50 +1,50 @@
/*
* 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.
*
*****************************************************************************/
-/*! \mainpage
+/*! \mainpage
* <H1>ooH323c Stack Functions</H1>
*
- * The <B>Objective Open H.323 for C (ooH323c)</B> protocol stack is an
- * open source applications program interface (API) for building H.323 based
- * applications. The stack implements Q.931/H.225 call signaling procedures,
- * H.245 logical channel operations, and Registration, Admission, and Status
+ * The <B>Objective Open H.323 for C (ooH323c)</B> protocol stack is an
+ * open source applications program interface (API) for building H.323 based
+ * applications. The stack implements Q.931/H.225 call signaling procedures,
+ * H.245 logical channel operations, and Registration, Admission, and Status
* (RAS) messaging for Gatekeeper communications.
*
* The categories of user functions provided are as follows:
* <UL>
- * <LI>Stack command functions. These are high level functions used to
- * initiate common H.323 telephony operations (for example, to make a
+ * <LI>Stack command functions. These are high level functions used to
+ * initiate common H.323 telephony operations (for example, to make a
* call).</LI>
- * <LI>Gatekeeper functions. These are high level functions for
+ * <LI>Gatekeeper functions. These are high level functions for
* managing communications with a gatekeeper using RAS messages.</LI>
- * <LI>H.323 endpoint management functions. These are function for
+ * <LI>H.323 endpoint management functions. These are function for
* used for managing the global H.323 endpoint.</LI>
- * <LI>Call management functions. These are functions used to manage
+ * <LI>Call management functions. These are functions used to manage
* active calls within the stack.</LI>
- * <LI>Capability management functions. These functions are used for
+ * <LI>Capability management functions. These functions are used for
* negotiating capabilities between two different terminals.</LI>
- * <LI>H.225 and H.245 message handling functions. Functions for
+ * <LI>H.225 and H.245 message handling functions. Functions for
* creating and handling H.323 standard ASN.1 messages.</LI>
- * <LI>Q.931 functions. Functions for the execution of various
+ * <LI>Q.931 functions. Functions for the execution of various
* standard Q.931 operations.</LI>
- * <LI>TCP/IP and UDP socket communication functions. Low-level
+ * <LI>TCP/IP and UDP socket communication functions. Low-level
* functions for writing data to and receiving data from sockets.</LI>
* </UL>
- */
+ */
/**
- * @file ootypes.h
+ * @file ootypes.h
* This file contains definitions of common constants and data structures.
*/
#ifndef _OOTYPES_H_
@@ -71,7 +71,7 @@
#endif /* MAKE_DLL */
#endif /* EXTERN */
-/**
+/**
* @defgroup ootypes Common type and constant definitions.
* @{
*/
@@ -86,7 +86,7 @@
*/
typedef enum OOMasterSlaveState {
OO_MasterSlave_Idle,
- OO_MasterSlave_DetermineSent,
+ OO_MasterSlave_DetermineSent,
OO_MasterSlave_AckReceived,
OO_MasterSlave_Master,
OO_MasterSlave_Slave
@@ -97,25 +97,25 @@ typedef enum OOMSAckStatus {
OO_msAck_remoteReceived
} OOMSAckStatus;
-/**
- * States defined for the capability exchange procedure.
+/**
+ * States defined for the capability exchange procedure.
*/
typedef enum {
- OO_LocalTermCapExchange_Idle,
- OO_LocalTermCapSetSent,
- OO_LocalTermCapSetAckRecvd,
- OO_RemoteTermCapExchange_Idle,
- OO_RemoteTermCapSetRecvd,
+ OO_LocalTermCapExchange_Idle,
+ OO_LocalTermCapSetSent,
+ OO_LocalTermCapSetAckRecvd,
+ OO_RemoteTermCapExchange_Idle,
+ OO_RemoteTermCapSetRecvd,
OO_RemoteTermCapSetAckSent
} OOCapExchangeState;
-/**
+/**
* Call clear reason codes.
*/
typedef enum OOCallClearReason {
- OO_REASON_UNKNOWN=0,
+ OO_REASON_UNKNOWN=0,
OO_REASON_INVALIDMESSAGE,
- OO_REASON_TRANSPORTFAILURE,
+ OO_REASON_TRANSPORTFAILURE,
OO_REASON_NOROUTE,
OO_REASON_NOUSER,
OO_REASON_NOBW,
@@ -125,10 +125,10 @@ typedef enum OOCallClearReason {
OO_REASON_GK_UNREACHABLE,
OO_REASON_GK_CLEARED,
OO_REASON_NOCOMMON_CAPABILITIES,
- OO_REASON_REMOTE_FWDED,
+ OO_REASON_REMOTE_FWDED,
OO_REASON_LOCAL_FWDED,
- OO_REASON_REMOTE_CLEARED,
- OO_REASON_LOCAL_CLEARED,
+ OO_REASON_REMOTE_CLEARED,
+ OO_REASON_LOCAL_CLEARED,
OO_REASON_REMOTE_BUSY,
OO_REASON_LOCAL_BUSY,
OO_REASON_REMOTE_NOANSWER,
@@ -241,8 +241,8 @@ typedef enum OOCallMode {
/*TODO: Should add caller-id, callername etc. So that they can be changed per
call basis*/
/**
- * This structure defines options that can be set at the level of an
- * individual call. They override options set in the H.323 endpoint
+ * This structure defines options that can be set at the level of an
+ * individual call. They override options set in the H.323 endpoint
* structure.
*/
typedef struct ooCallOptions {
@@ -252,7 +252,7 @@ typedef struct ooCallOptions {
OOCallMode callMode; /*!< Type of channel to setup with FastStart */
int transfercap; /* q931 cap */
}ooCallOptions;
-
+
struct OOH323CallData;
@@ -266,4 +266,3 @@ typedef struct ooTimerCallback{
* @}
*/
#endif
-
diff --git a/addons/ooh323c/src/perutil.c b/addons/ooh323c/src/perutil.c
index 75368279a..9d6c4618a 100644
--- a/addons/ooh323c/src/perutil.c
+++ b/addons/ooh323c/src/perutil.c
@@ -1,15 +1,15 @@
/*
* Copyright (C) 1997-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.
*
*****************************************************************************/
@@ -23,7 +23,7 @@
ASN1BOOL isExtendableSize (Asn1SizeCnst* pSizeList);
static ASN1BOOL isFixedSize (Asn1SizeCnst* pSizeList);
-ASN1BOOL alignCharStr
+ASN1BOOL alignCharStr
(OOCTXT* pctxt, ASN1UINT len, ASN1UINT nbits, Asn1SizeCnst* pSize)
{
if (TRUE) {
@@ -59,16 +59,16 @@ ASN1BOOL alignCharStr
return FALSE;
}
-int bitAndOctetStringAlignmentTest (Asn1SizeCnst* pSizeList,
- ASN1UINT itemCount,
+int bitAndOctetStringAlignmentTest (Asn1SizeCnst* pSizeList,
+ ASN1UINT itemCount,
ASN1BOOL bitStrFlag,
ASN1BOOL* pAlignFlag)
{
ASN1UINT threshold = (bitStrFlag) ? 16 : 2;
- if (pSizeList == 0 || itemCount > threshold)
+ if (pSizeList == 0 || itemCount > threshold)
*pAlignFlag = TRUE;
- else if (isFixedSize(pSizeList))
+ else if (isFixedSize(pSizeList))
*pAlignFlag = FALSE;
else {
@@ -91,8 +91,8 @@ int bitAndOctetStringAlignmentTest (Asn1SizeCnst* pSizeList,
return (ASN_OK);
}
-Asn1SizeCnst* checkSize (Asn1SizeCnst* pSizeList,
- ASN1UINT value,
+Asn1SizeCnst* checkSize (Asn1SizeCnst* pSizeList,
+ ASN1UINT value,
ASN1BOOL* pExtendable)
{
Asn1SizeCnst* lpSize = pSizeList;
@@ -132,7 +132,7 @@ int addSizeConstraint (OOCTXT* pctxt, Asn1SizeCnst* pSize)
lpSize = pSize;
while (lpSize) {
if (pctxt->pSizeConstraint->lower <= lpSize->lower ||
- pctxt->pSizeConstraint->upper >= lpSize->upper)
+ pctxt->pSizeConstraint->upper >= lpSize->upper)
{
/* Set the extension flag to the value of the size */
/* constraint structure that the item falls within.. */
@@ -196,32 +196,32 @@ int checkSizeConstraint(OOCTXT* pctxt, int size)
}
ASN1UINT getUIntBitCount (ASN1UINT value)
-{
+{
/* Binary search - decision tree (5 tests, rarely 6) */
return
((value < 1<<15) ?
((value < 1<<7) ?
((value < 1<<3) ?
- ((value < 1<<1) ? ((value < 1<<0) ? 0 : 1) :
+ ((value < 1<<1) ? ((value < 1<<0) ? 0 : 1) :
((value < 1<<2) ? 2 : 3)) :
- ((value < 1<<5) ? ((value < 1<<4) ? 4 : 5) :
+ ((value < 1<<5) ? ((value < 1<<4) ? 4 : 5) :
((value < 1<<6) ? 6 : 7))) :
((value < 1<<11) ?
- ((value < 1<<9) ? ((value < 1<<8) ? 8 : 9) :
+ ((value < 1<<9) ? ((value < 1<<8) ? 8 : 9) :
((value < 1<<10) ? 10 : 11)) :
- ((value < 1<<13) ? ((value < 1<<12) ? 12 : 13) :
+ ((value < 1<<13) ? ((value < 1<<12) ? 12 : 13) :
((value < 1<<14) ? 14 : 15)))) :
((value < 1<<23) ?
((value < 1<<19) ?
- ((value < 1<<17) ? ((value < 1<<16) ? 16 : 17) :
+ ((value < 1<<17) ? ((value < 1<<16) ? 16 : 17) :
((value < 1<<18) ? 18 : 19)) :
- ((value < 1<<21) ? ((value < 1<<20) ? 20 : 21) :
+ ((value < 1<<21) ? ((value < 1<<20) ? 20 : 21) :
((value < 1<<22) ? 22 : 23))) :
((value < 1<<27) ?
- ((value < 1<<25) ? ((value < 1<<24) ? 24 : 25) :
+ ((value < 1<<25) ? ((value < 1<<24) ? 24 : 25) :
((value < 1<<26) ? 26 : 27)) :
- ((value < 1<<29) ? ((value < 1<<28) ? 28 : 29) :
- ((value < 1<<30) ? 30 :
+ ((value < 1<<29) ? ((value < 1<<28) ? 28 : 29) :
+ ((value < 1<<30) ? 30 :
((value < 1UL<<31) ? 31 : 32))))));
}
@@ -257,7 +257,7 @@ static ASN1BOOL isFixedSize (Asn1SizeCnst* pSizeList)
return FALSE;
}
-void set16BitCharSet
+void set16BitCharSet
(OOCTXT* pctxt, Asn116BitCharSet* pCharSet, Asn116BitCharSet* pAlphabet)
{
/* Permitted alphabet range can either be specified as a range of */
@@ -267,7 +267,7 @@ void set16BitCharSet
int nocts = pAlphabet->charSet.nchars * 2;
pCharSet->charSet.nchars = pAlphabet->charSet.nchars;
- pCharSet->charSet.data =
+ pCharSet->charSet.data =
(ASN116BITCHAR*) ASN1MALLOC (pctxt, nocts);
if (pCharSet->charSet.data != NULL)
@@ -286,4 +286,3 @@ void set16BitCharSet
pCharSet->alignedBits <<= 1;
}
-
diff --git a/addons/ooh323c/src/printHandler.c b/addons/ooh323c/src/printHandler.c
index 953f17f31..b94c446ee 100644
--- a/addons/ooh323c/src/printHandler.c
+++ b/addons/ooh323c/src/printHandler.c
@@ -1,20 +1,20 @@
/*
* 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.
*
*****************************************************************************/
-/* This is an implementation of a simple print handler. It outputs
- the fields of an encoded PER message to stdout in a structured output
+/* This is an implementation of a simple print handler. It outputs
+ the fields of an encoded PER message to stdout in a structured output
format..
*/
#include "asterisk.h"
@@ -36,10 +36,10 @@ AST_MUTEX_DEFINE_STATIC(printlock);
static const char* pVarName;
static int gIndentSpaces;
-static const char* bitStrToString
+static const char* bitStrToString
(ASN1UINT numbits, const ASN1OCTET* data, char* buffer, size_t bufsiz);
-static const char* octStrToString
+static const char* octStrToString
(ASN1UINT numocts, const ASN1OCTET* data, char* buffer, size_t bufsiz);
void printCharStr32BitValue (ASN1UINT nchars, ASN132BITCHAR* data);
@@ -232,7 +232,7 @@ void printOpenTypeValue (ASN1UINT numocts, const ASN1OCTET* data)
OOTRACEDBGB1 ("< encoded data >\n");
}
-static const char* bitStrToString
+static const char* bitStrToString
(ASN1UINT numbits, const ASN1OCTET* data, char* buffer, size_t bufsiz)
{
size_t i;
@@ -258,7 +258,7 @@ static const char* bitStrToString
return buffer;
}
-static const char* octStrToString
+static const char* octStrToString
(ASN1UINT numocts, const ASN1OCTET* data, char* buffer, size_t bufsiz)
{
size_t i;
diff --git a/addons/ooh323c/src/printHandler.h b/addons/ooh323c/src/printHandler.h
index 73f225b1f..4c6d4e18f 100644
--- a/addons/ooh323c/src/printHandler.h
+++ b/addons/ooh323c/src/printHandler.h
@@ -1,22 +1,22 @@
/*
* 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.
*
*****************************************************************************/
/**
- @file printHandler.h
- This is an implementation of a simple print handler. It outputs
- the fields of an encoded PER message to stdout in a structured output
+ @file printHandler.h
+ This is an implementation of a simple print handler. It outputs
+ the fields of an encoded PER message to stdout in a structured output
format..
*/
diff --git a/addons/ooh323c/src/rtctype.c b/addons/ooh323c/src/rtctype.c
index 8dfe4e3fa..60f7d898b 100644
--- a/addons/ooh323c/src/rtctype.c
+++ b/addons/ooh323c/src/rtctype.c
@@ -1,15 +1,15 @@
/*
* Copyright (C) 1997-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.
*
*****************************************************************************/
diff --git a/addons/ooh323c/src/rtctype.h b/addons/ooh323c/src/rtctype.h
index ebb0a59b4..4ab96807c 100644
--- a/addons/ooh323c/src/rtctype.h
+++ b/addons/ooh323c/src/rtctype.h
@@ -1,21 +1,21 @@
/*
* Copyright (C) 1997-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.
*
*****************************************************************************/
-/**
- * @file rtctype.h
+/**
+ * @file rtctype.h
*/
#ifndef _RTCTYPE_H_
#define _RTCTYPE_H_
@@ -83,4 +83,3 @@ extern EXTERN const ASN1OCTET rtCtypeTable[256];
#endif
#endif /* _RTCTYPE_H_ */
-
diff --git a/addons/ooh323cDriver.c b/addons/ooh323cDriver.c
index 3096d1e07..3ec8fe1d3 100644
--- a/addons/ooh323cDriver.c
+++ b/addons/ooh323cDriver.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.
*
*****************************************************************************/
@@ -116,7 +116,7 @@ void* ooh323c_call_thread(void* dummy)
} while (mycthread->call != NULL && res >= 0);
-
+
ast_mutex_destroy(&mycthread->lock);
close(mycthread->thePipe[0]);
@@ -240,10 +240,10 @@ int ooh323c_set_capability
if (gH323Debug) {
ast_verb(0, "\tAdding g711 ulaw capability to H323 endpoint\n");
}
- ret= ooH323EpAddG711Capability(OO_G711ULAW64K, gtxframes, grxframes,
+ ret= ooH323EpAddG711Capability(OO_G711ULAW64K, gtxframes, grxframes,
OORXANDTX, &ooh323c_start_receive_channel,
&ooh323c_start_transmit_channel,
- &ooh323c_stop_receive_channel,
+ &ooh323c_stop_receive_channel,
&ooh323c_stop_transmit_channel);
}
if(ast_format_cmp(format, ast_format_alaw) == AST_FORMAT_CMP_EQUAL)
@@ -251,10 +251,10 @@ int ooh323c_set_capability
if (gH323Debug) {
ast_verb(0, "\tAdding g711 alaw capability to H323 endpoint\n");
}
- ret= ooH323EpAddG711Capability(OO_G711ALAW64K, gtxframes, grxframes,
+ ret= ooH323EpAddG711Capability(OO_G711ALAW64K, gtxframes, grxframes,
OORXANDTX, &ooh323c_start_receive_channel,
&ooh323c_start_transmit_channel,
- &ooh323c_stop_receive_channel,
+ &ooh323c_stop_receive_channel,
&ooh323c_stop_transmit_channel);
}
@@ -263,27 +263,27 @@ int ooh323c_set_capability
if (gH323Debug) {
ast_verb(0, "\tAdding g729A capability to H323 endpoint\n");
}
- ret = ooH323EpAddG729Capability(OO_G729A, 2, 24,
+ ret = ooH323EpAddG729Capability(OO_G729A, 2, 24,
OORXANDTX, &ooh323c_start_receive_channel,
&ooh323c_start_transmit_channel,
- &ooh323c_stop_receive_channel,
+ &ooh323c_stop_receive_channel,
&ooh323c_stop_transmit_channel);
if (gH323Debug) {
ast_verb(0, "\tAdding g729 capability to H323 endpoint\n");
}
- ret |= ooH323EpAddG729Capability(OO_G729, 2, 24,
+ ret |= ooH323EpAddG729Capability(OO_G729, 2, 24,
OORXANDTX, &ooh323c_start_receive_channel,
&ooh323c_start_transmit_channel,
- &ooh323c_stop_receive_channel,
+ &ooh323c_stop_receive_channel,
&ooh323c_stop_transmit_channel);
if (gH323Debug) {
ast_verb(0, "\tAdding g729b capability to H323 endpoint\n");
}
- ret |= ooH323EpAddG729Capability(OO_G729B, 2, 24,
+ ret |= ooH323EpAddG729Capability(OO_G729B, 2, 24,
OORXANDTX, &ooh323c_start_receive_channel,
&ooh323c_start_transmit_channel,
- &ooh323c_stop_receive_channel,
+ &ooh323c_stop_receive_channel,
&ooh323c_stop_transmit_channel);
}
@@ -292,10 +292,10 @@ int ooh323c_set_capability
if (gH323Debug) {
ast_verb(0, "\tAdding g7231 capability to H323 endpoint\n");
}
- ret = ooH323EpAddG7231Capability(OO_G7231, 1, 1, FALSE,
+ ret = ooH323EpAddG7231Capability(OO_G7231, 1, 1, FALSE,
OORXANDTX, &ooh323c_start_receive_channel,
&ooh323c_start_transmit_channel,
- &ooh323c_stop_receive_channel,
+ &ooh323c_stop_receive_channel,
&ooh323c_stop_transmit_channel);
}
@@ -305,10 +305,10 @@ int ooh323c_set_capability
if (gH323Debug) {
ast_verb(0, "\tAdding g726 capability to H323 endpoint\n");
}
- ret = ooH323EpAddG726Capability(OO_G726, gtxframes, grxframes, FALSE,
+ ret = ooH323EpAddG726Capability(OO_G726, gtxframes, grxframes, FALSE,
OORXANDTX, &ooh323c_start_receive_channel,
&ooh323c_start_transmit_channel,
- &ooh323c_stop_receive_channel,
+ &ooh323c_stop_receive_channel,
&ooh323c_stop_transmit_channel);
}
@@ -318,10 +318,10 @@ int ooh323c_set_capability
if (gH323Debug) {
ast_verb(0, "\tAdding g726aal2 capability to H323 endpoint\n");
}
- ret = ooH323EpAddG726Capability(OO_G726AAL2, gtxframes, grxframes, FALSE,
+ ret = ooH323EpAddG726Capability(OO_G726AAL2, gtxframes, grxframes, FALSE,
OORXANDTX, &ooh323c_start_receive_channel,
&ooh323c_start_transmit_channel,
- &ooh323c_stop_receive_channel,
+ &ooh323c_stop_receive_channel,
&ooh323c_stop_transmit_channel);
}
@@ -331,10 +331,10 @@ int ooh323c_set_capability
if (gH323Debug) {
ast_verb(0, "\tAdding h263 capability to H323 endpoint\n");
}
- ret = ooH323EpAddH263VideoCapability(OO_H263VIDEO, 1, 0, 0, 0, 0, 320*1024,
+ ret = ooH323EpAddH263VideoCapability(OO_H263VIDEO, 1, 0, 0, 0, 0, 320*1024,
OORXANDTX, &ooh323c_start_receive_channel,
&ooh323c_start_transmit_channel,
- &ooh323c_stop_receive_channel,
+ &ooh323c_stop_receive_channel,
&ooh323c_stop_transmit_channel);
}
@@ -344,10 +344,10 @@ int ooh323c_set_capability
if (gH323Debug) {
ast_verb(0, "\tAdding gsm capability to H323 endpoint\n");
}
- ret = ooH323EpAddGSMCapability(OO_GSMFULLRATE, 4, FALSE, FALSE,
+ ret = ooH323EpAddGSMCapability(OO_GSMFULLRATE, 4, FALSE, FALSE,
OORXANDTX, &ooh323c_start_receive_channel,
&ooh323c_start_transmit_channel,
- &ooh323c_stop_receive_channel,
+ &ooh323c_stop_receive_channel,
&ooh323c_stop_transmit_channel);
}
@@ -357,17 +357,17 @@ int ooh323c_set_capability
if (gH323Debug) {
ast_verb(0, "\tAdding speex capability to H323 endpoint\n");
}
- ret = ooH323EpAddSpeexCapability(OO_SPEEX, 4, 4, FALSE,
+ ret = ooH323EpAddSpeexCapability(OO_SPEEX, 4, 4, FALSE,
OORXANDTX, &ooh323c_start_receive_channel,
&ooh323c_start_transmit_channel,
- &ooh323c_stop_receive_channel,
+ &ooh323c_stop_receive_channel,
&ooh323c_stop_transmit_channel);
}
- ao2_ref(format, -1);
+ ao2_ref(format, -1);
}
-
+
if(dtmf & H323_DTMF_CISCO)
ret |= ooH323EpEnableDTMFCISCO(0);
if(dtmf & H323_DTMF_RFC2833)
@@ -386,7 +386,7 @@ int ooh323c_set_capability_for_call
{
int ret = 0, x, txframes;
if (gH323Debug) {
- ast_verb(0, "\tAdding capabilities to call(%s, %s)\n", call->callType,
+ ast_verb(0, "\tAdding capabilities to call(%s, %s)\n", call->callType,
call->callToken);
}
if(dtmf & H323_DTMF_CISCO || 1)
@@ -399,7 +399,7 @@ int ooh323c_set_capability_for_call
ret |= ooCallEnableDTMFH245Signal(call);
if (t38support)
- ooCapabilityAddT38Capability(call, OO_T38, OORXANDTX,
+ ooCapabilityAddT38Capability(call, OO_T38, OORXANDTX,
&ooh323c_start_receive_datachannel,
&ooh323c_start_transmit_datachannel,
&ooh323c_stop_receive_datachannel,
@@ -412,15 +412,15 @@ int ooh323c_set_capability_for_call
if(ast_format_cmp(format, ast_format_ulaw) == AST_FORMAT_CMP_EQUAL)
{
if (gH323Debug) {
- ast_verb(0, "\tAdding g711 ulaw capability to call(%s, %s)\n",
+ ast_verb(0, "\tAdding g711 ulaw capability to call(%s, %s)\n",
call->callType, call->callToken);
}
txframes = ast_format_cap_get_format_framing(cap, format);
- ret= ooCallAddG711Capability(call, OO_G711ULAW64K, txframes,
- txframes, OORXANDTX,
+ ret= ooCallAddG711Capability(call, OO_G711ULAW64K, txframes,
+ txframes, OORXANDTX,
&ooh323c_start_receive_channel,
&ooh323c_start_transmit_channel,
- &ooh323c_stop_receive_channel,
+ &ooh323c_stop_receive_channel,
&ooh323c_stop_transmit_channel);
}
if(ast_format_cmp(format, ast_format_alaw) == AST_FORMAT_CMP_EQUAL)
@@ -430,11 +430,11 @@ int ooh323c_set_capability_for_call
call->callType, call->callToken);
}
txframes = ast_format_cap_get_format_framing(cap, format);
- ret= ooCallAddG711Capability(call, OO_G711ALAW64K, txframes,
- txframes, OORXANDTX,
+ ret= ooCallAddG711Capability(call, OO_G711ALAW64K, txframes,
+ txframes, OORXANDTX,
&ooh323c_start_receive_channel,
&ooh323c_start_transmit_channel,
- &ooh323c_stop_receive_channel,
+ &ooh323c_stop_receive_channel,
&ooh323c_stop_transmit_channel);
}
@@ -448,7 +448,7 @@ int ooh323c_set_capability_for_call
ret = ooCallAddG726Capability(call, OO_G726, txframes, grxframes, FALSE,
OORXANDTX, &ooh323c_start_receive_channel,
&ooh323c_start_transmit_channel,
- &ooh323c_stop_receive_channel,
+ &ooh323c_stop_receive_channel,
&ooh323c_stop_transmit_channel);
}
@@ -463,23 +463,23 @@ int ooh323c_set_capability_for_call
ret = ooCallAddG726Capability(call, OO_G726AAL2, txframes, grxframes, FALSE,
OORXANDTX, &ooh323c_start_receive_channel,
&ooh323c_start_transmit_channel,
- &ooh323c_stop_receive_channel,
+ &ooh323c_stop_receive_channel,
&ooh323c_stop_transmit_channel);
}
if(ast_format_cmp(format, ast_format_g729) == AST_FORMAT_CMP_EQUAL)
{
-
+
txframes = (ast_format_cap_get_format_framing(cap, format))/10;
if (gH323Debug) {
ast_verb(0, "\tAdding g729A capability to call(%s, %s)\n",
call->callType, call->callToken);
}
- ret= ooCallAddG729Capability(call, OO_G729A, txframes, txframes,
+ ret= ooCallAddG729Capability(call, OO_G729A, txframes, txframes,
OORXANDTX, &ooh323c_start_receive_channel,
&ooh323c_start_transmit_channel,
- &ooh323c_stop_receive_channel,
+ &ooh323c_stop_receive_channel,
&ooh323c_stop_transmit_channel);
if (g729onlyA)
continue;
@@ -487,19 +487,19 @@ int ooh323c_set_capability_for_call
ast_verb(0, "\tAdding g729 capability to call(%s, %s)\n",
call->callType, call->callToken);
}
- ret|= ooCallAddG729Capability(call, OO_G729, txframes, txframes,
+ ret|= ooCallAddG729Capability(call, OO_G729, txframes, txframes,
OORXANDTX, &ooh323c_start_receive_channel,
&ooh323c_start_transmit_channel,
- &ooh323c_stop_receive_channel,
+ &ooh323c_stop_receive_channel,
&ooh323c_stop_transmit_channel);
if (gH323Debug) {
ast_verb(0, "\tAdding g729B capability to call(%s, %s)\n",
call->callType, call->callToken);
}
- ret|= ooCallAddG729Capability(call, OO_G729B, txframes, txframes,
+ ret|= ooCallAddG729Capability(call, OO_G729B, txframes, txframes,
OORXANDTX, &ooh323c_start_receive_channel,
&ooh323c_start_transmit_channel,
- &ooh323c_stop_receive_channel,
+ &ooh323c_stop_receive_channel,
&ooh323c_stop_transmit_channel);
}
@@ -510,10 +510,10 @@ int ooh323c_set_capability_for_call
ast_verb(0, "\tAdding g7231 capability to call (%s, %s)\n",
call->callType, call->callToken);
}
- ret = ooCallAddG7231Capability(call, OO_G7231, 1, 1, FALSE,
+ ret = ooCallAddG7231Capability(call, OO_G7231, 1, 1, FALSE,
OORXANDTX, &ooh323c_start_receive_channel,
&ooh323c_start_transmit_channel,
- &ooh323c_stop_receive_channel,
+ &ooh323c_stop_receive_channel,
&ooh323c_stop_transmit_channel);
}
@@ -524,10 +524,10 @@ int ooh323c_set_capability_for_call
ast_verb(0, "\tAdding h263 capability to call (%s, %s)\n",
call->callType, call->callToken);
}
- ret = ooCallAddH263VideoCapability(call, OO_H263VIDEO, 1, 0, 0, 0, 0, 320*1024,
+ ret = ooCallAddH263VideoCapability(call, OO_H263VIDEO, 1, 0, 0, 0, 0, 320*1024,
OORXANDTX, &ooh323c_start_receive_channel,
&ooh323c_start_transmit_channel,
- &ooh323c_stop_receive_channel,
+ &ooh323c_stop_receive_channel,
&ooh323c_stop_transmit_channel);
}
@@ -535,26 +535,26 @@ int ooh323c_set_capability_for_call
if(ast_format_cmp(format, ast_format_gsm) == AST_FORMAT_CMP_EQUAL)
{
if (gH323Debug) {
- ast_verb(0, "\tAdding gsm capability to call(%s, %s)\n",
+ ast_verb(0, "\tAdding gsm capability to call(%s, %s)\n",
call->callType, call->callToken);
}
- ret = ooCallAddGSMCapability(call, OO_GSMFULLRATE, 4, FALSE, FALSE,
+ ret = ooCallAddGSMCapability(call, OO_GSMFULLRATE, 4, FALSE, FALSE,
OORXANDTX, &ooh323c_start_receive_channel,
&ooh323c_start_transmit_channel,
- &ooh323c_stop_receive_channel,
+ &ooh323c_stop_receive_channel,
&ooh323c_stop_transmit_channel);
}
if(ast_format_cmp(format, ast_format_speex) == AST_FORMAT_CMP_EQUAL)
{
if (gH323Debug) {
- ast_verb(0, "\tAdding Speex capability to call(%s, %s)\n",
+ ast_verb(0, "\tAdding Speex capability to call(%s, %s)\n",
call->callType, call->callToken);
}
- ret = ooCallAddSpeexCapability(call, OO_SPEEX, 4, 4, FALSE,
+ ret = ooCallAddSpeexCapability(call, OO_SPEEX, 4, 4, FALSE,
OORXANDTX, &ooh323c_start_receive_channel,
&ooh323c_start_transmit_channel,
- &ooh323c_stop_receive_channel,
+ &ooh323c_stop_receive_channel,
&ooh323c_stop_transmit_channel);
}
@@ -569,7 +569,7 @@ int ooh323c_set_aliases(ooAliases * aliases)
while(cur)
{
switch(cur->type)
- {
+ {
case T_H225AliasAddress_dialedDigits:
ooH323EpAddAliasDialedDigits(cur->value);
break;
@@ -589,7 +589,7 @@ int ooh323c_set_aliases(ooAliases * aliases)
}
return 1;
}
-
+
int ooh323c_start_receive_channel(ooCallData *call, ooLogicalChannel *pChannel)
{
struct ast_format *tmpfmt = NULL;
@@ -694,5 +694,3 @@ struct ast_format *convertH323CapToAsteriskCap(int cap)
return NULL;
}
-
-
diff --git a/addons/ooh323cDriver.h b/addons/ooh323cDriver.h
index 98198019a..333f01f33 100644
--- a/addons/ooh323cDriver.h
+++ b/addons/ooh323cDriver.h
@@ -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.
*
*****************************************************************************/
diff --git a/addons/res_config_mysql.c b/addons/res_config_mysql.c
index b080d118b..43ca5fcf7 100644
--- a/addons/res_config_mysql.c
+++ b/addons/res_config_mysql.c
@@ -447,7 +447,7 @@ static struct ast_config *realtime_multi_mysql(const char *database, const char
release_database(dbh);
return NULL;
}
-
+
if (!(cfg = ast_config_new())) {
/* If I can't alloc memory at this point, why bother doing anything else? */
ast_log(LOG_WARNING, "Out of memory!\n");
@@ -749,7 +749,7 @@ static int update2_mysql(const char *database, const char *tablename, const stru
return (int)numrows;
}
-
+
static int store_mysql(const char *database, const char *table, const struct ast_variable *rt_fields)
{
struct mysql_conn *dbh;
@@ -873,7 +873,7 @@ static int destroy_mysql(const char *database, const char *table, const char *ke
return (int)numrows;
}
-
+
static struct ast_config *config_mysql(const char *database, const char *table, const char *file, struct ast_config *cfg, struct ast_flags config_flags, const char *unused, const char *who_asked)
{
struct mysql_conn *dbh;
@@ -1561,4 +1561,3 @@ AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_LOAD_ORDER, "MySQL RealTime Config
.reload = reload,
.load_pri = AST_MODPRI_REALTIME_DRIVER,
);
-