diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2009-08-26 14:20:09 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2009-08-26 14:20:09 +0200 |
commit | 2da98808e7484e69f14b19a1039ded34a954f64e (patch) | |
tree | 382c43fc226741ea88a30f0ec2f636e4f5020a6f /src/Daemon/CrashWatcher.cpp | |
parent | a20328b6c62c1688d6f3f1310f211d02da560f50 (diff) | |
download | abrt-2da98808e7484e69f14b19a1039ded34a954f64e.tar.gz abrt-2da98808e7484e69f14b19a1039ded34a954f64e.tar.xz abrt-2da98808e7484e69f14b19a1039ded34a954f64e.zip |
eliminate AddOpenGPGPublicKey() and AddBlackListedPackage() stubs
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'src/Daemon/CrashWatcher.cpp')
-rw-r--r-- | src/Daemon/CrashWatcher.cpp | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/src/Daemon/CrashWatcher.cpp b/src/Daemon/CrashWatcher.cpp index 26e906fa..01629f0b 100644 --- a/src/Daemon/CrashWatcher.cpp +++ b/src/Daemon/CrashWatcher.cpp @@ -175,19 +175,16 @@ static void *create_report(void *arg) uint64_t CCrashWatcher::CreateReport_t(const std::string &pUUID,const std::string &pUID, const std::string &pSender) { thread_data_t *thread_data = (thread_data_t *)xzalloc(sizeof(thread_data_t)); - if (thread_data != NULL) + thread_data->UUID = xstrdup(pUUID.c_str()); + thread_data->UID = xstrdup(pUID.c_str()); + thread_data->dest = xstrdup(pSender.c_str()); + if (pthread_create(&(thread_data->thread_id), NULL, create_report, (void *)thread_data) != 0) { - thread_data->UUID = xstrdup(pUUID.c_str()); - thread_data->UID = xstrdup(pUID.c_str()); - thread_data->dest = xstrdup(pSender.c_str()); - if (pthread_create(&(thread_data->thread_id), NULL, create_report, (void *)thread_data) != 0) - { - throw CABRTException(EXCEP_FATAL, "CCrashWatcher::CreateReport_t(): Cannot create thread!"); - } - } - else - { - throw CABRTException(EXCEP_FATAL, "CCrashWatcher::CreateReport_t(): Cannot allocate memory!"); + free(thread_data->UUID); + free(thread_data->UID); + free(thread_data->dest); + free(thread_data); + throw CABRTException(EXCEP_FATAL, "CCrashWatcher::CreateReport_t(): Cannot create thread!"); } //FIXME: we don't use this value anymore, so fix the API return 0; |