diff options
| author | Jiri Moskovcak <jmoskovc@redhat.com> | 2010-08-31 14:39:57 +0200 |
|---|---|---|
| committer | Jiri Moskovcak <jmoskovc@redhat.com> | 2010-08-31 14:39:57 +0200 |
| commit | e448ad512e34bdcca527bde0b301de404011fff5 (patch) | |
| tree | 053197f8853f167323f99178c098e4f6cb13dfda /src/hooks/abrt-hook-ccpp.cpp | |
| parent | cfc620a36d2052f6b2fb6c6fa5acb10c1187819e (diff) | |
| parent | 236104f6d07a44463c164074723c16421831e8e2 (diff) | |
| download | abrt-e448ad512e34bdcca527bde0b301de404011fff5.tar.gz abrt-e448ad512e34bdcca527bde0b301de404011fff5.tar.xz abrt-e448ad512e34bdcca527bde0b301de404011fff5.zip | |
Merge branch 'master' of ssh://git.fedorahosted.org/git/abrt
Diffstat (limited to 'src/hooks/abrt-hook-ccpp.cpp')
| -rw-r--r-- | src/hooks/abrt-hook-ccpp.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/hooks/abrt-hook-ccpp.cpp b/src/hooks/abrt-hook-ccpp.cpp index 1e469890..4862c6c1 100644 --- a/src/hooks/abrt-hook-ccpp.cpp +++ b/src/hooks/abrt-hook-ccpp.cpp @@ -415,15 +415,15 @@ int main(int argc, char** argv) if (path_len >= (sizeof(path) - sizeof("/"FILENAME_COREDUMP))) return 1; - CDebugDump dd; - if (dd.Create(path, uid)) + dump_dir_t *dd = dd_init(); + if (dd_create(dd, path, uid)) { char *cmdline = get_cmdline(pid); /* never NULL */ char *reason = xasprintf("Process %s was killed by signal %s (SIG%s)", executable, signal_str, signame ? signame : signal_str); - dd.SaveText(FILENAME_ANALYZER, "CCpp"); - dd.SaveText(FILENAME_EXECUTABLE, executable); - dd.SaveText(FILENAME_CMDLINE, cmdline); - dd.SaveText(FILENAME_REASON, reason); + dd_savetxt(dd, FILENAME_ANALYZER, "CCpp"); + dd_savetxt(dd, FILENAME_EXECUTABLE, executable); + dd_savetxt(dd, FILENAME_CMDLINE, cmdline); + dd_savetxt(dd, FILENAME_REASON, reason); free(cmdline); free(reason); @@ -451,8 +451,8 @@ int main(int argc, char** argv) if (abrt_core_fd < 0) { int sv_errno = errno; - dd.Delete(); - dd.Close(); + dd_delete(dd); + dd_close(dd); if (user_core_fd >= 0) { xchdir(user_pwd); @@ -480,8 +480,8 @@ int main(int argc, char** argv) if (core_size < 0 || fsync(abrt_core_fd) != 0) { unlink(path); - dd.Delete(); - dd.Close(); + dd_delete(dd); + dd_close(dd); if (user_core_fd >= 0) { xchdir(user_pwd); @@ -505,7 +505,7 @@ int main(int argc, char** argv) * will wait for us), and we won't be able to delete their dumps. * Classic deadlock. */ - dd.Close(); + dd_close(dd); path[path_len] = '\0'; /* path now contains only directory name */ char *newpath = xstrndup(path, path_len - (sizeof(".new")-1)); if (rename(path, newpath) == 0) |
