summaryrefslogtreecommitdiffstats
path: root/lib/plugins/Python.cpp
diff options
context:
space:
mode:
authorJiri Moskovcak <jmoskovc@redhat.com>2010-08-31 14:39:57 +0200
committerJiri Moskovcak <jmoskovc@redhat.com>2010-08-31 14:39:57 +0200
commite448ad512e34bdcca527bde0b301de404011fff5 (patch)
tree053197f8853f167323f99178c098e4f6cb13dfda /lib/plugins/Python.cpp
parentcfc620a36d2052f6b2fb6c6fa5acb10c1187819e (diff)
parent236104f6d07a44463c164074723c16421831e8e2 (diff)
downloadabrt-e448ad512e34bdcca527bde0b301de404011fff5.tar.gz
abrt-e448ad512e34bdcca527bde0b301de404011fff5.tar.xz
abrt-e448ad512e34bdcca527bde0b301de404011fff5.zip
Merge branch 'master' of ssh://git.fedorahosted.org/git/abrt
Diffstat (limited to 'lib/plugins/Python.cpp')
-rw-r--r--lib/plugins/Python.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/plugins/Python.cpp b/lib/plugins/Python.cpp
index 7b6e761a..d634e0c5 100644
--- a/lib/plugins/Python.cpp
+++ b/lib/plugins/Python.cpp
@@ -26,19 +26,18 @@ using namespace std;
string CAnalyzerPython::GetLocalUUID(const char *pDebugDumpDir)
{
- CDebugDump dd;
- if (!dd.Open(pDebugDumpDir))
+ dump_dir_t *dd = dd_init();
+ if (!dd_opendir(dd, pDebugDumpDir))
{
+ dd_close(dd);
VERB1 log(_("Unable to open debug dump '%s'"), pDebugDumpDir);
return string("");
}
- string bt;
- dd.LoadText(FILENAME_BACKTRACE, bt);
- dd.Close();
+ char *bt = dd_loadtxt(dd, FILENAME_BACKTRACE);
+ dd_close(dd);
- const char *bt_str = bt.c_str();
- const char *bt_end = strchrnul(bt_str, '\n');
+ const char *bt_end = strchrnul(bt, '\n');
char hash_str[MD5_RESULT_LEN*2 + 1];
unsigned char hash2[MD5_RESULT_LEN];
@@ -49,7 +48,8 @@ string CAnalyzerPython::GetLocalUUID(const char *pDebugDumpDir)
//md5_hash(bt_str, bt_end - bt_str, &md5ctx);
// For now using compat version:
{
- char *copy = xstrndup(bt_str, bt_end - bt_str);
+ char *copy = xstrndup(bt, bt_end - bt);
+ free(bt);
char *s = copy;
char *d = copy;
unsigned colon_cnt = 0;