From 8f05ed46feef44c005dc65f5abeb434813a04399 Mon Sep 17 00:00:00 2001
From: "Michael L. Young" <elgueromexicano@gmail.com>
Date: Fri, 10 May 2013 20:28:18 +0000
Subject: [PATCH] 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
---
 res/res_config_odbc.c | 1 -
 1 file changed, 1 deletion(-)

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 '\\'" : "");
-- 
GitLab