Re: [systemd-devel] sd_bus_get_unique_name returns -EBADMSG or -EBUSY

2021-04-07 Thread Carlo Wood
On Wed, 7 Apr 2021 16:15:40 +0200 Lennart Poettering wrote: > > > As you stated in the linked email, there is no global state. > > So, I suppose that if I call any sd_bus_* function that > > all that I have to take into account is that the data > > that is passed to those functions is

Re: [systemd-devel] sd_bus_get_unique_name returns -EBADMSG or -EBUSY

2021-04-07 Thread Carlo Wood
On Tue, 6 Apr 2021 18:41:21 +0200 Lennart Poettering wrote: > EBADMSG usually means that somehow an invalid dbus packet we couldn't > parse entered the stream. maybe some memory corruption thing? or maybe > you are using this in a threaded env without locking? > > Lennart Yes, that is the

[systemd-devel] sd_bus_get_unique_name returns -EBADMSG or -EBUSY

2021-04-01 Thread Carlo Wood
I am getting all kinds of unlisted errors from sd_bus_get_unique_name. EBADMSG and EBUSY are not listed on the manual page of sd_bus_get_unique_name. What is the cause of these errors, and how should I deal with them? Carlo Wood ___ systemd-devel

[systemd-devel] For C++ coders: dbus::Error

2021-03-06 Thread Carlo Wood
age() << "]\n"; See https://github.com/CarloWood/dbus-task/blob/master/tests/client_side_concatenate_test.cxx for all the context. Regards, Carlo Wood ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/systemd-devel

Re: [systemd-devel] sdbus errors and their underlaying int value: unique?

2021-03-05 Thread Carlo Wood
On Thu, 4 Mar 2021 10:46:43 -0300 Cristian Rodríguez wrote: > On Tue, Mar 2, 2021 at 7:55 AM Carlo Wood wrote: > > > On Tue, 2 Mar 2021 10:40:25 +0100 > > Carlo Wood wrote: > > > > > I'm not writing my own C++ wrappers around sbus. > > > > I'm

Re: [systemd-devel] Antw: [EXT] D-bus connection Unknown error

2021-03-03 Thread Carlo Wood
On Wed, 03 Mar 2021 07:59:03 +0100 "Ulrich Windl" wrote: > > Failed to get D-bus connection: Unknown error -1 > > I have no idea, but I think "unknown error" is bad programming style; > it's like "something went wrong; go and figure...". I can't agree more (I always go out of my way to have

Re: [systemd-devel] sdbus errors and their underlaying int value: unique?

2021-03-02 Thread Carlo Wood
On Tue, 2 Mar 2021 10:40:25 +0100 Carlo Wood wrote: > I'm not writing my own C++ wrappers around sbus. I'm now* writing my own C++ wrappers around sbus. ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org https://lists.freedesktop.

[systemd-devel] sdbus errors and their underlaying int value: unique?

2021-03-02 Thread Carlo Wood
Hello, thank you for you previous help; I made a lot of progress. I'm not writing my own C++ wrappers around sbus. I have the following question: A sd_bus_error has a name (and a message). The name is usually something like "org.freedesktop.DBus.Error.InvalidArgs" or

[systemd-devel] Using sdbus-cpp

2021-02-26 Thread Carlo Wood
ock :/. To make a long story short, what do I have to do to be able to use this library if I don't want it to block? Thanks in advance, Carlo Wood ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listi