dovecot: Renamed hash_size() -> hash_count().

dovecot at dovecot.org dovecot at dovecot.org
Sat Sep 22 19:40:51 EEST 2007


details:   http://hg.dovecot.org/dovecot/rev/ee420f238104
changeset: 6475:ee420f238104
user:      Timo Sirainen <tss at iki.fi>
date:      Sat Sep 22 19:03:33 2007 +0300
description:
Renamed hash_size() -> hash_count().

diffstat:

10 files changed, 12 insertions(+), 12 deletions(-)
src/auth/db-ldap.c                   |    2 +-
src/auth/db-passwd-file.c            |    2 +-
src/auth/passdb-ldap.c               |    2 +-
src/deliver/duplicate.c              |    2 +-
src/imap-login/client.c              |    4 ++--
src/lib/hash.c                       |    2 +-
src/lib/hash.h                       |    2 +-
src/login-common/login-proxy.c       |    2 +-
src/login-common/ssl-proxy-openssl.c |    2 +-
src/pop3-login/client.c              |    4 ++--

diffs (138 lines):

diff -r 46c3e1ee196f -r ee420f238104 src/auth/db-ldap.c
--- 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 @@ static void ldap_conn_retry_requests(str
 
 	i_assert(conn->connected);
 
-	if (hash_size(conn->requests) == 0 &&
+	if (hash_count(conn->requests) == 0 &&
 	    conn->delayed_requests_head == NULL)
 		return;
 
diff -r 46c3e1ee196f -r ee420f238104 src/auth/db-passwd-file.c
--- 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 @@ static bool passwd_file_open(struct pass
 
 	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;
 }
diff -r 46c3e1ee196f -r ee420f238104 src/auth/passdb-ldap.c
--- 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 @@ static void authbind_start(struct ldap_c
 		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;
diff -r 46c3e1ee196f -r ee420f238104 src/deliver/duplicate.c
--- 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 @@ static int duplicate_read(struct duplica
 		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);
diff -r 46c3e1ee196f -r ee420f238104 src/imap-login/client.c
--- 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 @@ void client_destroy(struct imap_client *
 		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 @@ static void idle_timeout(void *context A
 
 unsigned int clients_get_count(void)
 {
-	return hash_size(clients);
+	return hash_count(clients);
 }
 
 void clients_notify_auth_connected(void)
diff -r 46c3e1ee196f -r ee420f238104 src/lib/hash.c
--- 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 @@ void hash_remove(struct hash_table *tabl
 		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;
 }
diff -r 46c3e1ee196f -r ee420f238104 src/lib/hash.h
--- 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 *tabl
 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
diff -r 46c3e1ee196f -r ee420f238104 src/login-common/login-proxy.c
--- 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_port(struct
 
 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,
diff -r 46c3e1ee196f -r ee420f238104 src/login-common/ssl-proxy-openssl.c
--- 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 @@ pem_password_callback(char *buf, int siz
 
 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)
diff -r 46c3e1ee196f -r ee420f238104 src/pop3-login/client.c
--- 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 @@ void client_destroy(struct pop3_client *
 		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 @@ static void idle_timeout(void *context A
 
 unsigned int clients_get_count(void)
 {
-	return hash_size(clients);
+	return hash_count(clients);
 }
 
 void clients_notify_auth_connected(void)


More information about the dovecot-cvs mailing list