Skip to content

Commit

Permalink
fixed default for reg/1 when item is a counter - again
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.ulf.wiger.net/gproc/branches/experimental-0906/gproc@42 f3948e33-8234-0410-8a80-a07eae3b6c4d
  • Loading branch information
uwiger committed Dec 10, 2009
1 parent afe662f commit cc2c80e
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/gproc.erl
Expand Up @@ -276,11 +276,12 @@ reg({p,l,_} = Key, Value) ->
local_reg(Key, Value);
reg({T,l,_} = Key, Value) when T==n; T==c; T==a ->
%% local names, counters and aggregated counters
if is_integer(Value) ->
call({reg, Key, Value});
if T=/=n andalso is_integer(Value) ->
true;
true ->
erlang:error(badarg)
end;
end,
call({reg, Key, Value});
reg(_, _) ->
erlang:error(badarg).

Expand Down

0 comments on commit cc2c80e

Please sign in to comment.