eds: Remove unnecessary locking
authorPhilip Withnall <philip@tecnocode.co.uk>
Sun, 26 Aug 2012 22:43:26 +0000 (23:43 +0100)
committerPhilip Withnall <philip@tecnocode.co.uk>
Tue, 28 Aug 2012 21:03:30 +0000 (22:03 +0100)
It didn’t achieve anything.

backends/eds/lib/edsf-persona-store.vala

index 05cdc17..cce55f7 100644 (file)
@@ -2099,17 +2099,15 @@ public class Edsf.PersonaStore : Folks.PersonaStore
   private void _contacts_added_cb (GLib.List<E.Contact> contacts)
     {
       var added_personas = new HashSet<Persona> ();
-      lock (this._personas)
+
+      foreach (E.Contact c in contacts)
         {
-          foreach (E.Contact c in contacts)
+          var iid = Edsf.Persona.build_iid_from_contact (this.id, c);
+          if (this._personas.has_key (iid) == false)
             {
-              var iid = Edsf.Persona.build_iid_from_contact (this.id, c);
-              if (this._personas.has_key (iid) == false)
-                {
-                  var persona = new Persona (this, c);
-                  this._personas.set (persona.iid, persona);
-                  added_personas.add (persona);
-                }
+              var persona = new Persona (this, c);
+              this._personas.set (persona.iid, persona);
+              added_personas.add (persona);
             }
         }