anchor.diff:      %% register for monitor events so we can adjust buffers on 
       %% new connections when they're started.
       ok = net_kernel:monitor_nodes(true, [{node_type, visible}, nodedown_reason]),
  -    {SendBufSz, RecBufSz} = get_riak_env_vars(),
  +    {SndBuf, RecBuf} = get_riak_env_vars(),
       DistCtrl = erlang:system_info(dist_ctrl),
       %% make sure that buffers are correct on existing connections.
  -    [set_port_buffers(Port, SendBufSz, RecBufSz)
  +    [set_port_buffers(Port, SndBuf, RecBuf)
        || {_Node, Port} <- DistCtrl],
  -    {ok, #state{sndbuf=SendBufSz, recbuf=RecBufSz}}.
  +    {ok, #state{sndbuf=SndBuf, recbuf=RecBuf}}.
   
   get_riak_env_vars() ->
  -    {ok, SndBufSz} = application:get_env(riak_core, dist_send_buf_size),
  -    {ok, RecBufSz} = application:get_env(riak_core, dist_recv_buf_size),
  -    {SndBufSz, RecBufSz}.
  +    {ok, SndBuf} = application:get_env(riak_core, dist_send_buf_size),
  +    {ok, RecBuf} = application:get_env(riak_core, dist_recv_buf_size),
  +    {SndBuf, RecBuf}.
   
  -handle_call({set_dist_buf_sizes, SendSz, RecvSz}, _From, State) ->
  -    [set_port_buffers(Port, SendSz, RecvSz)
  +handle_call({set_dist_buf_sizes, SndBuf, RecBuf}, _From, State) ->
  +    [set_port_buffers(Port, SndBuf, RecBuf)
        || {_Node, Port} <- erlang:system_info(dist_ctrl)],
  -    {reply, ok, State#state{sndbuf=SendSz, recbuf=RecvSz}};
  +    {reply, ok, State#state{sndbuf=SndBuf, recbuf=RecBuf}};
   handle_call(Msg, _From, State) ->
       lager:warning("unknown call message received: ~p", [Msg]),
       {noreply, State}.
  
positive.code:          }).
  
  %% provided for testing convenience and debugging.
  set_dist_buf_sizes(SendSz, RecvSz) 
    when (is_integer(SendSz) andalso SendSz > 0) andalso
         (is_integer(RecvSz) andalso RecvSz > 0) ->
      gen_server:call(?MODULE, {set_dist_buf_sizes, SendSz, RecvSz}).
  
  
  start_link() ->
  
negative.code: 
  %% private 
  
  set_port_buffers(Port, SndBuf, RecBuf) ->
      inet:setopts(Port, [{sndbuf, SndBuf},
                          {recbuf, RecBuf}]).
  