On Do, 09.04.20 14:12, David J (ema...@icloud.com) wrote:

> Hello Systemd developers!
>
> > I asked this question earlier but I haven’t gotten any reply so I thought 
> > asking again.
>
> > Question regarding sd_bus_add_match (sd-bus.c):
> >
> > Is there any bad consequences to use the same callback for
> > multiple signal match and then using the userdata parameter to
> > distinguish among the different signals? See the sample code below
> > for a reference of what I am trying to do.

No sure why one would do that, but the userdata argument is something
you can use any way you like. Most people stick some context object
pointer in it, but it's entirely fine to place anything else there,
for example an enum that you cast to a pointer.

Lennart

--
Lennart Poettering, Berlin
_______________________________________________
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel

Reply via email to