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;
for (i = 0 ; i < sizeof(NiceAddress) / sizeof(int) ; i++) {
hash ^= g_int_hash(&buf[i]);
}
gchar address[NICE_ADDRESS_STRING_LEN];
nice_address_to_string ((NiceAddress *) data, address);
return hash;
return g_str_hash(address);
}
static void
......@@ -156,7 +152,7 @@ priv_send_data_queue_destroy (gpointer data)
SendData *data = (SendData *) i->data;
g_free (data->data);
g_slice_free (SendData, data);
g_slice_free (SendData, data);
}
g_queue_free (send_queue);
}
......
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