Don't skip the query field on a realtime multi query
authorTerry Wilson <twilson@digium.com>
Thu, 13 Oct 2011 00:17:42 +0000 (00:17 +0000)
committerTerry Wilson <twilson@digium.com>
Thu, 13 Oct 2011 00:17:42 +0000 (00:17 +0000)
There is no documented reason to not add the query field to the varlist
returned by a realtime multi query, despite the config category being
set to its value. Of course, there is no documentation that the category
should be set to the value either. There is lots of no documentation
when it comes to realtime. But, other engines do not skip this field so
I am forcing this backend to follow the convention, because not doing so
is very silly.
........

Merged revisions 340662 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 340663 from http://svn.asterisk.org/svn/asterisk/branches/10

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

res/res_config_sqlite.c

index fbeeac2..b5b8de4 100644 (file)
@@ -1154,8 +1154,9 @@ static int add_rt_multi_cfg_entry(void *arg, int argc, char **argv, char **colum
        ast_category_append(args->cfg, cat);
 
        for (i = 0; i < argc; i++) {
-               if (!argv[i] || !strcmp(args->initfield, columnNames[i]))
+               if (!argv[i]) {
                        continue;
+               }
 
                if (!(var = ast_variable_new(columnNames[i], argv[i], ""))) {
                        ast_log(LOG_WARNING, "Unable to allocate variable\n");