Skip to content

Commit

Permalink
Append .counter suffix if necessary
Browse files Browse the repository at this point in the history
  • Loading branch information
dpino committed Sep 12, 2016
1 parent 3520f49 commit 07426fe
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/lib/timers/ingress_drop_monitor.lua
Expand Up @@ -24,6 +24,9 @@ function new(args)
current_value = ffi.new('uint64_t[1]')
}
if args.counter then
if not args.counter:match(".counter$") then
args.counter = args.counter..".counter"
end
if not shm.exists("/"..S.getpid().."/"..args.counter) then
ret.counter = counter.create(args.counter, 0)
else
Expand Down

0 comments on commit 07426fe

Please sign in to comment.