FS-8971 build fix. There are two different status variables with two different meanings. This splits them back apart.

This commit is contained in:
William King 2016-03-29 14:55:24 -07:00
parent 3d3a66d149
commit b6a6587c95

View File

@ -184,6 +184,7 @@ static void mod_amqp_command_response(mod_amqp_command_profile_t *profile, char
char *json_output = NULL; char *json_output = NULL;
amqp_basic_properties_t props; amqp_basic_properties_t props;
cJSON *message = NULL; cJSON *message = NULL;
int amqp_status = AMQP_STATUS_OK;
if (! profile->conn_active) { if (! profile->conn_active) {
/* No connection, so we can not send the message. */ /* No connection, so we can not send the message. */
@ -207,7 +208,7 @@ static void mod_amqp_command_response(mod_amqp_command_profile_t *profile, char
props._flags = AMQP_BASIC_CONTENT_TYPE_FLAG; props._flags = AMQP_BASIC_CONTENT_TYPE_FLAG;
props.content_type = amqp_cstring_bytes("text/json"); props.content_type = amqp_cstring_bytes("text/json");
status = amqp_basic_publish( amqp_status = amqp_basic_publish(
profile->conn_active->state, profile->conn_active->state,
1, 1,
amqp_cstring_bytes(fs_resp_exchange), amqp_cstring_bytes(fs_resp_exchange),
@ -219,8 +220,8 @@ static void mod_amqp_command_response(mod_amqp_command_profile_t *profile, char
switch_safe_free(json_output); switch_safe_free(json_output);
if (status != AMQP_STATUS_OK) { if (amqp_status != AMQP_STATUS_OK) {
const char *errstr = amqp_error_string2(-status); const char *errstr = amqp_error_string2(-amqp_status);
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "Profile[%s] failed to send event on connection[%s]: %s\n", switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "Profile[%s] failed to send event on connection[%s]: %s\n",
profile->name, profile->conn_active->name, errstr); profile->name, profile->conn_active->name, errstr);