This will be used afterwards, in configuration state, to start dhcp as a
client or as a server.
---
include/peer.h | 1 +
src/peer.c | 9 +++++++++
2 files changed, 10 insertions(+)
diff --git a/include/peer.h b/include/peer.h
index cdaee49..720d65b 100644
--- a/include/peer.h
+++ b/include/peer.h
@@ -58,6 +58,7 @@ void connman_peer_set_device(struct connman_peer *peer,
struct connman_device *connman_peer_get_device(struct connman_peer *peer);
void connman_peer_set_sub_device(struct connman_peer *peer,
struct connman_device *device);
+void connman_peer_set_as_master(struct connman_peer *peer, bool master);
int connman_peer_set_state(struct connman_peer *peer,
enum connman_peer_state new_state);
diff --git a/src/peer.c b/src/peer.c
index a905f04..3a6f178 100644
--- a/src/peer.c
+++ b/src/peer.c
@@ -51,6 +51,7 @@ struct connman_peer {
struct connman_ipconfig *ipconfig;
DBusMessage *pending;
bool registered;
+ bool connection_master;
};
static void reply_pending(struct connman_peer *peer, int error)
@@ -484,6 +485,14 @@ void connman_peer_set_sub_device(struct connman_peer *peer,
peer->sub_device = device;
}
+void connman_peer_set_as_master(struct connman_peer *peer, bool master)
+{
+ if (!peer || !is_connecting(peer))
+ return;
+
+ peer->connection_master = master;
+}
+
static void dhcp_callback(struct connman_ipconfig *ipconfig,
struct connman_network *network,
bool success, gpointer data)
--
1.8.5.5
_______________________________________________
connman mailing list
[email protected]
https://lists.connman.net/mailman/listinfo/connman