char *json_output = NULL;
amqp_basic_properties_t props;
cJSON *message = NULL;
+ int amqp_status = AMQP_STATUS_OK;
if (! profile->conn_active) {
/* No connection, so we can not send the message. */
props._flags = AMQP_BASIC_CONTENT_TYPE_FLAG;
props.content_type = amqp_cstring_bytes("text/json");
- status = amqp_basic_publish(
+ amqp_status = amqp_basic_publish(
profile->conn_active->state,
1,
amqp_cstring_bytes(fs_resp_exchange),
switch_safe_free(json_output);
- if (status != AMQP_STATUS_OK) {
- const char *errstr = amqp_error_string2(-status);
+ if (amqp_status != AMQP_STATUS_OK) {
+ 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",
profile->name, profile->conn_active->name, errstr);