This will be used in the wifi plugin, and then gsupplicant, to set the go intent relevantly. The function is declared in peer.h but the actual implementation is in peer_service.h, I thought there were no need to create yet another header file moreover there will not be much from peer_service.c available for plugins. This function might be the only one. --- include/peer.h | 2 ++ src/peer_service.c | 8 ++++++++ 2 files changed, 10 insertions(+)
diff --git a/include/peer.h b/include/peer.h index e98e442..8a690f5 100644 --- a/include/peer.h +++ b/include/peer.h @@ -107,6 +107,8 @@ struct connman_peer_driver { int connman_peer_driver_register(struct connman_peer_driver *driver); void connman_peer_driver_unregister(struct connman_peer_driver *driver); +bool connman_peer_service_is_master(void); + #ifdef __cplusplus } #endif diff --git a/src/peer_service.c b/src/peer_service.c index 8fc0247..053672a 100644 --- a/src/peer_service.c +++ b/src/peer_service.c @@ -387,6 +387,14 @@ int __connman_peer_service_unregister(const char *owner, return 0; } +bool connman_peer_service_is_master(void) +{ + if (!peer_master || !peer_driver) + return false; + + return true; +} + int __connman_peer_service_init(void) { DBG(""); -- 1.8.5.5 _______________________________________________ connman mailing list connman@connman.net https://lists.connman.net/mailman/listinfo/connman