From 3663b0596a760f00b8c4cd73c258a0e9aa8de26d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-S=C3=A9bastien=20P=C3=A9dron?= Date: Fri, 25 Nov 2016 15:51:36 +0100 Subject: [PATCH] amqp_connection: Start syntax_tools and compiler This is a follow-up commit to 712f7b341b3aac20f8fdbb23fd960aea4d0f1f0f. While here, remove some trailing whitespaces. References #72 and rabbitmq/rabbitmq-common#149. --- src/amqp_client.erl | 1 + src/amqp_connection.erl | 9 +++++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/amqp_client.erl b/src/amqp_client.erl index 8b323e51..0330b0cc 100644 --- a/src/amqp_client.erl +++ b/src/amqp_client.erl @@ -33,6 +33,7 @@ start() -> %% * https://github.com/rabbitmq/rabbitmq-common/pull/149 application:start(syntax_tools), application:start(compiler), + application:start(xmerl), application:start(rabbit_common), application:start(amqp_client). diff --git a/src/amqp_connection.erl b/src/amqp_connection.erl index 0dc0b707..f208eb02 100644 --- a/src/amqp_connection.erl +++ b/src/amqp_connection.erl @@ -157,7 +157,7 @@ start(AmqpParams) -> %% running in the same process space. If the port is set to 'undefined', %% the default ports will be selected depending on whether this is a %% normal or an SSL connection. -%% If ConnectionName is binary - it will be added to client_properties as +%% If ConnectionName is binary - it will be added to client_properties as %% user specified connection name. start(AmqpParams, ConnName) when ConnName == undefined; is_binary(ConnName) -> ensure_started(), @@ -175,13 +175,13 @@ start(AmqpParams, ConnName) when ConnName == undefined; is_binary(ConnName) -> amqp_gen_connection:connect(Connection). set_connection_name(undefined, Params) -> Params; -set_connection_name(ConnName, +set_connection_name(ConnName, #amqp_params_network{client_properties = Props} = Params) -> Params#amqp_params_network{ client_properties = [ {<<"connection_name">>, longstr, ConnName} | Props ]}; -set_connection_name(ConnName, +set_connection_name(ConnName, #amqp_params_direct{client_properties = Props} = Params) -> Params#amqp_params_direct{ client_properties = [ @@ -195,7 +195,8 @@ set_connection_name(ConnName, %% application controller is in the process of shutting down the very %% application which is making this call. ensure_started() -> - [ensure_started(App) || App <- [xmerl, rabbit_common, amqp_client]]. + [ensure_started(App) || App <- [syntax_tools, compiler, xmerl, + rabbit_common, amqp_client]]. ensure_started(App) -> case is_pid(application_controller:get_master(App)) andalso amqp_sup:is_ready() of