]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Fix Finding Extensions With Patterns Using ODBC Realtime
authorMichael L. Young <elgueromexicano@gmail.com>
Fri, 10 May 2013 20:28:18 +0000 (20:28 +0000)
committerMichael L. Young <elgueromexicano@gmail.com>
Fri, 10 May 2013 20:28:18 +0000 (20:28 +0000)
After the merge of support for the realtime sorcery module, extensions that
contained a pattern were not being found through odbc realtime.  It was tracked
down to this one line that was advancing to the next variable list before it
should have been.  The removal of this one line fixes this.

Tested this fix on my machine.

Received confirmation that this is the right fix from file on IRC.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@388375 65c4cc65-6c06-0410-ace0-fbb531ad65f3

res/res_config_odbc.c

index 524912a9e07175a022d47cd4d52b3581f5e5767e..2735eea6d4be4935023b16e7bbdc9a0039c89c84 100644 (file)
@@ -340,7 +340,6 @@ static struct ast_config *realtime_multi_odbc(const char *database, const char *
                *op = '\0';
        }
 
-       field = field->next;
        op = !strchr(field->name, ' ') ? " =" : "";
        snprintf(sql, sizeof(sql), "SELECT * FROM %s WHERE %s%s ?%s", table, field->name, op,
                strcasestr(field->name, "LIKE") && !ast_odbc_backslash_is_escape(obj) ? " ESCAPE '\\'" : "");