mirror of
https://gitee.com/willfree/mlsr.git
synced 2026-06-03 15:56:13 +08:00
名称前缀表:增加、删除缓存池表项
This commit is contained in:
@@ -352,7 +352,8 @@ func (t *NamePrefixTable) UpdateWithNewRoute(entries []*RoutingTableEntry) {
|
||||
// @return *RoutingTablePoolEntry
|
||||
//
|
||||
func (t *NamePrefixTable) AddRtpeToPool(rtpe *RoutingTablePoolEntry) *RoutingTablePoolEntry {
|
||||
|
||||
t.m_rtpool[rtpe.GetDestination().ToUri()] = rtpe
|
||||
return rtpe
|
||||
}
|
||||
|
||||
//
|
||||
@@ -362,5 +363,11 @@ func (t *NamePrefixTable) AddRtpeToPool(rtpe *RoutingTablePoolEntry) *RoutingTab
|
||||
// @param rtpe
|
||||
//
|
||||
func (t *NamePrefixTable) DeleteRtpeFromPool(rtpe *RoutingTablePoolEntry) {
|
||||
|
||||
// 查看是否有该条目
|
||||
_, ok := t.m_rtpool[rtpe.GetDestination().ToUri()]
|
||||
if !ok {
|
||||
common2.LogDebug("Attempted to delete non-existent origin: " +
|
||||
rtpe.GetDestination().ToUri() + " from NPT routing table entry storage pool.")
|
||||
}
|
||||
delete(t.m_rtpool, rtpe.GetDestination().ToUri())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user