diff options
author | David Sommerseth <dazo@users.sourceforge.net> | 2010-11-12 17:29:01 +0100 |
---|---|---|
committer | David Sommerseth <dazo@users.sourceforge.net> | 2010-11-12 17:29:01 +0100 |
commit | 5581ba10af35b94e750596312a9782255084aaeb (patch) | |
tree | 7ae7dc89a3ac9a36a40edd396fabf723706f89ae | |
parent | 8e8561842c78a368cbcfd43e56089fca46eb54dd (diff) | |
download | eurephia-5581ba10af35b94e750596312a9782255084aaeb.tar.gz eurephia-5581ba10af35b94e750596312a9782255084aaeb.tar.xz eurephia-5581ba10af35b94e750596312a9782255084aaeb.zip |
SQLite3 eurephiadm fix: sorting lastlog based on session status didn't work
The eDBadminGetLastlog(...) function didn't parse the sortkeys string to match
the database layout.
In addition the field mapping for the openvpn_lastlog.sessionstatus field was wrong.
Signed-off-by: David Sommerseth <dazo@users.sourceforge.net>
-rw-r--r-- | database/sqlite/administration/lastlog.c | 2 | ||||
-rw-r--r-- | database/sqlite/fieldmapping.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/database/sqlite/administration/lastlog.c b/database/sqlite/administration/lastlog.c index 910368c..60856a7 100644 --- a/database/sqlite/administration/lastlog.c +++ b/database/sqlite/administration/lastlog.c @@ -103,7 +103,7 @@ xmlDoc *eDBadminGetLastlog(eurephiaCTX *ctx, xmlDoc *srch_xml, const char *sortk " LEFT JOIN openvpn_accesses USING (accessprofile)" " LEFT JOIN openvpn_users users ON( ll.uid = users.uid)" " LEFT JOIN openvpn_certificates cert ON (ll.certid = cert.certid)", - NULL, fmap, sortkeys); + NULL, fmap, eDBmkSortKeyString(fmap, sortkeys)); eDBfreeMapping(fmap); xmlFreeDoc(doc); if( res == NULL ) { diff --git a/database/sqlite/fieldmapping.h b/database/sqlite/fieldmapping.h index 0adbd93..95b380e 100644 --- a/database/sqlite/fieldmapping.h +++ b/database/sqlite/fieldmapping.h @@ -85,7 +85,7 @@ static eDBfieldMap tbl_sqlite_lastlog[] = { {TABLE_LASTLOG, NULL, FIELD_CERTID, ft_INT , flt_NOTSET, "certid", NULL, NULL}, {TABLE_LASTLOG, NULL, FIELD_REMOTEIP, ft_STRING , flt_NOTSET, "remotehost", NULL, NULL}, {TABLE_LASTLOG, NULL, FIELD_VPNIP, ft_STRING , flt_NOTSET, "vpnipaddr", NULL, NULL}, - {TABLE_LASTLOG, NULL, FIELD_SESSTATUS, ft_STRING , flt_NOTSET, "status", NULL, NULL}, + {TABLE_LASTLOG, NULL, FIELD_SESSTATUS, ft_STRING , flt_NOTSET, "sessionstatus", NULL, NULL}, {TABLE_LASTLOG, NULL, FIELD_LOGIN, ft_DATETIME, flt_NOTSET, "login" , NULL, NULL}, {TABLE_LASTLOG, NULL, FIELD_LOGOUT, ft_DATETIME, flt_NOTSET, "logout", NULL, NULL}, {TABLE_LASTLOG, NULL, FIELD_RECID, ft_INT , flt_NOTSET, "llid", NULL, NULL}, |