summaryrefslogtreecommitdiff
path: root/src/iface.c
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2008-04-07 04:01:28 +0200
committerMarcel Holtmann <marcel@holtmann.org>2008-04-07 04:01:28 +0200
commit56b36256ff076ccc319b0d591c96fef98e3ce893 (patch)
treed52d65e0f2d4e56614c568ebb37fe2b2426561e8 /src/iface.c
parent425dafdb4b29c2dc415bb6e299cd575103481b04 (diff)
downloadconnman-56b36256ff076ccc319b0d591c96fef98e3ce893.tar.gz
connman-56b36256ff076ccc319b0d591c96fef98e3ce893.tar.bz2
connman-56b36256ff076ccc319b0d591c96fef98e3ce893.zip
Implement master state and fix Network Manager compat methods
Diffstat (limited to 'src/iface.c')
-rw-r--r--src/iface.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/iface.c b/src/iface.c
index dc24dd26..a29c9019 100644
--- a/src/iface.c
+++ b/src/iface.c
@@ -97,6 +97,25 @@ void __connman_iface_list(DBusMessageIter *iter)
}
}
+gboolean __connman_iface_is_connected(void)
+{
+ GSList *list;
+ gboolean connected = FALSE;
+
+ DBG("");
+
+ for (list = interfaces; list; list = list->next) {
+ struct connman_iface *iface = list->data;
+
+ if (iface->state == CONNMAN_IFACE_STATE_READY) {
+ connected = TRUE;
+ break;
+ }
+ }
+
+ return connected;
+}
+
static void append_entry(DBusMessageIter *dict,
const char *key, int type, void *val)
{