diff options
-rw-r--r-- | lib/diameter/src/base/diameter_reg.erl | 20 | ||||
-rw-r--r-- | lib/diameter/test/diameter_reg_SUITE.erl | 11 |
2 files changed, 0 insertions, 31 deletions
diff --git a/lib/diameter/src/base/diameter_reg.erl b/lib/diameter/src/base/diameter_reg.erl index 2f2dd7aaa4..76cc79c8e9 100644 --- a/lib/diameter/src/base/diameter_reg.erl +++ b/lib/diameter/src/base/diameter_reg.erl @@ -28,7 +28,6 @@ -export([add/1, add_new/1, del/1, - repl/2, match/1, wait/1]). @@ -100,19 +99,6 @@ add_new(T) -> call({add, fun insert_new/2, T, self()}). %% =========================================================================== -%% # repl(T, NewT) -%% -%% Like add/1 but only replace an existing association on T, false -%% being returned if it doesn't exist. -%% =========================================================================== - --spec repl(any(), any()) - -> boolean(). - -repl(T, U) -> - call({repl, T, U, self()}). - -%% =========================================================================== %% # del(Term) %% %% Remove any existing association of Term with self(). @@ -213,12 +199,6 @@ handle_call({add, Fun, Key, Pid}, _, S) -> handle_call({del, Key, Pid}, _, S) -> {reply, ets:delete_object(?TABLE, ?MAPPING(Key, Pid)), S}; -handle_call({repl, T, U, Pid}, _, S) -> - MatchSpec = [{?MAPPING('$1', Pid), - [{'=:=', '$1', {const, T}}], - ['$_']}], - {reply, repl(ets:select(?TABLE, MatchSpec), U, Pid), S}; - handle_call({wait, Pat}, From, #state{q = Q} = S) -> case find(Pat) of {ok, L} -> diff --git a/lib/diameter/test/diameter_reg_SUITE.erl b/lib/diameter/test/diameter_reg_SUITE.erl index 3d9ad8bfa8..0092553191 100644 --- a/lib/diameter/test/diameter_reg_SUITE.erl +++ b/lib/diameter/test/diameter_reg_SUITE.erl @@ -34,7 +34,6 @@ -export([add/1, add_new/1, del/1, - repl/1, terms/1, pids/1]). @@ -57,7 +56,6 @@ tc() -> [add, add_new, del, - repl, terms, pids]. @@ -90,15 +88,6 @@ del(_) -> [{Ref, Pid}] = ?reg:match(Ref), Pid = self(). -repl(_) -> - Ref = make_ref(), - true = ?reg:add_new({Ref}), - true = ?reg:repl({Ref}, Ref), - false = ?reg:add_new(Ref), - false = ?reg:repl({Ref}, Ref), - [{Ref, Pid}] = ?reg:match(Ref), - Pid = self(). - terms(_) -> Ref = make_ref(), true = ?reg:add_new(Ref), |