Skip to content

Commit ec2d353

Browse files
author
Sean Cribbs
committed
Merge pull request #22 from basho/sdc-server-version
Use init:script_id() for the server version.
2 parents 831f091 + 151cfb9 commit ec2d353

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/riak_api_basic_pb_service.erl

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,21 +57,18 @@ init() ->
5757
undefined.
5858

5959
%% @doc decode/2 callback. Decodes an incoming message.
60-
%% @todo Factor this out of riakc_pb to remove the dependency.
6160
decode(Code, Bin) when Code == 1; Code == 7 ->
6261
{ok, riak_pb_codec:decode(Code, Bin)}.
6362

6463
%% @doc encode/1 callback. Encodes an outgoing response message.
65-
%% @todo Factor this out of riakc_pb to remove the dependency.
6664
encode(Message) ->
6765
{ok, riak_pb_codec:encode(Message)}.
6866

6967
%% @doc process/2 callback. Handles an incoming request message.
7068
process(rpbpingreq, State) ->
7169
{reply, rpbpingresp, State};
7270
process(rpbgetserverinforeq, State) ->
73-
%% TODO: Think of a better way to present the server version
74-
{ok, Vsn} = application:get_key(riak_kv, vsn),
71+
{_, Vsn} = init:script_id(),
7572
Message = #rpbgetserverinforesp{node = riak_pb_codec:to_binary(node()),
7673
server_version = riak_pb_codec:to_binary(Vsn)},
7774
{reply, Message, State}.

0 commit comments

Comments
 (0)