diff options
Diffstat (limited to 'client')
-rw-r--r-- | client/client.erl | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/client/client.erl b/client/client.erl index a287af3..85f0e9d 100644 --- a/client/client.erl +++ b/client/client.erl @@ -24,10 +24,8 @@ rpc(Server, Function, Params) -> register(Server, Name, Password) -> rpc(Server, register, [self(), {Name, Password}]), receive - {_, ok, Msg} -> - Msg; - {_, error, Msg} -> - {error, Msg} + {_, Msg} -> + Msg end. login(Server, Name, Password) -> @@ -38,10 +36,10 @@ login(Server, Name, Password) -> _ -> rpc(Server, login, [self(), {node(), Name, Password}]), receive - {_, ok, {ok, {logged_in, {Pid, _}}}} -> - server:registration(Pid, cli), + {ok, {ok, {logged_in, Pid}}} -> + register(cli, Pid), {ok, logged_in}; - {_, _, Msg} -> + {_, Msg} -> Msg; Msg -> Msg |