From: Michael L. Young Date: Fri, 10 May 2013 20:28:18 +0000 (+0000) Subject: Fix Finding Extensions With Patterns Using ODBC Realtime X-Git-Tag: 13.0.0-beta1~1822 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8f05ed46feef44c005dc65f5abeb434813a04399;p=thirdparty%2Fasterisk.git Fix Finding Extensions With Patterns Using ODBC Realtime 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 --- diff --git a/res/res_config_odbc.c b/res/res_config_odbc.c index 524912a9e0..2735eea6d4 100644 --- a/res/res_config_odbc.c +++ b/res/res_config_odbc.c @@ -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 '\\'" : "");