diff options
| author | David Sommerseth <dazo@users.sourceforge.net> | 2011-01-09 23:39:08 +0100 |
|---|---|---|
| committer | David Sommerseth <davids@redhat.com> | 2011-12-19 11:05:38 +0100 |
| commit | 8d2f8d68e6ae9726fdd2d941e55a7377e3cdf927 (patch) | |
| tree | a778cb9ee6f06b41f256a22450af8fd7916a3ed8 /database/sqlite/administration/lastlog.c | |
| parent | f0434a3ad51bf1159a78003a020eeb82a26dfc7f (diff) | |
| download | eurephia-8d2f8d68e6ae9726fdd2d941e55a7377e3cdf927.tar.gz eurephia-8d2f8d68e6ae9726fdd2d941e55a7377e3cdf927.tar.xz eurephia-8d2f8d68e6ae9726fdd2d941e55a7377e3cdf927.zip | |
Modified the whole edb-sqlite driver to use a better error handling
This will change the driver to use the new error routines made available
in the SQLite3 framework. Some of the code is also restructured a little
bit to simplify the code with these changes.
The functionality should be the same as for, but better error messages
are now sent back to the caller on the functions supporting XML.
Signed-off-by: David Sommerseth <dazo@users.sourceforge.net>
Diffstat (limited to 'database/sqlite/administration/lastlog.c')
| -rw-r--r-- | database/sqlite/administration/lastlog.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/database/sqlite/administration/lastlog.c b/database/sqlite/administration/lastlog.c index f700cee..ff7b479 100644 --- a/database/sqlite/administration/lastlog.c +++ b/database/sqlite/administration/lastlog.c @@ -106,8 +106,10 @@ xmlDoc *eDBadminGetLastlog(eurephiaCTX *ctx, xmlDoc *srch_xml, const char *sortk NULL, fmap, eDBmkSortKeyString(fmap, sortkeys)); eDBfreeMapping(fmap); xmlFreeDoc(doc); - if( res == NULL ) { + if( sqlite_query_status(res) != dbSUCCESS ) { eurephia_log(ctx, LOG_ERROR, 0, "Querying the lastlog failed"); + sqlite_log_error(ctx, res); + sqlite_free_results(res); return NULL; } eurephiaXML_CreateDoc(ctx, 1, "lastlog", &doc, &lastl); |
