diff options
Diffstat (limited to 'lib/asn1/src/asn1ct_name.erl')
-rw-r--r-- | lib/asn1/src/asn1ct_name.erl | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/lib/asn1/src/asn1ct_name.erl b/lib/asn1/src/asn1ct_name.erl index 66d2bb9540..9711ea6d31 100644 --- a/lib/asn1/src/asn1ct_name.erl +++ b/lib/asn1/src/asn1ct_name.erl @@ -53,8 +53,7 @@ name_server_loop({Ref, Parent} = Monitor,Vars) -> {From,{current,Variable}} -> From ! {?MODULE,get_curr(Vars,Variable)}, name_server_loop(Monitor,Vars); - {From,{new,Variable}} -> - From ! {?MODULE,done}, + {_From,{new,Variable}} -> name_server_loop(Monitor,new_var(Vars,Variable)); {From,{prev,Variable}} -> From ! {?MODULE,get_prev(Vars,Variable)}, @@ -85,9 +84,14 @@ req(Req) -> error({name_server_died,Reason}) end. +cast(Req) -> + get(?MODULE) ! {self(), Req}, + ok. + clear() -> stop(), start(). curr(V) -> req({current,V}). -new(V) -> req({new,V}). +new(V) -> cast({new,V}). + prev(V) -> case req({prev,V}) of none -> |