summaryrefslogtreecommitdiffstats
path: root/src/hooks
diff options
context:
space:
mode:
authorNikola Pajkovsky <npajkovs@redhat.com>2010-08-30 19:28:08 +0200
committerDenys Vlasenko <dvlasenk@redhat.com>2010-08-30 19:28:08 +0200
commiteb6a80fe031f648d11344ed912e9a5e1e722545e (patch)
tree837100d82635c022447ff1821f3dcdab4278e45e /src/hooks
parentdac728745922a717db05f2e8dcbe6c533dc0df6f (diff)
downloadabrt-eb6a80fe031f648d11344ed912e9a5e1e722545e.tar.gz
abrt-eb6a80fe031f648d11344ed912e9a5e1e722545e.tar.xz
abrt-eb6a80fe031f648d11344ed912e9a5e1e722545e.zip
get rid of CDebugDump class
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
Diffstat (limited to 'src/hooks')
-rw-r--r--src/hooks/abrt-hook-ccpp.cpp22
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)