Update of /usr/cvsroot/asterisk/pbx
In directory mongoose.digium.com:/tmp/cvs-serv14656/pbx
Modified Files:
pbx_ael.c pbx_dundi.c pbx_loopback.c pbx_realtime.c
Log Message:
issue #5648
Index: pbx_ael.c
===================================================================
RCS file: /usr/cvsroot/asterisk/pbx/pbx_ael.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- pbx_ael.c 26 Oct 2005 18:03:44 -0000 1.16
+++ pbx_ael.c 8 Nov 2005 01:55:30 -0000 1.17
@@ -496,7 +496,7 @@
data = c;
data = ast_skip_blanks(data);
}
- if (!data || ast_strlen_zero(data))
+ if (ast_strlen_zero(data))
return 0;
if (matches_keyword(data, "switch")) {
fillin = NULL;
Index: pbx_dundi.c
===================================================================
RCS file: /usr/cvsroot/asterisk/pbx/pbx_dundi.c,v
retrieving revision 1.47
retrieving revision 1.48
diff -u -d -r1.47 -r1.48
--- pbx_dundi.c 6 Nov 2005 15:09:47 -0000 1.47
+++ pbx_dundi.c 8 Nov 2005 01:55:30 -0000 1.48
@@ -1568,7 +1568,7 @@
if (cmd == DUNDI_COMMAND_EIDQUERY) {
res = dundi_answer_entity(trans, &ies,
ies.called_context);
} else {
- if (!ies.called_number ||
ast_strlen_zero(ies.called_number)) {
+ if (ast_strlen_zero(ies.called_number))
{
/* They're not permitted to
access that context */
dundi_ie_append_cause(&ied,
DUNDI_IE_CAUSE, DUNDI_CAUSE_GENERAL, "Invalid or missing number/entity");
dundi_send(trans, resp, 0, 1,
&ied);
@@ -3872,7 +3872,7 @@
dep_warning = 1;
}
- if (!data || ast_strlen_zero(data)) {
+ if (ast_strlen_zero(data)) {
ast_log(LOG_WARNING, "DUNDiLookup requires an argument
(number)\n");
LOCAL_USER_REMOVE(u);
return 0;
@@ -3898,7 +3898,7 @@
}
}
- if (!context || ast_strlen_zero(context))
+ if (ast_strlen_zero(context))
context = "e164";
results = dundi_lookup(dr, MAX_RESULTS, NULL, context, num, bypass);
@@ -3934,7 +3934,7 @@
buf[0] = '\0';
- if (!data || ast_strlen_zero(data)) {
+ if (ast_strlen_zero(data)) {
ast_log(LOG_WARNING, "DUNDILOOKUP requires an argument
(number)\n");
LOCAL_USER_REMOVE(u);
return buf;
@@ -3960,7 +3960,7 @@
}
}
- if (!context || ast_strlen_zero(context))
+ if (ast_strlen_zero(context))
context = "e164";
results = dundi_lookup(dr, MAX_RESULTS, NULL, context, num, bypass);
@@ -4447,19 +4447,19 @@
/* If done as a macro, use macro extension */
if (!strcasecmp(exten, "s")) {
exten = pbx_builtin_getvar_helper(chan, "ARG1");
- if (!exten || ast_strlen_zero(exten))
+ if (ast_strlen_zero(exten))
exten = chan->macroexten;
- if (!exten || ast_strlen_zero(exten))
+ if (ast_strlen_zero(exten))
exten = chan->exten;
- if (!exten || ast_strlen_zero(exten)) {
+ if (ast_strlen_zero(exten)) {
ast_log(LOG_WARNING, "Called in Macro mode with
no ARG1 or MACRO_EXTEN?\n");
return -1;
}
}
- if (!data || ast_strlen_zero(data))
+ if (ast_strlen_zero(data))
data = "e164";
} else {
- if (!data || ast_strlen_zero(data))
+ if (ast_strlen_zero(data))
data = context;
}
res = dundi_lookup(results, MAX_RESULTS, chan, data, exten, 0);
@@ -4498,19 +4498,19 @@
/* If done as a macro, use macro extension */
if (!strcasecmp(exten, "s")) {
exten = pbx_builtin_getvar_helper(chan, "ARG1");
- if (!exten || ast_strlen_zero(exten))
+ if (ast_strlen_zero(exten))
exten = chan->macroexten;
- if (!exten || ast_strlen_zero(exten))
+ if (ast_strlen_zero(exten))
exten = chan->exten;
- if (!exten || ast_strlen_zero(exten)) {
+ if (ast_strlen_zero(exten)) {
ast_log(LOG_WARNING, "Called in Macro mode with
no ARG1 or MACRO_EXTEN?\n");
return -1;
}
}
- if (!data || ast_strlen_zero(data))
+ if (ast_strlen_zero(data))
data = "e164";
} else {
- if (!data || ast_strlen_zero(data))
+ if (ast_strlen_zero(data))
data = context;
}
res = dundi_lookup(results, MAX_RESULTS, chan, data, exten, 0);
Index: pbx_loopback.c
===================================================================
RCS file: /usr/cvsroot/asterisk/pbx/pbx_loopback.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- pbx_loopback.c 31 Oct 2005 15:34:11 -0000 1.10
+++ pbx_loopback.c 8 Nov 2005 01:55:30 -0000 1.11
@@ -122,9 +122,9 @@
pri = strchr(buf, ':');
if (!ast_strlen_zero(buf))
*newexten = buf;
- if (con && !ast_strlen_zero(con))
+ if (!ast_strlen_zero(con))
*newcontext = con;
- if (pri && !ast_strlen_zero(pri))
+ if (!ast_strlen_zero(pri))
sscanf(pri, "%d", priority);
}
Index: pbx_realtime.c
===================================================================
RCS file: /usr/cvsroot/asterisk/pbx/pbx_realtime.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- pbx_realtime.c 24 Oct 2005 20:12:06 -0000 1.13
+++ pbx_realtime.c 8 Nov 2005 01:55:30 -0000 1.14
@@ -97,9 +97,9 @@
table++;\
cxt = buf; \
} else cxt = NULL; \
- if (!cxt || ast_strlen_zero(cxt)) \
+ if (ast_strlen_zero(cxt)) \
cxt = context;\
- if (!table || ast_strlen_zero(table)) \
+ if (ast_strlen_zero(table)) \
table = "extensions"; \
var = realtime_switch_common(table, cxt, exten, priority,
mode); \
} else \
_______________________________________________
Asterisk-Cvs mailing list
[email protected]
http://lists.digium.com/mailman/listinfo/asterisk-cvs