diff options
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. */ |
