Fix deregistering of applications
authorMike Gorse <mgorse@suse.com>
Fri, 7 Dec 2012 17:21:19 +0000 (11:21 -0600)
committerMike Gorse <mgorse@suse.com>
Fri, 7 Dec 2012 17:21:19 +0000 (11:21 -0600)
registryd/registry.c

index a64e094..e283a90 100644 (file)
@@ -290,9 +290,10 @@ handle_disconnection (DBusConnection *bus, DBusMessage *message, void *user_data
           for (i = 0; i < reg->apps->len; i++)
             {
               SpiReference *ref  = g_ptr_array_index (reg->apps, i);
-              while (!g_strcmp0 (old, ref->name))
+              if (!g_strcmp0 (old, ref->name))
                 {
                   remove_application (reg, bus, i);
+                  i--;
                 }
             }