summaryrefslogtreecommitdiff
path: root/src/irmd/reg/prog.c
diff options
context:
space:
mode:
authorThijs Paelman <thijs@ouroboros.rocks>2024-01-06 22:51:15 +0100
committerSander Vrijders <sander@ouroboros.rocks>2024-01-13 10:20:14 +0100
commita4c444b091d9ac9d189a7c475f68d6a51bd11ee5 (patch)
tree70f099ec641ac9613984f8b581e486e1e12a1e2a /src/irmd/reg/prog.c
parent8742a31bf672c5bc087601ec39ab1feb206d2446 (diff)
downloadouroboros-a4c444b091d9ac9d189a7c475f68d6a51bd11ee5.tar.gz
ouroboros-a4c444b091d9ac9d189a7c475f68d6a51bd11ee5.zip
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 <thijs@ouroboros.rocks> Signed-off-by: Sander Vrijders <sander@ouroboros.rocks>
Diffstat (limited to 'src/irmd/reg/prog.c')
-rw-r--r--src/irmd/reg/prog.c2
1 files changed, 1 insertions, 1 deletions
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;