Re: sd_bus_add_match callback

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Do, 09.04.20 14:12, David J (emacsd@xxxxxxxxxx) 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@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/systemd-devel




[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux