diff options
author | Denys Vlasenko <dvlasenk@redhat.com> | 2010-11-01 13:43:18 +0100 |
---|---|---|
committer | Denys Vlasenko <dvlasenk@redhat.com> | 2010-11-01 13:43:18 +0100 |
commit | b5cbedd0fda47f965479f1464a66da383dc25505 (patch) | |
tree | 5b2297086d6a64d251b1144e6e5616fedbcac3e4 /lib/plugins/SQLite3.cpp | |
parent | 406da6f0b2e354e1771893feb7042e5e5e81dddf (diff) | |
download | abrt-b5cbedd0fda47f965479f1464a66da383dc25505.tar.gz abrt-b5cbedd0fda47f965479f1464a66da383dc25505.tar.xz abrt-b5cbedd0fda47f965479f1464a66da383dc25505.zip |
abrtd: prepearatory patch: is_debug_dump_saved shouldn't need uid
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
Diffstat (limited to 'lib/plugins/SQLite3.cpp')
-rw-r--r-- | lib/plugins/SQLite3.cpp | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/lib/plugins/SQLite3.cpp b/lib/plugins/SQLite3.cpp index a57ec873..2ed3f9fd 100644 --- a/lib/plugins/SQLite3.cpp +++ b/lib/plugins/SQLite3.cpp @@ -690,6 +690,27 @@ struct db_row *CSQLite3::GetRow(const char *crash_id) return row; } +struct db_row *CSQLite3::GetRow_by_dir(const char *dir) +{ + if (!is_string_safe(dir)) + return NULL; + + GList *table = get_table_or_die(m_pDB, "SELECT * FROM "ABRT_TABLE + " WHERE "COL_DEBUG_DUMP_PATH"='%s';", + dir + ); + + if (!table) + return NULL; + + GList *first = g_list_first(table); + struct db_row *row = db_rowcpy_from_list(first); + + db_list_free(table); + + return row; +} + void CSQLite3::SetSettings(const map_plugin_settings_t& pSettings) { m_pSettings = pSettings; |