Report AutoConnect as false if not a favorite service
authorMarcel Holtmann <marcel@holtmann.org>
Fri, 7 Aug 2009 17:06:54 +0000 (10:06 -0700)
committerMarcel Holtmann <marcel@holtmann.org>
Fri, 7 Aug 2009 17:06:54 +0000 (10:06 -0700)
src/service.c

index f990e29..639ade8 100644 (file)
@@ -396,8 +396,12 @@ static DBusMessage *get_properties(DBusConnection *conn,
        connman_dbus_dict_append_variant(&dict, "Favorite",
                                        DBUS_TYPE_BOOLEAN, &service->favorite);
 
-       connman_dbus_dict_append_variant(&dict, "AutoConnect",
+       if (service->favorite == TRUE)
+               connman_dbus_dict_append_variant(&dict, "AutoConnect",
                                DBUS_TYPE_BOOLEAN, &service->autoconnect);
+       else
+               connman_dbus_dict_append_variant(&dict, "AutoConnect",
+                                       DBUS_TYPE_BOOLEAN, &service->favorite);
 
        if (service->name != NULL)
                connman_dbus_dict_append_variant(&dict, "Name",