diff options
author | Jakob Pfender <jpfender@zedat.fu-berlin.de> | 2010-10-14 10:30:29 +0200 |
---|---|---|
committer | Jakob Pfender <jpfender@zedat.fu-berlin.de> | 2010-10-14 10:30:29 +0200 |
commit | a31253b510636f48c7a50a54106dcb248028cf34 (patch) | |
tree | 783c8741bd3ff260acdd53671001d9fc2288768b /client | |
parent | 37a33b4ef3a8d9c4a1b984e44bfe5be03525c302 (diff) | |
parent | aa16b66ce4c64dd165292f5fb931d57f09d436d6 (diff) | |
download | erlang-a31253b510636f48c7a50a54106dcb248028cf34.tar.gz erlang-a31253b510636f48c7a50a54106dcb248028cf34.tar.xz erlang-a31253b510636f48c7a50a54106dcb248028cf34.zip |
Merge branch 'master' of ssh://git.animux.de/erlang
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 |