diff options
| author | Nikola Pajkovsky <npajkovs@redhat.com> | 2010-08-30 19:28:08 +0200 |
|---|---|---|
| committer | Denys Vlasenko <dvlasenk@redhat.com> | 2010-08-30 19:28:08 +0200 |
| commit | eb6a80fe031f648d11344ed912e9a5e1e722545e (patch) | |
| tree | 837100d82635c022447ff1821f3dcdab4278e45e /src/daemon/dumpsocket.cpp | |
| parent | dac728745922a717db05f2e8dcbe6c533dc0df6f (diff) | |
| download | abrt-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/daemon/dumpsocket.cpp')
| -rw-r--r-- | src/daemon/dumpsocket.cpp | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/src/daemon/dumpsocket.cpp b/src/daemon/dumpsocket.cpp index f95197f6..999df00f 100644 --- a/src/daemon/dumpsocket.cpp +++ b/src/daemon/dumpsocket.cpp @@ -170,33 +170,33 @@ static void create_debug_dump(struct client *client) client->basename, (long)time(NULL), client->pid); - /* No need to check the path length, as all variables used are limited, and dd.Create() + /* No need to check the path length, as all variables used are limited, and dd_create() fails if the path is too long. */ - CDebugDump dd; - if (!dd.Create(path, client->uid)) + dump_dir_t *dd = dd_init();; + if (!dd_create(dd, path, client->uid)) { - dd.Delete(); - dd.Close(); + dd_delete(dd); + dd_close(dd); error_msg_and_die("dumpsocket: Error while creating crash dump %s", path); } - dd.SaveText(FILENAME_ANALYZER, client->analyzer); - dd.SaveText(FILENAME_EXECUTABLE, client->executable); - dd.SaveText(FILENAME_BACKTRACE, client->backtrace); - dd.SaveText(FILENAME_REASON, client->reason); + dd_savetxt(dd, FILENAME_ANALYZER, client->analyzer); + dd_savetxt(dd, FILENAME_EXECUTABLE, client->executable); + dd_savetxt(dd, FILENAME_BACKTRACE, client->backtrace); + dd_savetxt(dd, FILENAME_REASON, client->reason); /* Obtain and save the command line. */ char *cmdline = get_cmdline(client->pid); // never NULL - dd.SaveText(FILENAME_CMDLINE, cmdline); + dd_savetxt(dd, FILENAME_CMDLINE, cmdline); free(cmdline); /* Store id of the user whose application crashed. */ char uid_str[sizeof(long) * 3 + 2]; sprintf(uid_str, "%lu", (long)client->uid); - dd.SaveText(CD_UID, uid_str); + dd_savetxt(dd, CD_UID, uid_str); - dd.Close(); + dd_close(dd); /* Move the completely created debug dump to final directory. */ |
