]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-8971 build fix. There are two different status variables with two different meanin...
authorWilliam King <william.king@quentustech.com>
Tue, 29 Mar 2016 21:55:24 +0000 (14:55 -0700)
committerWilliam King <william.king@quentustech.com>
Tue, 29 Mar 2016 21:55:31 +0000 (14:55 -0700)
src/mod/event_handlers/mod_amqp/mod_amqp_command.c

index fd71f2b7a8fead6b18c3a1567d8e74ee7fc4c356..29760d427129b5127e636f19a01b9d0df49f0d2e 100644 (file)
@@ -184,6 +184,7 @@ static void mod_amqp_command_response(mod_amqp_command_profile_t *profile, char
        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. */
@@ -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.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),
@@ -219,8 +220,8 @@ static void mod_amqp_command_response(mod_amqp_command_profile_t *profile, char
 
        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);