Author: dreiss
Date: Tue Jun 10 18:00:04 2008
New Revision: 666433
URL: http://svn.apache.org/viewvc?rev=666433&view=rev
Log:
removed extra debugging statements
Modified:
incubator/thrift/trunk/lib/alterl/src/thrift_binary_protocol.erl
incubator/thrift/trunk/lib/alterl/src/thrift_buffered_transport.erl
incubator/thrift/trunk/lib/alterl/src/thrift_processor.erl
incubator/thrift/trunk/lib/alterl/src/thrift_socket_transport.erl
Modified: incubator/thrift/trunk/lib/alterl/src/thrift_binary_protocol.erl
URL:
http://svn.apache.org/viewvc/incubator/thrift/trunk/lib/alterl/src/thrift_binary_protocol.erl?rev=666433&r1=666432&r2=666433&view=diff
==============================================================================
--- incubator/thrift/trunk/lib/alterl/src/thrift_binary_protocol.erl (original)
+++ incubator/thrift/trunk/lib/alterl/src/thrift_binary_protocol.erl Tue Jun 10
18:00:04 2008
@@ -32,7 +32,6 @@
thrift_transport:flush(Transport).
close_transport(#binary_protocol{transport = Transport}) ->
- thrift_transport:flush(Transport),
thrift_transport:close(Transport).
%%%
Modified: incubator/thrift/trunk/lib/alterl/src/thrift_buffered_transport.erl
URL:
http://svn.apache.org/viewvc/incubator/thrift/trunk/lib/alterl/src/thrift_buffered_transport.erl?rev=666433&r1=666432&r2=666433&view=diff
==============================================================================
--- incubator/thrift/trunk/lib/alterl/src/thrift_buffered_transport.erl
(original)
+++ incubator/thrift/trunk/lib/alterl/src/thrift_buffered_transport.erl Tue Jun
10 18:00:04 2008
@@ -66,9 +66,9 @@
gen_server:call(Transport, flush).
%%--------------------------------------------------------------------
-%% Function: flush(Transport) -> ok
+%% Function: close(Transport) -> ok
%%
-%% Description: Flushes the buffer through to the wrapped transport
+%% Description: Closes the transport and the wrapped transport
%%--------------------------------------------------------------------
close(Transport) ->
gen_server:call(Transport, close).
@@ -123,15 +123,9 @@
handle_call(close, _From, State = #state{buffer = Buffer,
wrapped = Wrapped}) ->
- case Buffer of
- [] -> ok;
- Data ->
- thrift_transport:write(Wrapped,
concat_binary(lists:reverse(Buffer))),
- thrift_transport:flush(Wrapped)
- end,
+ thrift_transport:write(Wrapped, concat_binary(lists:reverse(Buffer))),
thrift_transport:close(Wrapped),
- {reply, ok, State}. % TEST ONLY
-%% {stop, normal, State}.
+ {reply, ok, State}.
%%--------------------------------------------------------------------
%% Function: handle_cast(Msg, State) -> {noreply, State} |
Modified: incubator/thrift/trunk/lib/alterl/src/thrift_processor.erl
URL:
http://svn.apache.org/viewvc/incubator/thrift/trunk/lib/alterl/src/thrift_processor.erl?rev=666433&r1=666432&r2=666433&view=diff
==============================================================================
--- incubator/thrift/trunk/lib/alterl/src/thrift_processor.erl (original)
+++ incubator/thrift/trunk/lib/alterl/src/thrift_processor.erl Tue Jun 10
18:00:04 2008
@@ -25,7 +25,6 @@
loop(State = #thrift_processor{in_protocol = IProto,
out_protocol = OProto}) ->
- error_logger:info_msg("loop: ~p", [State]),
case thrift_protocol:read(IProto, message_begin) of
#protocol_message_begin{name = Function,
type = ?tMessageType_CALL} ->
@@ -46,9 +45,7 @@
{ok, Params} = thrift_protocol:read(IProto, InParams),
try
- error_logger:info_msg("calling: ~p(~p)", [Function, Params]),
Result = Handler:handle_function(Function, Params),
- error_logger:info_msg("result: ~p", [Result]),
%% {Micro, Result} = better_timer(Handler, handle_function, [Function,
Params]),
%% error_logger:info_msg("Processed ~p(~p) in ~.4fms~n",
%% [Function, Params, Micro/1000.0]),
@@ -168,4 +165,6 @@
ok.
after_reply(OProto) ->
- ok = thrift_protocol:close_transport(OProto).
+ ok = thrift_protocol:flush_transport(OProto)
+ %% ok = thrift_protocol:close_transport(OProto)
+ .
Modified: incubator/thrift/trunk/lib/alterl/src/thrift_socket_transport.erl
URL:
http://svn.apache.org/viewvc/incubator/thrift/trunk/lib/alterl/src/thrift_socket_transport.erl?rev=666433&r1=666432&r2=666433&view=diff
==============================================================================
--- incubator/thrift/trunk/lib/alterl/src/thrift_socket_transport.erl (original)
+++ incubator/thrift/trunk/lib/alterl/src/thrift_socket_transport.erl Tue Jun
10 18:00:04 2008
@@ -21,7 +21,5 @@
ok.
close(#data{socket = Socket}) ->
- error_logger:info_msg("Close called, socket ~p", [Socket])
-%% gen_tcp:close(Socket),
-%% exit(normal)
- .
+ gen_tcp:close(Socket),
+ exit(protocol_closed).