Skip to content

SCL: impossible to propagate empty string parameter through __VARARGS__ #341

@MrAnno

Description

@MrAnno
@version: current

block destination second(...) {
  # something useful with an empty string parameter
};

block destination first(...) {
      second(`__VARARGS__`);
};

log {
   destination{ first(some-param("")) };
};
In /home/anno/dev/axo/syslog/install/etc/syslog-ng.conf:9:28-9:29:
4
5       #Start Block block destination first() at /home/anno/dev/axo/syslog/install/etc/syslog-ng.conf:8
6       ## some_param=
7       @line "/home/anno/dev/axo/syslog/install/etc/syslog-ng.conf" 8 30
8
9----->       second(some_param() );
9----->                            ^
10
11      #End Block block destination first() at /home/anno/dev/axo/syslog/install/etc/syslog-ng.conf:8
12

syslog-ng/syslog-ng#2088 (comment) says the following:

As "" is not mapped into "" anymore, this is a problem needs to be addressed. Luckily, we could break the cycle here, do not need to find another symbol that would be mapped to "", of which again find a symbol that maps to the underlying symbol etc. This can be addressed by modifying such scl. I show an example for this:

Unfortunately, this is not so lucky with varargs. With the current implementation, it is impossible to pass an empty string parameter through varargs.

Remainder from #254

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions