# HG changeset patch # User Timo Sirainen # Date 1190477013 -10800 # Node ID ee420f23810473c9190c9e09dc3e173c33af3623 # Parent 46c3e1ee196f2caaacf1e657d94399894db34867 Renamed hash_size() -> hash_count(). 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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) 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 @@ 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 *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_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 @@ 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 @@ 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)