diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2009-09-09 19:04:42 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2009-09-09 19:04:42 +0200 |
commit | 39d77b6cfa633b94a31de5ec387949a7c7b85623 (patch) | |
tree | 37dbbb2f84ff2e8d524cdf8ece16401e8955d6dd /lib/Plugins | |
parent | 08ec5a72cd334fffc8aa343ab48f4b6d1c88e3a7 (diff) | |
download | abrt-39d77b6cfa633b94a31de5ec387949a7c7b85623.tar.gz abrt-39d77b6cfa633b94a31de5ec387949a7c7b85623.tar.xz abrt-39d77b6cfa633b94a31de5ec387949a7c7b85623.zip |
fix the bug where lock file was not removed
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'lib/Plugins')
-rw-r--r-- | lib/Plugins/CCpp.cpp | 3 | ||||
-rw-r--r-- | lib/Plugins/KerneloopsScanner.cpp | 3 | ||||
-rw-r--r-- | lib/Plugins/Python.cpp | 19 | ||||
-rw-r--r-- | lib/Plugins/RunApp.cpp | 1 | ||||
-rw-r--r-- | lib/Plugins/SOSreport.cpp | 3 |
5 files changed, 11 insertions, 18 deletions
diff --git a/lib/Plugins/CCpp.cpp b/lib/Plugins/CCpp.cpp index 995ddbeb..2f8d3559 100644 --- a/lib/Plugins/CCpp.cpp +++ b/lib/Plugins/CCpp.cpp @@ -190,7 +190,6 @@ static void GetBacktrace(const std::string& pDebugDumpDir, std::string& pBacktra dd.Open(pDebugDumpDir); dd.LoadText(FILENAME_EXECUTABLE, executable); dd.LoadText(FILENAME_UID, UID); - dd.Close(); fTmp << "file " << executable << std::endl; fTmp << "core " << pDebugDumpDir << "/" << FILENAME_COREDUMP << std::endl; fTmp << "thread apply all backtrace full" << std::endl; @@ -479,7 +478,6 @@ void CAnalyzerCCpp::CreateReport(const std::string& pDebugDumpDir) dd.Open(pDebugDumpDir); if (dd.Exist(FILENAME_BACKTRACE)) { - dd.Close(); return; } dd.LoadText(FILENAME_PACKAGE, package); @@ -503,7 +501,6 @@ void CAnalyzerCCpp::CreateReport(const std::string& pDebugDumpDir) { dd.SaveText(FILENAME_MEMORYMAP, "memory map of the crashed C/C++ application, not implemented yet"); } - dd.Close(); } void CAnalyzerCCpp::Init() diff --git a/lib/Plugins/KerneloopsScanner.cpp b/lib/Plugins/KerneloopsScanner.cpp index 63460ba0..e1e32284 100644 --- a/lib/Plugins/KerneloopsScanner.cpp +++ b/lib/Plugins/KerneloopsScanner.cpp @@ -79,7 +79,6 @@ void CKerneloopsScanner::SaveOopsToDebugDump() update_client(_("Creating kernel oops crash reports...")); time_t t = time(NULL); - CDebugDump debugDump; std::list<COops> oopsList = m_pSysLog.GetOopsList(); m_pSysLog.ClearOopsList(); @@ -92,13 +91,13 @@ void CKerneloopsScanner::SaveOopsToDebugDump() try { + CDebugDump debugDump; debugDump.Create(path, 0); debugDump.SaveText(FILENAME_ANALYZER, "Kerneloops"); debugDump.SaveText(FILENAME_EXECUTABLE, "kernel"); debugDump.SaveText(FILENAME_KERNEL, oops.m_sVersion); debugDump.SaveText(FILENAME_PACKAGE, "not_applicable"); debugDump.SaveText(FILENAME_KERNELOOPS, oops.m_sData); - debugDump.Close(); } catch (CABRTException& e) { diff --git a/lib/Plugins/Python.cpp b/lib/Plugins/Python.cpp index c3677e7b..3e6926cd 100644 --- a/lib/Plugins/Python.cpp +++ b/lib/Plugins/Python.cpp @@ -9,21 +9,20 @@ std::string CAnalyzerPython::CreateHash(const std::string& pDebugDumpDir) { - std::string uuid; - CDebugDump dd; - dd.Open(pDebugDumpDir); - dd.LoadText("uuid", uuid); - dd.Close(); - return uuid; + std::string uuid; + CDebugDump dd; + dd.Open(pDebugDumpDir); + dd.LoadText("uuid", uuid); + return uuid; } std::string CAnalyzerPython::GetLocalUUID(const std::string& pDebugDumpDir) { - return CreateHash(pDebugDumpDir); + return CreateHash(pDebugDumpDir); } std::string CAnalyzerPython::GetGlobalUUID(const std::string& pDebugDumpDir) { - return GetLocalUUID(pDebugDumpDir); + return GetLocalUUID(pDebugDumpDir); } void CAnalyzerPython::Init() @@ -39,8 +38,8 @@ void CAnalyzerPython::Init() void CAnalyzerPython::DeInit() { - // TODO: remove copied abrt exception handler - std::ofstream fOutPySiteCustomize; + // TODO: remove copied abrt exception handler + std::ofstream fOutPySiteCustomize; fOutPySiteCustomize.open(PYHOOK_CONFIG); if (fOutPySiteCustomize.is_open()) { diff --git a/lib/Plugins/RunApp.cpp b/lib/Plugins/RunApp.cpp index fdbc3a75..5a5c1d44 100644 --- a/lib/Plugins/RunApp.cpp +++ b/lib/Plugins/RunApp.cpp @@ -84,7 +84,6 @@ void CActionRunApp::Run(const std::string& pActionDir, CDebugDump dd; dd.Open(pActionDir); dd.SaveText(args[FILENAME].c_str(), output); - dd.Close(); } } diff --git a/lib/Plugins/SOSreport.cpp b/lib/Plugins/SOSreport.cpp index c92b4fee..0e47ff84 100644 --- a/lib/Plugins/SOSreport.cpp +++ b/lib/Plugins/SOSreport.cpp @@ -159,10 +159,9 @@ void CActionSOSreport::Run(const std::string& pActionDir, CDebugDump dd; dd.Open(pActionDir); - //Not usefull + //Not useful //dd.SaveText("sosreportoutput", output); CopyFile(sosreport_filename,sosreport_dd_filename); - dd.Close(); } PLUGIN_INFO(ACTION, |