ListenUSBFucntion socket together with adb service

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

 



Hi all,
I am trying to modify mine adb daemon to work with systemd. I have read that in order to work with daemon and socket  which will be listening on USB sockets i need to modify the implementation of mine daemon in order to work with systemd. To do this, I have modified lines in my adbd, so it is first using sd_listen_fds(0) command to check for file descriptors passed by the system manager. If this succed, than i am setting SD_LISTEN_FDS_START + proper_ep_id for control, bulk_out and bulk_in.

It all works just fine for the first connection, but if I unplug the usb cable and plug it back again, mine initialization command is run again and is falling because of calling again sd_listen_fds(0) which returns 1 instead of 3. I saw in the code that these fds may be closed by the adbd but commenting this didn' help. Is it possible that systemd on disconnecting the device may close them?

BR
Piotr Łobacz

Softgent Sp. z o.o., Budowlanych 31d, 80-298 Gdansk, POLAND

KRS: 0000674406, NIP: 9581679801, REGON: 367090912

www.softgent.com

Sąd Rejonowy Gdańsk-Północ w Gdańsku, VII Wydział Gospodarczy Krajowego Rejestru Sądowego

KRS 0000674406, Kapitał zakładowy: 25 000,00 zł wpłacony w całości.

_______________________________________________
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