diff options
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) -> |