}
gint
-rspamd_inet_address_compare_ptr (const gpointer a1,
- const gpointer a2)
+rspamd_inet_address_compare_ptr (gconstpointer a1,
+ gconstpointer a2)
{
- const rspamd_inet_addr_t **i1 = a1, **i2 = a2;
+ const rspamd_inet_addr_t **i1 = (const rspamd_inet_addr_t **)a1,
+ **i2 = (const rspamd_inet_addr_t **)a2;
return rspamd_inet_address_compare (*i1, *i2);
}
* @param a2
* @return
*/
-gint rspamd_inet_address_compare_ptr (const gpointer a1,
- const gpointer a2);
+gint rspamd_inet_address_compare_ptr (gconstpointer a1,
+ gconstpointer a2);
/**
* Performs deep copy of rspamd inet addr
* @param addr
gpointer xxh;
guint i, keylen;
guint8 *key;
+ rspamd_inet_addr_t *addr;
+ guint16 port;
xxh = XXH32_init (0xdeadbeef);
if (cf->is_systemd) {
else {
XXH32_update (xxh, cf->name, strlen (cf->name));
for (i = 0; i < cf->cnt; i ++) {
+ addr = g_ptr_array_index (cf->addrs, i);
key = rspamd_inet_address_get_radix_key (
- g_ptr_array_index (cf->addrs, i), &keylen);
+ addr, &keylen);
XXH32_update (xxh, key, keylen);
+ port = rspamd_inet_address_get_port (addr);
+ XXH32_update (xxh, &port, sizeof (port));
}
}