summaryrefslogtreecommitdiff
path: root/routingTable.cpp
diff options
context:
space:
mode:
authorOthmar Gsenger <otti@anytun.org>2008-02-29 14:46:07 +0000
committerOthmar Gsenger <otti@anytun.org>2008-02-29 14:46:07 +0000
commit42b921f09a3178d308ec9f3b3ac605fd95f26bc0 (patch)
tree71d0d2503569790d58225185c529353a83fd43f7 /routingTable.cpp
parentoutput route on anytun-showtables; (diff)
route
Diffstat (limited to 'routingTable.cpp')
-rw-r--r--routingTable.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/routingTable.cpp b/routingTable.cpp
index 2cc9e3e..8ed5697 100644
--- a/routingTable.cpp
+++ b/routingTable.cpp
@@ -91,15 +91,15 @@ u_int16_t RoutingTable::getRoute(const NetworkAddress & addr)
return 0;
}
-u_int16_t& RoutingTable::getOrNewRoutingTEUnlocked(const NetworkAddress & addr)
+u_int16_t* RoutingTable::getOrNewRoutingTEUnlocked(const NetworkAddress & addr)
{
RoutingMap::iterator it = routes_.find(addr);
if(it!=routes_.end())
- return it->second;
+ return &(it->second);
routes_.insert(RoutingMap::value_type(addr, 1));
it = routes_.find(addr);
- return it->second;
+ return &(it->second);
}
uint16_t RoutingTable::getCountUnlocked()