diff src/protocols/oscar/snac.c @ 2270:d82efea341ef

[gaim-migrate @ 2280] new libfaim. stupid bugs. committer: Tailor Script <tailor@pidgin.im>
author Eric Warmenhoven <eric@warmenhoven.org>
date Wed, 12 Sep 2001 00:39:51 +0000
parents 933346315b9b
children b32474e522fa
line wrap: on
line diff
--- a/src/protocols/oscar/snac.c	Tue Sep 11 21:05:16 2001 +0000
+++ b/src/protocols/oscar/snac.c	Wed Sep 12 00:39:51 2001 +0000
@@ -22,10 +22,8 @@
 {
 	int i;
 
-	for (i = 0; i < FAIM_SNAC_HASH_SIZE; i++) {
+	for (i = 0; i < FAIM_SNAC_HASH_SIZE; i++)
 		sess->snac_hash[i] = NULL;
-		faim_mutex_init(&sess->snac_hash_locks[i]);
-	}
 
 	return;
 }
@@ -68,10 +66,8 @@
 
 	index = snac->id % FAIM_SNAC_HASH_SIZE;
 
-	faim_mutex_lock(&sess->snac_hash_locks[index]);
 	snac->next = (aim_snac_t *)sess->snac_hash[index];
 	sess->snac_hash[index] = (void *)snac;
-	faim_mutex_unlock(&sess->snac_hash_locks[index]);
 
 	return snac->id;
 }
@@ -90,7 +86,6 @@
 
 	index = id % FAIM_SNAC_HASH_SIZE;
 
-	faim_mutex_lock(&sess->snac_hash_locks[index]);
 	for (prev = (aim_snac_t **)&sess->snac_hash[index]; (cur = *prev); ) {
 		if (cur->id == id) {
 			*prev = cur->next;
@@ -98,7 +93,6 @@
 		} else
 			prev = &cur->next;
 	}
-	faim_mutex_unlock(&sess->snac_hash_locks[index]);
 
 	return cur;
 }
@@ -118,11 +112,8 @@
 		aim_snac_t *cur, **prev;
 		time_t curtime;
 
-		faim_mutex_lock(&sess->snac_hash_locks[i]);
-		if (!sess->snac_hash[i]) {
-			faim_mutex_unlock(&sess->snac_hash_locks[i]);
+		if (!sess->snac_hash[i])
 			continue;
-		}
 
 		curtime = time(NULL); /* done here in case we waited for the lock */
 
@@ -138,7 +129,6 @@
 			} else
 				prev = &cur->next;
 		}
-		faim_mutex_unlock(&sess->snac_hash_locks[i]);
 	}
 
 	return;