From 4eaf8b24b495aa654def79d1d4a5d6b3d1ade39b Mon Sep 17 00:00:00 2001 From: Zdenek Prikryl Date: Wed, 4 Mar 2009 11:37:30 +0100 Subject: changed class name --- lib/MiddleWare/MiddleWare.cpp | 26 +++++++++++--------------- 1 file changed, 11 insertions(+), 15 deletions(-) (limited to 'lib/MiddleWare/MiddleWare.cpp') diff --git a/lib/MiddleWare/MiddleWare.cpp b/lib/MiddleWare/MiddleWare.cpp index 20ee48a..0d7fdf6 100644 --- a/lib/MiddleWare/MiddleWare.cpp +++ b/lib/MiddleWare/MiddleWare.cpp @@ -68,7 +68,7 @@ void CMiddleWare::LoadSettings(const std::string& pPath) set_opengpg_keys_t::iterator it_k; for (it_k = m_setOpenGPGKeys.begin(); it_k != m_setOpenGPGKeys.end(); it_k++) { - m_RPMInfo.LoadOpenGPGPublicKey(*it_k); + m_RPM.LoadOpenGPGPublicKey(*it_k); } } if (settings.find("EnableOpenGPG") != settings.end()) @@ -281,10 +281,16 @@ int CMiddleWare::SaveDebugDump(const std::string& pDebugDumpDir, crash_info_t& p dd.Open(pDebugDumpDir); dd.LoadText(FILENAME_EXECUTABLE, executable); - package = m_RPMInfo.GetPackage(executable, description); - if (executable != "kernel") + if (executable == "kernel") { + package = "kernel"; + description = m_RPM.GetDescription(executable); + } + else + { + package = m_RPM.GetPackage(executable); std::string packageName = package.substr(0, package.rfind("-", package.rfind("-") - 1)); + description = m_RPM.GetDescription(executable); if (packageName == "" || (m_setBlackList.find(packageName) != m_setBlackList.end())) { @@ -294,8 +300,8 @@ int CMiddleWare::SaveDebugDump(const std::string& pDebugDumpDir, crash_info_t& p } if (m_bOpenGPGCheck) { - if (!m_RPMInfo.CheckFingerprint(packageName) || - !m_RPMInfo.CheckHash(packageName, executable)) + if (!m_RPM.CheckFingerprint(packageName) || + !m_RPM.CheckHash(packageName, executable)) { dd.Delete(); dd.Close(); @@ -303,16 +309,6 @@ int CMiddleWare::SaveDebugDump(const std::string& pDebugDumpDir, crash_info_t& p } } } - else - { - package = "kernel"; - description = "The Linux kernel"; - description += "\n\n"; - description += "The kernel contains the Linux kernel (vmlinuz), the core of any" - "Linux operating system. The kernel handles the basic functions" - "of the operating system: memory allocation, process allocation, device" - "input and output, etc."; - } dd.SaveText(FILENAME_PACKAGE, package); dd.SaveText(FILENAME_DESCRIPTION, description); -- cgit From 60150bac2c6ecc10a1d761bdecef696566d9ef43 Mon Sep 17 00:00:00 2001 From: Zdenek Prikryl Date: Wed, 4 Mar 2009 12:25:49 +0100 Subject: FILENAME_CMDLINE and FILENAME_RELEASE are optional --- lib/MiddleWare/MiddleWare.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'lib/MiddleWare/MiddleWare.cpp') diff --git a/lib/MiddleWare/MiddleWare.cpp b/lib/MiddleWare/MiddleWare.cpp index 0d7fdf6..4dcf664 100644 --- a/lib/MiddleWare/MiddleWare.cpp +++ b/lib/MiddleWare/MiddleWare.cpp @@ -108,9 +108,15 @@ void CMiddleWare::DebugDump2Report(const std::string& pDebugDumpDir, crash_repor dd.LoadText(FILENAME_KERNEL, pCrashReport.m_sKernel); dd.LoadText(FILENAME_PACKAGE, pCrashReport.m_sPackage); dd.LoadText(FILENAME_EXECUTABLE, pCrashReport.m_sExecutable); - dd.LoadText(FILENAME_CMDLINE, pCrashReport.m_sCmdLine); - dd.LoadText(FILENAME_RELEASE, pCrashReport.m_sRelease); + if (dd.Exist(FILENAME_CMDLINE)) + { + dd.LoadText(FILENAME_CMDLINE, pCrashReport.m_sCmdLine); + } + if (dd.Exist(FILENAME_RELEASE)) + { + dd.LoadText(FILENAME_RELEASE, pCrashReport.m_sRelease); + } if (dd.Exist(FILENAME_TEXTDATA1)) { dd.LoadText(FILENAME_TEXTDATA1, pCrashReport.m_sTextData1); -- cgit