From 84ee99d2f58612a1d470ecbda047f9018a299ce9 Mon Sep 17 00:00:00 2001 From: Michael Jerris Date: Fri, 9 Nov 2007 01:06:26 +0000 Subject: [PATCH] add not equal for string arguments like for equal. git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@6191 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- src/mod/applications/mod_commands/mod_commands.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/mod/applications/mod_commands/mod_commands.c b/src/mod/applications/mod_commands/mod_commands.c index 955a376b22..da98974df8 100644 --- a/src/mod/applications/mod_commands/mod_commands.c +++ b/src/mod/applications/mod_commands/mod_commands.c @@ -57,7 +57,7 @@ SWITCH_STANDARD_API(qq_function) char *mydata = NULL, *argv[3]; char *expr; char *a, *b; - float a_f = 0.0, b_f = 0.0; + double a_f = 0.0, b_f = 0.0; o_t o = O_NONE; int is_true = 0; char *p; @@ -132,7 +132,11 @@ SWITCH_STANDARD_API(qq_function) } break; case O_NE: - is_true = a_f != b_f; + if (!a_is_num && !b_is_num) { + is_true = strcmp(s_a, s_b); + } else { + is_true = a_f != b_f; + } break; case O_GT: is_true = a_f > b_f;