summaryrefslogtreecommitdiffstats
path: root/lib/MiddleWare
diff options
context:
space:
mode:
Diffstat (limited to 'lib/MiddleWare')
-rw-r--r--lib/MiddleWare/MiddleWare.cpp13
-rw-r--r--lib/MiddleWare/MiddleWare.h2
2 files changed, 10 insertions, 5 deletions
diff --git a/lib/MiddleWare/MiddleWare.cpp b/lib/MiddleWare/MiddleWare.cpp
index 5136929..d2d12a0 100644
--- a/lib/MiddleWare/MiddleWare.cpp
+++ b/lib/MiddleWare/MiddleWare.cpp
@@ -203,6 +203,14 @@ void CMiddleWare::Report(const map_crash_report_t& pCrashReport)
database->DisConnect();
}
+void CMiddleWare::DeleteDebugDumpDir(const std::string& pDebugDumpDir)
+{
+ CDebugDump dd;
+ dd.Open(pDebugDumpDir);
+ dd.Delete();
+ dd.Close();
+}
+
void CMiddleWare::DeleteCrashInfo(const std::string& pUUID,
const std::string& pUID,
const bool bWithDebugDump)
@@ -216,10 +224,7 @@ void CMiddleWare::DeleteCrashInfo(const std::string& pUUID,
if (bWithDebugDump)
{
- CDebugDump dd;
- dd.Open(row.m_sDebugDumpDir);
- dd.Delete();
- dd.Close();
+ DeleteDebugDumpDir(row.m_sDebugDumpDir);
}
}
diff --git a/lib/MiddleWare/MiddleWare.h b/lib/MiddleWare/MiddleWare.h
index e8d5212..86db708 100644
--- a/lib/MiddleWare/MiddleWare.h
+++ b/lib/MiddleWare/MiddleWare.h
@@ -80,7 +80,7 @@ class CMiddleWare
map_crash_report_t& pCrashReport);
void Report(const map_crash_report_t& pCrashReport);
-
+ void DeleteDebugDumpDir(const std::string& pDebugDumpDir);
void DeleteCrashInfo(const std::string& pUUID,
const std::string& pUID,
const bool bWithDebugDump = true);