/**
* Receive RADIUS DAE requests
*/
-static bool receive(private_eap_radius_dae_t *this)
+CALLBACK(receive, bool,
+ private_eap_radius_dae_t *this, int fd, watcher_event_t event)
{
struct sockaddr_storage addr;
socklen_t addr_len = sizeof(addr);
return NULL;
}
- lib->watcher->add(lib->watcher, this->fd, WATCHER_READ,
- (watcher_cb_t)receive, this);
+ lib->watcher->add(lib->watcher, this->fd, WATCHER_READ, receive, this);
return &this->public;
}
/**
* Hashtable hash function
*/
-static u_int hash(uintptr_t id)
+static u_int hash(const void *key)
{
- return id;
+ uintptr_t id = (uintptr_t)key;
+ return chunk_hash(chunk_from_thing(id));
}
/**
* Hashtable equals function
*/
-static bool equals(uintptr_t a, uintptr_t b)
+static bool equals(const void *a, const void *b)
{
- return a == b;
+ return (uintptr_t)a == (uintptr_t)b;
}
/**
.ike_rekey = _ike_rekey,
.message = _message_hook,
},
- .claimed = hashtable_create((hashtable_hash_t)hash,
- (hashtable_equals_t)equals, 32),
- .unclaimed = hashtable_create((hashtable_hash_t)hash,
- (hashtable_equals_t)equals, 32),
+ .claimed = hashtable_create(hash, equals, 32),
+ .unclaimed = hashtable_create(hash, equals, 32),
.mutex = mutex_create(MUTEX_TYPE_DEFAULT),
},
);