Skip to content

Commit

Permalink
little style tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
mojombo committed Jul 6, 2008
1 parent 482ce76 commit deb662d
Showing 1 changed file with 5 additions and 10 deletions.
15 changes: 5 additions & 10 deletions elibs/upload_pack.erl
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -62,8 +62,7 @@ handle_upload_pack_impl(Sock, Host, Header) ->
{error, closed} -> {error, closed} ->
ok = gen_tcp:close(Sock), ok = gen_tcp:close(Sock),
port_command(Port, "0000"), port_command(Port, "0000"),
safe_port_close(Port), safe_port_close(Port);
ok;
{error, Reason} -> {error, Reason} ->
error_logger:error_msg("Client closed socket because: ~p~n", [Reason]), error_logger:error_msg("Client closed socket because: ~p~n", [Reason]),
ok = gen_tcp:close(Sock), ok = gen_tcp:close(Sock),
Expand Down Expand Up @@ -126,10 +125,8 @@ stream_out(Port, Sock, Pipe) ->
{ok, Data, P2} = read_chunk(Port, Pipe), {ok, Data, P2} = read_chunk(Port, Pipe),
gen_tcp:send(Sock, Data), gen_tcp:send(Sock, Data),
case Data =:= <<"0000">> of case Data =:= <<"0000">> of
true -> true -> done;
done; false -> stream_out(Port, Sock, P2)
false ->
stream_out(Port, Sock, P2)
end. end.


read_chunk(Port, Pipe) -> read_chunk(Port, Pipe) ->
Expand Down Expand Up @@ -197,8 +194,6 @@ extract_repo_path(Header) ->


file_exists(FullPath) -> file_exists(FullPath) ->
case file:read_file_info(FullPath) of case file:read_file_info(FullPath) of
{ok, _Info} -> {ok, _Info} -> true;
true; {error, _Reason} -> false
{error, _Reason} ->
false
end. end.

0 comments on commit deb662d

Please sign in to comment.