eap-radius: Fix incompatible function types warnings
This commit is contained in:
@@ -379,7 +379,8 @@ static void process_coa(private_eap_radius_dae_t *this,
|
|||||||
/**
|
/**
|
||||||
* Receive RADIUS DAE requests
|
* 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;
|
struct sockaddr_storage addr;
|
||||||
socklen_t addr_len = sizeof(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;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
lib->watcher->add(lib->watcher, this->fd, WATCHER_READ,
|
lib->watcher->add(lib->watcher, this->fd, WATCHER_READ, receive, this);
|
||||||
(watcher_cb_t)receive, this);
|
|
||||||
|
|
||||||
return &this->public;
|
return &this->public;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -152,17 +152,18 @@ static void put_or_destroy_entry(hashtable_t *hashtable, entry_t *entry)
|
|||||||
/**
|
/**
|
||||||
* Hashtable hash function
|
* 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
|
* 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,
|
.ike_rekey = _ike_rekey,
|
||||||
.message = _message_hook,
|
.message = _message_hook,
|
||||||
},
|
},
|
||||||
.claimed = hashtable_create((hashtable_hash_t)hash,
|
.claimed = hashtable_create(hash, equals, 32),
|
||||||
(hashtable_equals_t)equals, 32),
|
.unclaimed = hashtable_create(hash, equals, 32),
|
||||||
.unclaimed = hashtable_create((hashtable_hash_t)hash,
|
|
||||||
(hashtable_equals_t)equals, 32),
|
|
||||||
.mutex = mutex_create(MUTEX_TYPE_DEFAULT),
|
.mutex = mutex_create(MUTEX_TYPE_DEFAULT),
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user