changeset 6475:ee420f238104 HEAD

Renamed hash_size() -> hash_count().
author Timo Sirainen <tss@iki.fi>
date Sat, 22 Sep 2007 19:03:33 +0300
parents 46c3e1ee196f
children af14dc005392
files src/auth/db-ldap.c src/auth/db-passwd-file.c src/auth/passdb-ldap.c src/deliver/duplicate.c src/imap-login/client.c src/lib/hash.c src/lib/hash.h src/login-common/login-proxy.c src/login-common/ssl-proxy-openssl.c src/pop3-login/client.c
diffstat 10 files changed, 12 insertions(+), 12 deletions(-) [+]
line wrap: on
line diff
--- a/src/auth/db-ldap.c	Sat Sep 22 19:01:19 2007 +0300
+++ b/src/auth/db-ldap.c	Sat Sep 22 19:03:33 2007 +0300
@@ -289,7 +289,7 @@
 
 	i_assert(conn->connected);
 
-	if (hash_size(conn->requests) == 0 &&
+	if (hash_count(conn->requests) == 0 &&
 	    conn->delayed_requests_head == NULL)
 		return;
 
--- a/src/auth/db-passwd-file.c	Sat Sep 22 19:01:19 2007 +0300
+++ b/src/auth/db-passwd-file.c	Sat Sep 22 19:03:33 2007 +0300
@@ -203,7 +203,7 @@
 
 	if (pw->db->debug) {
 		i_info("passwd-file %s: Read %u users",
-		       pw->path, hash_size(pw->users));
+		       pw->path, hash_count(pw->users));
 	}
 	return TRUE;
 }
--- a/src/auth/passdb-ldap.c	Sat Sep 22 19:01:19 2007 +0300
+++ b/src/auth/passdb-ldap.c	Sat Sep 22 19:03:33 2007 +0300
@@ -182,7 +182,7 @@
 		return;
 	}
 
-	if (conn->connected && hash_size(conn->requests) == 0) {
+	if (conn->connected && hash_count(conn->requests) == 0) {
 		/* switch back to the default dn before doing the next search
 		   request */
 		conn->last_auth_bind = TRUE;
--- a/src/deliver/duplicate.c	Sat Sep 22 19:01:19 2007 +0300
+++ b/src/deliver/duplicate.c	Sat Sep 22 19:03:33 2007 +0300
@@ -147,7 +147,7 @@
 		i_stream_skip(input, id_size + user_size);
 	}
 
-	if (hash_size(file->hash) * COMPRESS_PERCENTAGE / 100 > change_count)
+	if (hash_count(file->hash) * COMPRESS_PERCENTAGE / 100 > change_count)
 		file->changed = TRUE;
 
 	i_stream_unref(&input);
--- a/src/imap-login/client.c	Sat Sep 22 19:01:19 2007 +0300
+++ b/src/imap-login/client.c	Sat Sep 22 19:03:33 2007 +0300
@@ -461,7 +461,7 @@
 		client_syslog(&client->common, reason);
 
 	hash_remove(clients, client);
-	if (hash_size(clients) == 0)
+	if (hash_count(clients) == 0)
 		timeout_remove(&to_idle);
 
 	if (client->input != NULL)
@@ -595,7 +595,7 @@
 
 unsigned int clients_get_count(void)
 {
-	return hash_size(clients);
+	return hash_count(clients);
 }
 
 void clients_notify_auth_connected(void)
--- a/src/lib/hash.c	Sat Sep 22 19:01:19 2007 +0300
+++ b/src/lib/hash.c	Sat Sep 22 19:03:33 2007 +0300
@@ -323,7 +323,7 @@
 		hash_compress(table, &table->nodes[hash % table->size]);
 }
 
-unsigned int hash_size(const struct hash_table *table)
+unsigned int hash_count(const struct hash_table *table)
 {
 	return table->nodes_count;
 }
--- a/src/lib/hash.h	Sat Sep 22 19:01:19 2007 +0300
+++ b/src/lib/hash.h	Sat Sep 22 19:03:33 2007 +0300
@@ -31,7 +31,7 @@
 void hash_update(struct hash_table *table, void *key, void *value);
 
 void hash_remove(struct hash_table *table, const void *key);
-unsigned int hash_size(const struct hash_table *table);
+unsigned int hash_count(const struct hash_table *table);
 
 /* Iterates through all nodes in hash table. You may safely call hash_*()
    functions while iterating, but if you add any new nodes, they may or may
--- a/src/login-common/login-proxy.c	Sat Sep 22 19:01:19 2007 +0300
+++ b/src/login-common/login-proxy.c	Sat Sep 22 19:03:33 2007 +0300
@@ -246,7 +246,7 @@
 
 unsigned int login_proxy_get_count(void)
 {
-	return login_proxies == NULL ? 0 : hash_size(login_proxies);
+	return login_proxies == NULL ? 0 : hash_count(login_proxies);
 }
 
 void login_proxy_detach(struct login_proxy *proxy, struct istream *client_input,
--- a/src/login-common/ssl-proxy-openssl.c	Sat Sep 22 19:01:19 2007 +0300
+++ b/src/login-common/ssl-proxy-openssl.c	Sat Sep 22 19:03:33 2007 +0300
@@ -661,7 +661,7 @@
 
 unsigned int ssl_proxy_get_count(void)
 {
-	return ssl_proxies == NULL ? 0 : hash_size(ssl_proxies);
+	return ssl_proxies == NULL ? 0 : hash_count(ssl_proxies);
 }
 
 static void *ssl_clean_malloc(size_t size)
--- a/src/pop3-login/client.c	Sat Sep 22 19:01:19 2007 +0300
+++ b/src/pop3-login/client.c	Sat Sep 22 19:03:33 2007 +0300
@@ -353,7 +353,7 @@
 		client_syslog(&client->common, reason);
 
 	hash_remove(clients, client);
-	if (hash_size(clients) == 0)
+	if (hash_count(clients) == 0)
 		timeout_remove(&to_idle);
 
 	if (client->input != NULL)
@@ -480,7 +480,7 @@
 
 unsigned int clients_get_count(void)
 {
-	return hash_size(clients);
+	return hash_count(clients);
 }
 
 void clients_notify_auth_connected(void)