Fix missing call to trigger service list resorting
authorMarcel Holtmann <marcel@holtmann.org>
Wed, 22 Apr 2009 15:58:54 +0000 (16:58 +0100)
committerMarcel Holtmann <marcel@holtmann.org>
Wed, 22 Apr 2009 15:58:54 +0000 (16:58 +0100)
src/service.c

index 3f730aa..106595b 100644 (file)
@@ -774,6 +774,7 @@ static enum connman_service_mode convert_wifi_security(const char *security)
 struct connman_service *__connman_service_create_from_network(struct connman_network *network)
 {
        struct connman_service *service;
+       GSequenceIter *iter;
        const char *group, *str;
        char *name;
 
@@ -805,6 +806,10 @@ struct connman_service *__connman_service_create_from_network(struct connman_net
        str = connman_network_get_string(network, "WiFi.Security");
        service->security = convert_wifi_security(str);
 
+       iter = g_hash_table_lookup(service_hash, service->identifier);
+       if (iter != NULL)
+               g_sequence_sort_changed(iter, service_compare, NULL);
+
        service_register(service);
 
 done: