summaryrefslogtreecommitdiffstats
path: root/src/providers/child_common.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/providers/child_common.c')
-rw-r--r--src/providers/child_common.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/providers/child_common.c b/src/providers/child_common.c
index 6e0f6a1a7..cde310c3b 100644
--- a/src/providers/child_common.c
+++ b/src/providers/child_common.c
@@ -378,7 +378,7 @@ static errno_t prepare_child_argv(TALLOC_CTX *mem_ctx,
const char *binary,
char ***_argv)
{
- uint_t argc = 3; /* program name, debug_level and NULL */
+ uint_t argc = 4; /* program name, debug_level, debug_timestamps and NULL */
char ** argv;
errno_t ret = EINVAL;
@@ -387,7 +387,6 @@ static errno_t prepare_child_argv(TALLOC_CTX *mem_ctx,
bool child_debug_timestamps = debug_timestamps;
if (child_debug_to_file) argc++;
- if (!child_debug_timestamps) argc++;
/* program name, debug_level,
* debug_to_file, debug_timestamps
@@ -416,12 +415,11 @@ static errno_t prepare_child_argv(TALLOC_CTX *mem_ctx,
}
}
- if (!child_debug_timestamps) {
- argv[--argc] = talloc_strdup(argv, "--debug-timestamps=0");
- if (argv[argc] == NULL) {
- ret = ENOMEM;
- goto fail;
- }
+ argv[--argc] = talloc_asprintf(argv, "--debug-timestamps=%d",
+ child_debug_timestamps);
+ if (argv[argc] == NULL) {
+ ret = ENOMEM;
+ goto fail;
}
argv[--argc] = talloc_strdup(argv, binary);