Changed the service resource hashing function into a proper string hashing function.

This commit is contained in:
Markus Makela
2015-06-30 19:16:49 +03:00
parent e350f19e6f
commit a2e31d6846

View File

@ -1842,18 +1842,6 @@ char *mysql_format_user_entry(void *data)
return mysql_user; return mysql_user;
} }
/*
* The hash function we use for storing MySQL database names.
*
* @param key The key value
* @return The hash key
*/
int
resource_hash(char *key)
{
return (*key + *(key + 1));
}
/** /**
* Remove the resources table * Remove the resources table
* *
@ -1877,7 +1865,7 @@ resource_alloc()
{ {
HASHTABLE *resources; HASHTABLE *resources;
if ((resources = hashtable_alloc(10, resource_hash, strcmp)) == NULL) if ((resources = hashtable_alloc(10, simple_str_hash, strcmp)) == NULL)
{ {
return NULL; return NULL;
} }