Re: [systemd-devel] Calling sd_bus_reply_method_return outside method handler

2019-01-24 Thread Jean Valjean
After some experimentation I came to realize that it is not possible to send a response to a message at later time if handler is registered with sd_bus_add_object_vtable for some object and interface. The message must be processed and reply send in function that given to sd_bus_vtable. To work

Re: [systemd-devel] Calling sd_bus_reply_method_return outside method handler

2019-01-15 Thread Jean Valjean
Thank you for your explanation, Lenart. I tried different approach. Everything is running on a single thread. I have a global `sd_bus_message* test` variable. I do the following int method_handler(sd_bus_message* m, void* /*userdata*/, sd_bus_error* /*error*/) { test = sd_bus_message_ref(m);

Re: [systemd-devel] Calling sd_bus_reply_method_return outside method handler

2019-01-15 Thread Lennart Poettering
On Mo, 14.01.19 21:07, Jean Valjean (valjean.jean1...@gmail.com) wrote: > I want to send a reply to a method call outside method_handler. Is it > possible? > In the method_handler I increase reference count of sd_bus_message and send > it to the other thread. From there I want to call >

[systemd-devel] Calling sd_bus_reply_method_return outside method handler

2019-01-14 Thread Jean Valjean
I want to send a reply to a method call outside method_handler. Is it possible? In the method_handler I increase reference count of sd_bus_message and send it to the other thread. From there I want to call sd_bus_reply_method_return to send a reply but get Unknown method or interface error when I