diff options
author | Jiri Moskovcak <jmoskovc@redhat.com> | 2009-10-21 15:38:26 +0200 |
---|---|---|
committer | Jiri Moskovcak <jmoskovc@redhat.com> | 2009-10-21 15:38:26 +0200 |
commit | 520c3bb42371d2b461a031e5b783a62b66c0ad6f (patch) | |
tree | 652c78d016882d0265f1d54a9e826fc8aacf7724 /lib/Plugins | |
parent | 4fdccf0281cb9158988e504151d6b7bfb89b465c (diff) | |
download | abrt-520c3bb42371d2b461a031e5b783a62b66c0ad6f.tar.gz abrt-520c3bb42371d2b461a031e5b783a62b66c0ad6f.tar.xz abrt-520c3bb42371d2b461a031e5b783a62b66c0ad6f.zip |
- fixed case when root couldn't properly report others bugs
- if root reports other bugs the SetReported() failed because
it was looking for dump using UUID and UID which doesn't work
for root, so I changed it to use only UUID if abrt-gui is run by root
Diffstat (limited to 'lib/Plugins')
-rw-r--r-- | lib/Plugins/SQLite3.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/lib/Plugins/SQLite3.cpp b/lib/Plugins/SQLite3.cpp index 797ed2db..a2dc426f 100644 --- a/lib/Plugins/SQLite3.cpp +++ b/lib/Plugins/SQLite3.cpp @@ -321,7 +321,16 @@ void CSQLite3::Delete(const std::string& pUUID, const std::string& pUID) void CSQLite3::SetReported(const std::string& pUUID, const std::string& pUID, const std::string& pMessage) { - if (Exist(pUUID, pUID)) + if(pUID == "0") + { + Exec("UPDATE "ABRT_TABLE" " + "SET "DATABASE_COLUMN_REPORTED" = 1 " + "WHERE "DATABASE_COLUMN_UUID" = '"+pUUID+"';"); + Exec("UPDATE "ABRT_TABLE" " + "SET "DATABASE_COLUMN_MESSAGE" = '" + pMessage + "' " + "WHERE "DATABASE_COLUMN_UUID" = '"+pUUID+"';"); + } + else if (Exist(pUUID, pUID)) { Exec("UPDATE "ABRT_TABLE" " "SET "DATABASE_COLUMN_REPORTED" = 1 " |