[asterisk-commits] pcadach: branch pcadach/chan_h323-live r43069 -
/team/pcadach/chan_h323-live/...
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Sun Sep 17 06:38:24 MST 2006
Author: pcadach
Date: Sun Sep 17 08:38:23 2006
New Revision: 43069
URL: http://svn.digium.com/view/asterisk?rev=43069&view=rev
Log:
Remove un-necessary variable (usingGk == \!gatekeeper_disable)
Modified:
team/pcadach/chan_h323-live/channels/chan_h323.c
Modified: team/pcadach/chan_h323-live/channels/chan_h323.c
URL: http://svn.digium.com/view/asterisk/team/pcadach/chan_h323-live/channels/chan_h323.c?rev=43069&r1=43068&r2=43069&view=diff
==============================================================================
--- team/pcadach/chan_h323-live/channels/chan_h323.c (original)
+++ team/pcadach/chan_h323-live/channels/chan_h323.c Sun Sep 17 08:38:23 2006
@@ -144,7 +144,6 @@
static char gatekeeper[100];
static int gatekeeper_disable = 1;
static int gatekeeper_discover = 0;
-static int usingGk = 0;
static int gkroute = 0;
/* Find user by alias (h.323 id) is default, alternative is the incomming call's source IP address*/
static int userbyalias = 1;
@@ -596,7 +595,7 @@
return -1;
}
ast_mutex_lock(&pvt->lock);
- if (usingGk) {
+ if (!gatekeeper_disable) {
if (ast_strlen_zero(pvt->exten)) {
strncpy(called_addr, dest, sizeof(called_addr));
} else {
@@ -1720,7 +1719,7 @@
if (h323debug)
ast_log(LOG_DEBUG, "Extension: %s Host: %s\n", pvt->exten, host);
- if (!usingGk) {
+ if (gatekeeper_disable) {
if (create_addr(pvt, host)) {
oh323_destroy(pvt);
return NULL;
@@ -2086,7 +2085,7 @@
}
/* Decide if we are allowing Gatekeeper routed calls*/
- if ((!strcasecmp(cd->sourceIp, gatekeeper)) && (gkroute == -1) && (usingGk)) {
+ if ((!strcasecmp(cd->sourceIp, gatekeeper)) && (gkroute == -1) && !gatekeeper_disable) {
if (!ast_strlen_zero(cd->call_dest_e164)) {
strncpy(pvt->exten, cd->call_dest_e164, sizeof(pvt->exten) - 1);
strncpy(pvt->context, default_context, sizeof(pvt->context) - 1);
@@ -2648,7 +2647,6 @@
h323_signalling_port = 1720;
gatekeeper_disable = 1;
gatekeeper_discover = 0;
- usingGk = 0;
gkroute = 0;
userbyalias = 1;
tos = 0;
@@ -2712,14 +2710,11 @@
} else if (!strcasecmp(v->name, "gatekeeper")) {
if (!strcasecmp(v->value, "DISABLE")) {
gatekeeper_disable = 1;
- usingGk = 0;
} else if (!strcasecmp(v->value, "DISCOVER")) {
gatekeeper_disable = 0;
gatekeeper_discover = 1;
- usingGk = 1;
} else {
gatekeeper_disable = 0;
- usingGk = 1;
strncpy(gatekeeper, v->value, sizeof(gatekeeper) - 1);
}
} else if (!strcasecmp(v->name, "secret")) {
@@ -2809,7 +2804,6 @@
if (h323_set_gk(gatekeeper_discover, gatekeeper, secret)) {
ast_log(LOG_ERROR, "Gatekeeper registration failed.\n");
gatekeeper_disable = 1;
- usingGk = 0;
}
}
}
@@ -3060,7 +3054,6 @@
if (h323_set_gk(gatekeeper_discover, gatekeeper, secret)) {
ast_log(LOG_ERROR, "Gatekeeper registration failed.\n");
gatekeeper_disable = 1;
- usingGk = 0;
return AST_MODULE_LOAD_SUCCESS;
}
}
More information about the asterisk-commits
mailing list