summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOthmar Gsenger <otti@anytun.org>2008-12-22 21:55:03 +0000
committerOthmar Gsenger <otti@anytun.org>2008-12-22 21:55:03 +0000
commit1342ccd5dcea3dae831b8209d4cadfaf327d17ce (patch)
tree6e67aada9012472fad53567c9778bf91317ef042
parentupdateRouteTree has to stay unlocked (is only called within locked routines s... (diff)
cleaner naming for updateRoutingTreeUnlocked now
-rw-r--r--src/routingTable.cpp4
-rw-r--r--src/routingTable.h2
-rw-r--r--src/syncRouteCommand.h2
3 files changed, 4 insertions, 4 deletions
diff --git a/src/routingTable.cpp b/src/routingTable.cpp
index c767d62..f457505 100644
--- a/src/routingTable.cpp
+++ b/src/routingTable.cpp
@@ -58,7 +58,7 @@ RoutingTable::~RoutingTable()
{
}
-void RoutingTable::updateRouteTree(const NetworkPrefix & pref)
+void RoutingTable::updateRouteTreeUnlocked(const NetworkPrefix & pref)
{
//Lock lock(mutex_); //deadlock
@@ -102,7 +102,7 @@ void RoutingTable::addRoute(const NetworkPrefix & pref, u_int16_t mux)
routes_[pref.getNetworkAddressType()].erase(ret.first);
routes_[pref.getNetworkAddressType()].insert(RoutingMap::value_type(pref,mux));
}
- updateRouteTree(pref);
+ updateRouteTreeUnlocked(pref);
} else if (type==ethernet) {
return; // TODO: add support for ethernet
} else {
diff --git a/src/routingTable.h b/src/routingTable.h
index 2f25c1a..9ab3260 100644
--- a/src/routingTable.h
+++ b/src/routingTable.h
@@ -50,7 +50,7 @@ public:
RoutingTable();
~RoutingTable();
void addRoute(const NetworkPrefix & ,u_int16_t);
- void updateRouteTree(const NetworkPrefix & pref); //Warning Unlocked!!!
+ void updateRouteTreeUnlocked(const NetworkPrefix & pref);
void delRoute(const NetworkPrefix & );
u_int16_t getRoute(const NetworkAddress &);
bool empty(network_address_type_t type);
diff --git a/src/syncRouteCommand.h b/src/syncRouteCommand.h
index 2f64987..5bef2f9 100644
--- a/src/syncRouteCommand.h
+++ b/src/syncRouteCommand.h
@@ -57,7 +57,7 @@ private:
// u_int16_t & mux (gRoutingTable.getOrNewRoutingTEUnlocked(addr_));
// ar & mux;
ar & (*(gRoutingTable.getOrNewRoutingTEUnlocked(addr_)));
- gRoutingTable.updateRouteTree(addr_);
+ gRoutingTable.updateRouteTreeUnlocked(addr_);
};
};