From a4c444b091d9ac9d189a7c475f68d6a51bd11ee5 Mon Sep 17 00:00:00 2001 From: Thijs Paelman Date: Sat, 6 Jan 2024 22:51:15 +0100 Subject: irmd: Fix parsing empty argument in configfile Previously, args=[""] would crash the IRMd when it tried to auto-instantiate the program. Now, specifying an empty string as argument to a program WILL automatically start that program if there is an incoming flow, but without any arguments, as intended. Remark: The semantics might be a bit less clear than e.g. args=["--listen"], but they are a natural extension. Signed-off-by: Thijs Paelman Signed-off-by: Sander Vrijders --- src/irmd/reg/prog.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/irmd/reg/prog.c b/src/irmd/reg/prog.c index 660a7674..d1003d80 100644 --- a/src/irmd/reg/prog.c +++ b/src/irmd/reg/prog.c @@ -90,7 +90,7 @@ struct reg_prog * reg_prog_create(const char * prog, if (p->prog == NULL) goto fail_prog; - if (argc > 0 && flags & BIND_AUTO) { + if (flags & BIND_AUTO) { p->argv = create_argv(prog, argc, argv); if (p->argv == NULL) goto fail_argv; -- cgit v1.2.3