summaryrefslogtreecommitdiffstats
path: root/lib/plugins
diff options
context:
space:
mode:
authorDenys Vlasenko <dvlasenk@redhat.com>2010-11-01 13:43:18 +0100
committerDenys Vlasenko <dvlasenk@redhat.com>2010-11-01 13:43:18 +0100
commitb5cbedd0fda47f965479f1464a66da383dc25505 (patch)
tree5b2297086d6a64d251b1144e6e5616fedbcac3e4 /lib/plugins
parent406da6f0b2e354e1771893feb7042e5e5e81dddf (diff)
downloadabrt-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')
-rw-r--r--lib/plugins/SQLite3.cpp21
-rw-r--r--lib/plugins/SQLite3.h1
2 files changed, 22 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;
diff --git a/lib/plugins/SQLite3.h b/lib/plugins/SQLite3.h
index 3dfd0a9d..5750d92e 100644
--- a/lib/plugins/SQLite3.h
+++ b/lib/plugins/SQLite3.h
@@ -49,6 +49,7 @@ class CSQLite3 : public CDatabase
const char *pMessage);
virtual GList *GetUIDData(long caller_uid);
virtual struct db_row *GetRow(const char *crash_id);
+ virtual struct db_row *GetRow_by_dir(const char *dir);
virtual void SetSettings(const map_plugin_settings_t& pSettings);
};