mirror of
https://github.com/strongswan/strongswan.git
synced 2025-10-03 00:00:24 -04:00
forecast: Fix incompatible function types warning
This commit is contained in:
parent
b37a3e249a
commit
36d16e5b24
@ -155,7 +155,8 @@ static bool is_bootp(void *buf, size_t len)
|
|||||||
/**
|
/**
|
||||||
* Broadcast/Multicast receiver
|
* Broadcast/Multicast receiver
|
||||||
*/
|
*/
|
||||||
static bool receive_casts(private_forecast_forwarder_t *this)
|
CALLBACK(receive_casts, bool,
|
||||||
|
private_forecast_forwarder_t *this, int fd, watcher_event_t event)
|
||||||
{
|
{
|
||||||
struct __attribute__((packed)) {
|
struct __attribute__((packed)) {
|
||||||
struct iphdr hdr;
|
struct iphdr hdr;
|
||||||
@ -171,7 +172,7 @@ static bool receive_casts(private_forecast_forwarder_t *this)
|
|||||||
socklen_t alen = sizeof(addr);
|
socklen_t alen = sizeof(addr);
|
||||||
bool reinject;
|
bool reinject;
|
||||||
|
|
||||||
len = recvfrom(this->kernel.pkt, &buf, sizeof(buf), MSG_DONTWAIT,
|
len = recvfrom(fd, &buf, sizeof(buf), MSG_DONTWAIT,
|
||||||
(struct sockaddr*)&addr, &alen);
|
(struct sockaddr*)&addr, &alen);
|
||||||
if (len < 0)
|
if (len < 0)
|
||||||
{
|
{
|
||||||
@ -496,7 +497,7 @@ forecast_forwarder_t *forecast_forwarder_create(forecast_listener_t *listener)
|
|||||||
&this->kernel.listener);
|
&this->kernel.listener);
|
||||||
|
|
||||||
lib->watcher->add(lib->watcher, this->kernel.pkt, WATCHER_READ,
|
lib->watcher->add(lib->watcher, this->kernel.pkt, WATCHER_READ,
|
||||||
(watcher_cb_t)receive_casts, this);
|
receive_casts, this);
|
||||||
|
|
||||||
return &this->public;
|
return &this->public;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user