summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTed Trask <ttrask01@yahoo.com>2014-11-04 14:04:36 +0000
committerTed Trask <ttrask01@yahoo.com>2014-11-04 14:04:36 +0000
commit9c832d866c3afbc72e7340dc00cbd96976ce09b6 (patch)
tree571f8eac1792d6403729245989901c83913a7668
parentf9c547302d8adc55d3f5745f817caa7bb618ae4c (diff)
downloadacf-kamailio-9c832d866c3afbc72e7340dc00cbd96976ce09b6.tar.bz2
acf-kamailio-9c832d866c3afbc72e7340dc00cbd96976ce09b6.tar.xz
Changes to make users work with MYSQL
-rw-r--r--kamailio-model.lua6
1 files changed, 3 insertions, 3 deletions
diff --git a/kamailio-model.lua b/kamailio-model.lua
index 59aee83..84db859 100644
--- a/kamailio-model.lua
+++ b/kamailio-model.lua
@@ -168,8 +168,8 @@ function mymodule.list_files()
end
local function parse_db_show(table)
- -- These settings work for Postgres and DBTEXT database
- local delimiter = "\'?%s*[,|]%s*\'?"
+ -- These settings work for Postgres, MYSQL, and DBTEXT database
+ local delimiter = "\'?%s*[,|\t]%s*\'?"
local results = {}
local errtxt
local f
@@ -191,7 +191,7 @@ local function parse_db_show(table)
results = {}
else
local words = format.string_to_table(line, delimiter)
- if words and #words > 0 then
+ if words and #words > 0 and words[1] ~= "id" then
results[#results+1] = words
end
end