Skip to content

Commit

Permalink
remove dead code
Browse files Browse the repository at this point in the history
  • Loading branch information
Mikael Lixenstrand authored and lordnull committed Jan 22, 2015
1 parent 08c60dc commit 5573645
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
7 changes: 3 additions & 4 deletions src/riak_core_service_conn.erl
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
-export([code_change/4, terminate/3]).

-record(state, {
transport, transport_msgs, socket, remote_rev, remote_caps, init_args
transport, transport_msgs, socket, remote_caps, init_args
}).

%% ===============
Expand Down Expand Up @@ -81,11 +81,10 @@ handle_event(_Req, StateName, State) ->

handle_info({TransOk, Socket, Data}, wait_for_hello, State = #state{socket = Socket, transport_msgs = {TransOk, _, _}}) when is_binary(Data) ->
case binary_to_term(Data) of
{?CTRL_HELLO, TheirRev, ThierCaps} ->
{?CTRL_HELLO, _CTRL_REV, ThierCaps} ->
SSLEnabled = app_helper:get_env(riak_core, ssl_enabled, false),
MyName = riak_core_connection:symbolic_clustername(),
MyCaps = [{clustername, MyName}, {ssl_enabled, SSLEnabled}],

Ack = term_to_binary({?CTRL_ACK, ?CTRL_REV, MyCaps}),
(State#state.transport):send(Socket, Ack),
case try_ssl(Socket, State#state.transport, MyCaps, ThierCaps) of
Expand All @@ -94,7 +93,7 @@ handle_info({TransOk, Socket, Data}, wait_for_hello, State = #state{socket = Soc
{NewTransport, NewSocket} ->
NewTransport:setopts(NewSocket, [{active, once}]),
TransMsgs = NewTransport:messages(),
State2 = State#state{transport = NewTransport, transport_msgs = TransMsgs, socket = NewSocket, remote_caps = ThierCaps, remote_rev = TheirRev},
State2 = State#state{transport = NewTransport, transport_msgs = TransMsgs, socket = NewSocket, remote_caps = ThierCaps},
{next_state, wait_for_protocol_versions, State2}
end;
_Else ->
Expand Down
5 changes: 2 additions & 3 deletions src/riak_core_service_mgr.erl
Original file line number Diff line number Diff line change
Expand Up @@ -459,12 +459,11 @@ exchange_handshakes_with(client, Socket, Transport, MyCaps) ->
{ok, Hello} ->
%% read their hello
case binary_to_term(Hello) of
{?CTRL_HELLO, TheirRev, TheirCaps} ->
{?CTRL_HELLO, _CTRL_REV, TheirCaps} ->
Ack = term_to_binary({?CTRL_ACK, ?CTRL_REV, MyCaps}),
Transport:send(Socket, Ack),
%% make some props to hand dispatched service
Props = [{local_revision, ?CTRL_REV}, {remote_revision, TheirRev} | TheirCaps],
{ok,Props};
{ok, TheirCaps};
Msg ->
%% tell other side we are failing them
Error = {error, bad_handshake},
Expand Down

5 comments on commit 5573645

@borshop
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

saw approval from lordnull
at 5573645

@borshop
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

merging basho/riak_repl/enhance/krab/cluster-realtime-rebalance-rebase-2.0 = 5573645 into borshop-integration-651-enhance/krab/cluster-realtime-rebalance-rebase-2.0

@borshop
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

basho/riak_repl/enhance/krab/cluster-realtime-rebalance-rebase-2.0 = 5573645 merged ok, testing candidate = 37da8e4

@borshop
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@lordnull
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@borshop merge

Please sign in to comment.