Re: [systemd-devel] sd-bus connections & authentication timeout

2017-03-30 Thread Lennart Poettering
On Mon, 20.03.17 16:37, Stanislav Angelovič (angelovi...@gmail.com) wrote: > Hi, > > We use sd-bus for DBus IPC in our own applications. Some applications of > ours cause the dbus daemon to issue "Connection has not authenticated soon > enough, closing it" message, leading to the >

Re: [systemd-devel] sd-bus connections & authentication timeout

2017-03-30 Thread Lennart Poettering
On Mon, 20.03.17 19:40, Stanislav Angelovič (angelovi...@gmail.com) wrote: > Hi Jan, > > thanks for quick response. Instead of sd_bus_process(), we could perhaps > use sd_bus_flush() after creating the connection, as that one actually > processes the requests until the connection changes state

Re: [systemd-devel] sd-bus connections & authentication timeout

2017-03-23 Thread Simon McVittie
On Mon, 20 Mar 2017 at 19:40:04 +0100, Stanislav Angelovič wrote: > Regarding polling, I understand, but I fear this way we could get race > condition on the connection instance, since we'd have a thread doing the > polling and processing in a loop on the connection, and some other thread (say >

Re: [systemd-devel] sd-bus connections & authentication timeout

2017-03-21 Thread Jan Alexander Steffens
On Mon, Mar 20, 2017 at 7:40 PM Stanislav Angelovič wrote: Hi Jan, thanks for quick response. Instead of sd_bus_process(), we could perhaps use sd_bus_flush() after creating the connection, as that one actually processes the requests until the connection changes state to

Re: [systemd-devel] sd-bus connections & authentication timeout

2017-03-20 Thread Stanislav Angelovič
Hi Jan, thanks for quick response. Instead of sd_bus_process(), we could perhaps use sd_bus_flush() after creating the connection, as that one actually processes the requests until the connection changes state to 'running'. I tried this and it helped. Regarding polling, I understand, but I fear

Re: [systemd-devel] sd-bus connections & authentication timeout

2017-03-20 Thread Jan Alexander Steffens
On Mon, Mar 20, 2017, 17:14 Jan Alexander Steffens wrote: > > You could try calling sd_bus_process(bus, NULL) in a loop while it returns > >0 so that the initial hello is handled. > Actually, never mind, this is not reliable. IIRC the initial handshake has multiple steps

Re: [systemd-devel] sd-bus connections & authentication timeout

2017-03-20 Thread Jan Alexander Steffens
On Mon, Mar 20, 2017, 16:37 Stanislav Angelovič wrote: > Hi, > > We use sd-bus for DBus IPC in our own applications. Some applications of > ours cause the dbus daemon to issue "Connection has not authenticated soon > enough, closing it" message, leading to the >