]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
fix sql to be more portable for tab complete
authorAnthony Minessale <anthm@freeswitch.org>
Thu, 8 Jul 2010 06:22:26 +0000 (01:22 -0500)
committerAnthony Minessale <anthm@freeswitch.org>
Thu, 8 Jul 2010 06:22:53 +0000 (01:22 -0500)
src/switch_console.c

index 353a30319d7c941de5c753d28341ac918df9b19f..472cdc48d3a53c27f1e53d79368f88c55e2c638f 100644 (file)
@@ -756,7 +756,7 @@ SWITCH_DECLARE(unsigned char) switch_console_complete(const char *line, const ch
                        }
                }
 
-               stream.write_function(&stream, " and hostname='%s' order by a1,a2,a3,a4,a5,a6,a7,a8,a9,a10", switch_core_get_variable("hostname"));
+               stream.write_function(&stream, " and hostname='%s' order by a%d", switch_core_get_variable("hostname"), h.words + 1);
                switch_cache_db_execute_sql_callback(db, stream.data, comp_callback, &h, &errmsg);
 
                if (errmsg) {