summaryrefslogtreecommitdiffstats
path: root/mroute.c
diff options
context:
space:
mode:
authorDavid Sommerseth <dazo@users.sourceforge.net>2010-08-28 20:44:07 +0200
committerDavid Sommerseth <dazo@users.sourceforge.net>2010-11-14 22:09:42 +0100
commitcc88a2695f4a54e27143efeae62de24fec8e26a1 (patch)
tree750bb1b66d8d3030fc0ad68767b6b2d7fc506cd2 /mroute.c
parent7aa6c12a4424d00ea0add0a849f8a5b31a2de6a1 (diff)
downloadopenvpn-cc88a2695f4a54e27143efeae62de24fec8e26a1.tar.gz
openvpn-cc88a2695f4a54e27143efeae62de24fec8e26a1.tar.xz
openvpn-cc88a2695f4a54e27143efeae62de24fec8e26a1.zip
Clean-up: Remove more dead and inactive code paths
These code paths was practically not needed with no locking mechanisms enabled and was just bloating the source code. Signed-off-by: David Sommerseth <dazo@users.sourceforge.net> Acked-by: James Yonan <james@openvpn.net>
Diffstat (limited to 'mroute.c')
-rw-r--r--mroute.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/mroute.c b/mroute.c
index 9d8fa66..f068e06 100644
--- a/mroute.c
+++ b/mroute.c
@@ -360,7 +360,6 @@ mroute_helper_init (int ageable_ttl_secs)
{
struct mroute_helper *mh;
ALLOC_OBJ_CLEAR (mh, struct mroute_helper);
- /*mutex_init (&mh->mutex);*/
mh->ageable_ttl_secs = ageable_ttl_secs;
return mh;
}
@@ -398,12 +397,10 @@ mroute_helper_add_iroute (struct mroute_helper *mh, const struct iroute *ir)
if (ir->netbits >= 0)
{
ASSERT (ir->netbits < MR_HELPER_NET_LEN);
- mroute_helper_lock (mh);
++mh->cache_generation;
++mh->net_len_refcount[ir->netbits];
if (mh->net_len_refcount[ir->netbits] == 1)
mroute_helper_regenerate (mh);
- mroute_helper_unlock (mh);
}
}
@@ -413,20 +410,17 @@ mroute_helper_del_iroute (struct mroute_helper *mh, const struct iroute *ir)
if (ir->netbits >= 0)
{
ASSERT (ir->netbits < MR_HELPER_NET_LEN);
- mroute_helper_lock (mh);
++mh->cache_generation;
--mh->net_len_refcount[ir->netbits];
ASSERT (mh->net_len_refcount[ir->netbits] >= 0);
if (!mh->net_len_refcount[ir->netbits])
mroute_helper_regenerate (mh);
- mroute_helper_unlock (mh);
}
}
void
mroute_helper_free (struct mroute_helper *mh)
{
- /*mutex_destroy (&mh->mutex);*/
free (mh);
}