aboutsummaryrefslogtreecommitdiffstats
path: root/src/libcharon/plugins/kernel_wfp/kernel_wfp_ipsec.c
diff options
context:
space:
mode:
authorMartin Willi <martin@revosec.ch>2014-06-05 13:10:43 +0200
committerMartin Willi <martin@revosec.ch>2014-06-06 16:28:28 +0200
commitcab59c73fc616c23bf510dd875363da08ce1850c (patch)
tree1fff8a93e0451fb8ef6a17de09a4e264559d3e62 /src/libcharon/plugins/kernel_wfp/kernel_wfp_ipsec.c
parentbd19e27ae3295f224bf568d0b7d625a5c6bae8b8 (diff)
downloadstrongswan-cab59c73fc616c23bf510dd875363da08ce1850c.tar.bz2
strongswan-cab59c73fc616c23bf510dd875363da08ce1850c.tar.xz
windows: Use WINAPI call convention for Windows API callbacks
For x86_64 it does not actually matter, but for i686 builds the call convention is different with WINAPI.
Diffstat (limited to 'src/libcharon/plugins/kernel_wfp/kernel_wfp_ipsec.c')
-rw-r--r--src/libcharon/plugins/kernel_wfp/kernel_wfp_ipsec.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libcharon/plugins/kernel_wfp/kernel_wfp_ipsec.c b/src/libcharon/plugins/kernel_wfp/kernel_wfp_ipsec.c
index 5b44f85b5..62b3ea8dd 100644
--- a/src/libcharon/plugins/kernel_wfp/kernel_wfp_ipsec.c
+++ b/src/libcharon/plugins/kernel_wfp/kernel_wfp_ipsec.c
@@ -1545,9 +1545,9 @@ static traffic_selector_t *addr2ts(FWP_IP_VERSION version, void *data,
/**
* FwpmNetEventSubscribe0() callback
*/
-static void event_callback(private_kernel_wfp_ipsec_t *this,
- const FWPM_NET_EVENT1 *event)
+static void WINAPI event_callback(void *user, const FWPM_NET_EVENT1 *event)
{
+ private_kernel_wfp_ipsec_t *this = user;
traffic_selector_t *local = NULL, *remote = NULL;
u_int8_t protocol = 0;
u_int16_t from_local = 0, to_local = 65535;
@@ -1610,7 +1610,7 @@ static bool register_events(private_kernel_wfp_ipsec_t *this)
DWORD res;
res = FwpmNetEventSubscribe0(this->handle, &subscription,
- (void*)event_callback, this, &this->event);
+ event_callback, this, &this->event);
if (res != ERROR_SUCCESS)
{
DBG1(DBG_KNL, "registering for WFP events failed: 0x%08x", res);