From e2e15eb8ee8dfaaf3b20adb25228b67228d007f0 Mon Sep 17 00:00:00 2001 From: "kfraser@localhost.localdomain" Date: Sat, 23 Sep 2006 14:01:53 +0100 Subject: Update vnet kernel module to handle architectures without socketcall(), for example Itanium, and some small changes to be compatible with changed kernel interfaces. Signed-off-by: Mike Wray --- tools/vnet/vnet-module/tunnel.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'tools/vnet/vnet-module/tunnel.h') diff --git a/tools/vnet/vnet-module/tunnel.h b/tools/vnet/vnet-module/tunnel.h index 23c72027c4..c363eca51a 100644 --- a/tools/vnet/vnet-module/tunnel.h +++ b/tools/vnet/vnet-module/tunnel.h @@ -70,6 +70,8 @@ typedef struct Tunnel { struct Tunnel *base; } Tunnel; +extern void Tunnel_free(struct Tunnel *tunnel); + /** Decrement the reference count, freeing if zero. * * @param tunnel tunnel (may be null) @@ -77,9 +79,7 @@ typedef struct Tunnel { static inline void Tunnel_decref(struct Tunnel *tunnel){ if(!tunnel) return; if(atomic_dec_and_test(&tunnel->refcount)){ - tunnel->type->close(tunnel); - Tunnel_decref(tunnel->base); - kfree(tunnel); + Tunnel_free(tunnel); } } @@ -87,7 +87,7 @@ static inline void Tunnel_decref(struct Tunnel *tunnel){ * * @param tunnel tunnel (may be null) */ -static inline void Tunnel_incref(Tunnel *tunnel){ +static inline void Tunnel_incref(struct Tunnel *tunnel){ if(!tunnel) return; atomic_inc(&tunnel->refcount); } -- cgit v1.2.3