[thrift] whole ball of whitespace normalizations in Erlang
Summary: ill-formatted comments, trailing whitespace, and (gasp) tabs: all pwned. better now than later.
Reviewed By: eletuchy
Test Plan: ok
Revert Plan: ok
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665339 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/lib/erl/src/transport/tServerSocket.erl b/lib/erl/src/transport/tServerSocket.erl
index d0cbf92..76257c1 100644
--- a/lib/erl/src/transport/tServerSocket.erl
+++ b/lib/erl/src/transport/tServerSocket.erl
@@ -1,6 +1,6 @@
%%% Copyright (c) 2007- Facebook
%%% Distributed under the Thrift Software License
-%%%
+%%%
%%% See accompanying file LICENSE or visit the Thrift site at:
%%% http://developers.facebook.com/thrift/
@@ -24,11 +24,11 @@
?DEFINE_ATTR(super);
?DEFINE_ATTR(port);
?DEFINE_ATTR(handle).
-
+
%%%
%%% behavior callbacks
%%%
-
+
%%% super() -> SuperModule = atom()
%%% | none
@@ -57,40 +57,40 @@
Port = oop:get(This, port),
Options = [binary, {packet, 0}, {active, false}], % was []
- case gen_tcp:listen(Port, Options) of
- {ok, ListenSocket} ->
- This1 = oop:set(This, handle, ListenSocket),
- {ok, This1}
-
- % {error, _} ->
- % TODO: no error handling in Ruby version?
+ case gen_tcp:listen(Port, Options) of
+ {ok, ListenSocket} ->
+ This1 = oop:set(This, handle, ListenSocket),
+ {ok, This1}
+
+ %% {error, _} ->
+ %% TODO: no error handling in Ruby version?
end.
accept(This) ->
- case oop:get(This, handle) of
- nil ->
- nil; % cpiro: sic the Ruby code
+ case oop:get(This, handle) of
+ nil ->
+ nil; % cpiro: sic the Ruby code
- Handle ->
- case gen_tcp:accept(Handle) of
- {ok, Sock} ->
- Trans = oop:start_new(tSocket, []),
- ?R1(Trans, effectful_setHandle, Sock),
- Trans
- % {error, _} ->
- % TODO: no error handling in Ruby version?
- end
+ Handle ->
+ case gen_tcp:accept(Handle) of
+ {ok, Sock} ->
+ Trans = oop:start_new(tSocket, []),
+ ?R1(Trans, effectful_setHandle, Sock),
+ Trans
+ %% {error, _} ->
+ %% TODO: no error handling in Ruby version?
+ end
end.
effectful_close(This) ->
- case oop:get(This, handle) of
- nil ->
- {nil, This};
- Handle ->
- case gen_tcp:close(Handle) of
- ok ->
- {ok, This} % cpiro: sic the Ruby version: don't set handle to nil
- % {error, _} ->
- % TODO: no error handling in Ruby version?
- end
+ case oop:get(This, handle) of
+ nil ->
+ {nil, This};
+ Handle ->
+ case gen_tcp:close(Handle) of
+ ok ->
+ {ok, This} % cpiro: sic the Ruby version: don't set handle to nil
+ %% {error, _} ->
+ %% TODO: no error handling in Ruby version?
+ end
end.