diff options
Diffstat (limited to 'routingTable.cpp')
-rw-r--r-- | routingTable.cpp | 6 |
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() |