summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2009-07-22 21:02:56 +0200
committerMarcel Holtmann <marcel@holtmann.org>2009-07-22 21:02:56 +0200
commit533f25a598455b8e680a2b80aaa4eb5a66b21411 (patch)
treefb128bf18450ce38b2115e62ba3c8ba57dc43213
parent3b6cb8f2cfe097a175c6d5665500aa68ad55fb44 (diff)
downloadconnman-533f25a598455b8e680a2b80aaa4eb5a66b21411.tar.gz
connman-533f25a598455b8e680a2b80aaa4eb5a66b21411.tar.bz2
connman-533f25a598455b8e680a2b80aaa4eb5a66b21411.zip
Fix the state value of Network Manager compatibility support
-rw-r--r--src/manager.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/manager.c b/src/manager.c
index 99a0724a..113a9077 100644
--- a/src/manager.c
+++ b/src/manager.c
@@ -608,7 +608,10 @@ static DBusMessage *nm_state(DBusConnection *conn,
if (reply == NULL)
return NULL;
- state = NM_STATE_DISCONNECTED;
+ if (__connman_element_count(NULL, CONNMAN_ELEMENT_TYPE_CONNECTION) > 0)
+ state = NM_STATE_CONNECTED;
+ else
+ state = NM_STATE_DISCONNECTED;
dbus_message_append_args(reply, DBUS_TYPE_UINT32, &state,
DBUS_TYPE_INVALID);