mirror of
https://github.com/strongswan/strongswan.git
synced 2025-10-04 00:00:14 -04:00
eap-radius: Fix incompatible function types warnings
This commit is contained in:
parent
9b2e9a943c
commit
cceca1a3c4
@ -379,7 +379,8 @@ static void process_coa(private_eap_radius_dae_t *this,
|
||||
/**
|
||||
* 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);
|
||||
@ -530,8 +531,7 @@ eap_radius_dae_t *eap_radius_dae_create(eap_radius_accounting_t *accounting)
|
||||
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;
|
||||
}
|
||||
|
@ -152,17 +152,18 @@ static void put_or_destroy_entry(hashtable_t *hashtable, entry_t *entry)
|
||||
/**
|
||||
* 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;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -553,10 +554,8 @@ eap_radius_provider_t *eap_radius_provider_create()
|
||||
.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),
|
||||
},
|
||||
);
|
||||
|
Loading…
x
Reference in New Issue
Block a user