mirror of
https://github.com/simon987/sist2.git
synced 2025-04-16 08:56:45 +00:00
Merge pull request #249 from yatli/index_script_fix
do not log arg script if null
This commit is contained in:
commit
3c09c45694
14
src/cli.c
14
src/cli.c
@ -374,15 +374,15 @@ int index_args_validate(index_args_t *args, int argc, const char **argv) {
|
|||||||
LOG_DEBUGF("cli.c", "arg es_index=%s", args->es_index)
|
LOG_DEBUGF("cli.c", "arg es_index=%s", args->es_index)
|
||||||
LOG_DEBUGF("cli.c", "arg index_path=%s", args->index_path)
|
LOG_DEBUGF("cli.c", "arg index_path=%s", args->index_path)
|
||||||
LOG_DEBUGF("cli.c", "arg script_path=%s", args->script_path)
|
LOG_DEBUGF("cli.c", "arg script_path=%s", args->script_path)
|
||||||
|
LOG_DEBUGF("cli.c", "arg async_script=%d", args->async_script)
|
||||||
|
|
||||||
char log_buf[5000];
|
if (args->script) {
|
||||||
strncpy(log_buf, args->script, sizeof(log_buf));
|
char log_buf[5000];
|
||||||
*(log_buf + sizeof(log_buf) - 1) = '\0';
|
|
||||||
LOG_DEBUGF("cli.c", "arg async_script=%s", log_buf)
|
|
||||||
|
|
||||||
strncpy(log_buf, args->script, sizeof(log_buf));
|
strncpy(log_buf, args->script, sizeof(log_buf));
|
||||||
*(log_buf + sizeof(log_buf) - 1) = '\0';
|
*(log_buf + sizeof(log_buf) - 1) = '\0';
|
||||||
LOG_DEBUGF("cli.c", "arg script=%s", log_buf)
|
LOG_DEBUGF("cli.c", "arg script=%s", log_buf)
|
||||||
|
}
|
||||||
|
|
||||||
LOG_DEBUGF("cli.c", "arg print=%d", args->print)
|
LOG_DEBUGF("cli.c", "arg print=%d", args->print)
|
||||||
LOG_DEBUGF("cli.c", "arg es_mappings_path=%s", args->es_mappings_path)
|
LOG_DEBUGF("cli.c", "arg es_mappings_path=%s", args->es_mappings_path)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user