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); ...@@ -135,15 +135,11 @@ static gboolean priv_forget_send_request (gpointer pointer);
static guint static guint
priv_nice_address_hash (gconstpointer data) priv_nice_address_hash (gconstpointer data)
{ {
int *buf = (int *) data; gchar address[NICE_ADDRESS_STRING_LEN];
size_t i;
guint hash = 0;
for (i = 0 ; i < sizeof(NiceAddress) / sizeof(int) ; i++) { nice_address_to_string ((NiceAddress *) data, address);
hash ^= g_int_hash(&buf[i]);
}
return hash; return g_str_hash(address);
} }
static void 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