aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoseph Hunkeler <jhunkeler@gmail.com>2026-04-27 10:42:38 -0400
committerJoseph Hunkeler <jhunkeler@gmail.com>2026-04-27 10:42:38 -0400
commita54a712ab47a4a5b99cc6c8fc8fbfcb6c5c995f3 (patch)
treee0d49fd2d06e69488a8c3af6349c2c66f8f43cc8
parent11bc498b5bca18662a582a163d3e9aaed1a17b79 (diff)
downloadstasis-a54a712ab47a4a5b99cc6c8fc8fbfcb6c5c995f3.tar.gz
delivery_export_configuration: Add debug statements
-rw-r--r--src/lib/delivery/delivery_export.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/lib/delivery/delivery_export.c b/src/lib/delivery/delivery_export.c
index c12a365..e67fdfb 100644
--- a/src/lib/delivery/delivery_export.c
+++ b/src/lib/delivery/delivery_export.c
@@ -2,26 +2,44 @@
static void delivery_export_configuration(const struct Delivery *ctx) {
msg(STASIS_MSG_L2, "Exporting delivery configuration\n");
+
+ SYSDEBUG("Entering configuration directory: %s", ctx->storage.delivery_dir);
if (!pushd(ctx->storage.cfgdump_dir)) {
char filename[PATH_MAX] = {0};
+ SYSDEBUG("%s", "Populating filename");
snprintf(filename, sizeof(filename), "%s.ini", ctx->info.release_name);
+ SYSDEBUG("filename: %s", filename);
+
+ SYSDEBUG("%s: opening", filename);
FILE *spec = fopen(filename, "w+");
if (!spec) {
msg(STASIS_MSG_ERROR | STASIS_MSG_L2, "failed %s\n", filename);
exit(1);
}
+ SYSDEBUG("%s: writing", filename);
ini_write(ctx->_stasis_ini_fp.delivery, &spec, INI_WRITE_RAW);
+ SYSDEBUG("%s: writing done", filename);
fclose(spec);
+ SYSDEBUG("%s: closing", filename);
+ SYSDEBUG("%s", "Zeroing filename");
memset(filename, 0, sizeof(filename));
+ SYSDEBUG("%s", "Populating rendered filename");
snprintf(filename, sizeof(filename), "%s-rendered.ini", ctx->info.release_name);
+ SYSDEBUG("filename: %s", filename);
+
+ SYSDEBUG("%s: opening", filename);
spec = fopen(filename, "w+");
if (!spec) {
msg(STASIS_MSG_ERROR | STASIS_MSG_L2, "failed %s\n", filename);
exit(1);
}
+ SYSDEBUG("%s: writing", filename);
ini_write(ctx->_stasis_ini_fp.delivery, &spec, INI_WRITE_PRESERVE);
+ SYSDEBUG("%s: writing done", filename);
+ SYSDEBUG("%s: closing", filename);
fclose(spec);
+ SYSDEBUG("Returning from %s", ctx->storage.cfgdump_dir);
popd();
} else {
SYSERROR("Failed to enter directory: %s", ctx->storage.delivery_dir);