diff --git a/src/machi_flu1.erl b/src/machi_flu1.erl index cbd4242..9dfe6a6 100644 --- a/src/machi_flu1.erl +++ b/src/machi_flu1.erl @@ -942,7 +942,7 @@ http_server_hack_put(Sock, G, FluName, MyURI) -> machi_util:make_tagged_csum(server_sha, CSum0); XX when is_binary(XX) -> if XX == CSum0 -> - machi_util:make_tagged_csum(client_gen, CSum0); + machi_util:make_tagged_csum(client_sha, CSum0); true -> throw({bad_csum, XX}) end @@ -1025,7 +1025,7 @@ digest_header_goop([{http_header, _, 'Content-Length', _, Str}|T], G) -> digest_header_goop(T, G#http_goop{len=list_to_integer(Str)}); digest_header_goop([{http_header, _, "X-Checksum", _, Str}|T], G) -> SHA = machi_util:hexstr_to_bin(Str), - CSum = machi_util:make_tagged_csum(client_gen, SHA), + CSum = machi_util:make_tagged_csum(client_sha, SHA), digest_header_goop(T, G#http_goop{x_csum=CSum}); digest_header_goop([_H|T], G) -> digest_header_goop(T, G). diff --git a/src/machi_pb_high_client.erl b/src/machi_pb_high_client.erl index 375c8b8..adf380d 100644 --- a/src/machi_pb_high_client.erl +++ b/src/machi_pb_high_client.erl @@ -129,7 +129,7 @@ handle_call(connected_p, _From, #state{sock=undefined}=S) -> handle_call({send_sync, _Cmd}, _From, #state{sock=undefined}=S) -> {reply, not_connected, S}; handle_call({send_sync, Cmd}, _From, S) -> - {Reply, S2} = do_send_sync(Cmd, S), + {Reply, S2} = do_send_sync(Cmd, try_connect(S)), {reply, Reply, S2}; handle_call(_Request, _From, S) -> Reply = whaaaaaaaaaaaaaaaaaaaa,