aboutsummaryrefslogtreecommitdiff
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
parentClean-up: Remove pthread and mutex locking code (diff)
downloadopenvpn-cc88a2695f4a54e27143efeae62de24fec8e26a1.tar.xz
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 '')
-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);
}