Commit 42814255 authored by Ted Trask's avatar Ted Trask

Modify dbmodelfunctions to pass port as number in to connect

parent 2fbbced4
...@@ -24,7 +24,7 @@ local function get_connection(dbase, self, clientdata) ...@@ -24,7 +24,7 @@ local function get_connection(dbase, self, clientdata)
for n,v in pairs(retval.value.connection.value) do for n,v in pairs(retval.value.connection.value) do
if dbase[n] then if dbase[n] then
retval.value.connection.value[n] = nil retval.value.connection.value[n] = nil
elseif n == "engine" then elseif n == "engine" or n == "port" then
dbase[n] = tonumber(v.value) dbase[n] = tonumber(v.value)
else else
dbase[n] = v.value dbase[n] = v.value
...@@ -37,7 +37,7 @@ end ...@@ -37,7 +37,7 @@ end
local function fill_connection(dbase, self, retval) local function fill_connection(dbase, self, retval)
-- Fill in dbase with the values from the cfe retval -- Fill in dbase with the values from the cfe retval
for n,v in pairs(retval.value.connection.value) do for n,v in pairs(retval.value.connection.value) do
if n == "engine" then if n == "engine" or n == "port" then
dbase[n] = tonumber(v.value) dbase[n] = tonumber(v.value)
else else
dbase[n] = v.value dbase[n] = v.value
...@@ -83,7 +83,6 @@ function mymodule.list_tables(dbase, self, clientdata) ...@@ -83,7 +83,6 @@ function mymodule.list_tables(dbase, self, clientdata)
if not res and err then if not res and err then
retval.value.connection.errtxt = err retval.value.connection.errtxt = err
end end
return retval return retval
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment