Commit 29f97e9e authored by Marcus Lundblad's avatar Marcus Lundblad Committed by Youness Alaoui

Use a string hash on the string representation of a NiceAddress as a the hash value

parent 3869148c
......@@ -135,15 +135,11 @@ static gboolean priv_forget_send_request (gpointer pointer);
static guint
priv_nice_address_hash (gconstpointer data)
{
int *buf = (int *) data;
size_t i;
guint hash = 0;
gchar address[NICE_ADDRESS_STRING_LEN];
for (i = 0 ; i < sizeof(NiceAddress) / sizeof(int) ; i++) {
hash ^= g_int_hash(&buf[i]);
}
nice_address_to_string ((NiceAddress *) data, address);
return hash;
return g_str_hash(address);
}
static void
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment