diff options
author | Simon MacMullen <simon@rabbitmq.com> | 2010-06-24 13:36:42 +0100 |
---|---|---|
committer | Simon MacMullen <simon@rabbitmq.com> | 2010-06-24 13:36:42 +0100 |
commit | c66e8d1f66a0bdbba4a5584d62cd98eb6837b642 (patch) | |
tree | 91328861aac725ba2ecf1f495b8df239b56db3cd /src | |
parent | 96a1984b44dbd71cfd0191d1e4dcca7f84d197a7 (diff) | |
download | rabbitmq-server-c66e8d1f66a0bdbba4a5584d62cd98eb6837b642.tar.gz |
Don't pull protocol version from the JSON.
Diffstat (limited to 'src')
-rw-r--r-- | src/rabbit.erl | 4 | ||||
-rw-r--r-- | src/rabbit_reader.erl | 10 |
2 files changed, 6 insertions, 8 deletions
diff --git a/src/rabbit.erl b/src/rabbit.erl index 6cf6d7d5..7df39987 100644 --- a/src/rabbit.erl +++ b/src/rabbit.erl @@ -424,9 +424,9 @@ print_banner() -> "| ~s +---+ |~n" "| |~n" "+-------------------+~n" - "AMQP ~p-~p~n~s~n~s~n~n", + "~s~n~s~n~s~n~n", [Product, string:right([$v|Version], ProductLen), - ?PROTOCOL_VERSION_MAJOR, ?PROTOCOL_VERSION_MINOR, + ?PROTOCOL_VERSION, ?COPYRIGHT_MESSAGE, ?INFORMATION_MESSAGE]), Settings = [{"node", node()}, {"app descriptor", app_location()}, diff --git a/src/rabbit_reader.erl b/src/rabbit_reader.erl index 73884d99..98b4d647 100644 --- a/src/rabbit_reader.erl +++ b/src/rabbit_reader.erl @@ -547,14 +547,14 @@ handle_input({frame_payload, Type, Channel, PayloadSize}, PayloadAndMarker, Stat handle_input(handshake, <<"AMQP",1,1,ProtocolMajor,ProtocolMinor>>, State = #v1{sock = Sock, connection = Connection}) -> case check_version({ProtocolMajor, ProtocolMinor}, - {?PROTOCOL_VERSION_MAJOR, ?PROTOCOL_VERSION_MINOR}) of + {0, 8}) of true -> Protocol = amqp_0_8, ok = send_on_channel0( Sock, #'connection.start'{ - version_major = ?PROTOCOL_VERSION_MAJOR, - version_minor = ?PROTOCOL_VERSION_MINOR, + version_major = 0, + version_minor = 8, server_properties = server_properties(), mechanisms = <<"PLAIN AMQPLAIN">>, locales = <<"en_US">> }, @@ -570,9 +570,7 @@ handle_input(handshake, <<"AMQP",1,1,ProtocolMajor,ProtocolMinor>>, handle_input(handshake, Other, #v1{sock = Sock}) -> ok = inet_op(fun () -> rabbit_net:send( - Sock, <<"AMQP",1,1, - ?PROTOCOL_VERSION_MAJOR, - ?PROTOCOL_VERSION_MINOR>>) end), + Sock, <<"AMQP",1,1,0,8>>) end), throw({bad_header, Other}); handle_input(Callback, Data, _State) -> |