Add ObjectManager interface to connman
PATCH 1/1 Add ObjectManager interface to connman
ObjectManager let us to understand if the connman interface is up before use it. InterfacesAdded and InterfacesRemoved signals will then be emitted.
int main()
{
auto connection = sdbus::createSystemBusConnection();
auto managerProxy = std::make_unique<ManagerProxy>(*connection, "net.connman", "/");
try {
managerProxy->handleExistingObjects();
}
catch (const sdbus::Error& e) {
if (e.getName() == "org.freedesktop.DBus.Error.ServiceUnknown") {
std::cout << "Waiting for server to start ..." << std::endl;
}
}
connection->enterEventLoop();
return 0;
}--- src/dbus.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
src/dbus.c +1 -1
@@ -687,7 +687,7 @@ int __connman_dbus_init(DBusConnection *conn) connection = conn; -return 0 ; +return g_dbus_attach_object_manager (conn); }void __connman_dbus_cleanup (void )
Signature · 1 line
2.25.1
Hi
Sorry Daniel for the signed-off. I will try to adjust my policy here
Quoted 44 lines · Michael Trimarchi
ObjectManager let us to understand if the connman interface is up before use it. InterfacesAdded and InterfacesRemoved signals will then be emitted.
int
main(){ auto connection = sdbus::createSystemBusConnection(); auto managerProxy = std::make_unique<ManagerProxy>(*connection, "net.connman", "/"); try { managerProxy->handleExistingObjects(); } catch (const sdbus::Error& e) { if (e.getName() == "org.freedesktop.DBus.Error.ServiceUnknown") { std::cout << "Waiting for server to start ..." << std::endl; } } connection->enterEventLoop(); return 0; }Signed-off-by Michael Trimarchi <[email protected]>--- src/dbus.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)src/dbus.c +1
-2@@ -687,7 +687,7 @@ int __connman_dbus_init(DBusConnection *conn) connection = conn; -return 0 ; +return g_dbus_attach_object_manager (conn); }void __connman_dbus_cleanup (void ) --2.25.1
Signature · 11 lines
Michael Nazzareno Trimarchi Co-Founder & Chief Executive Officer M. +39 347 913 2170 [email protected] __________________________________ Amarula Solutions BV Joop Geesinkweg 125, 1114 AB, Amsterdam, NL T. +31 (0)85 111 9172 [email protected] www.amarulasolutions.com
Hi Michael,
Quoted 1 line · Michael Nazzareno Trimarchi
Sorry Daniel for the signed-off. I will try to adjust my policy here
No worries, was easy to fixup.
Patch applied.
Thanks,
Daniel
Daniel Wagner
AppliedQuoted 9 lines · Michael Trimarchi
ObjectManager let us to understand if the connman interface is up before use it. InterfacesAdded and InterfacesRemoved signals will then be emitted.
int
main(){ auto connection = sdbus::createSystemBusConnection();[...]
Applied, thanks!
[1/1] Add ObjectManager interface to connman
commit: 8122063b3ccc62563f91a2cc04899baecf0d66fd
Best regards,
Signature · 1 line
Daniel Wagner <[email protected]>