]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-10430: [mod_amqp] fix support for libamqp version .0.5.2. Change to api actually...
authorMike Jerris <mike@jerris.com>
Wed, 5 Jul 2017 18:42:33 +0000 (13:42 -0500)
committerMike Jerris <mike@jerris.com>
Wed, 5 Jul 2017 18:42:33 +0000 (13:42 -0500)
src/mod/event_handlers/mod_amqp/mod_amqp_command.c
src/mod/event_handlers/mod_amqp/mod_amqp_logging.c
src/mod/event_handlers/mod_amqp/mod_amqp_producer.c

index 3efd97cc38bb547579ca3fc8aa8b6e07fb459ee2..851f52c46f0bee08a0bfd026ef11e894e172dc4a 100644 (file)
@@ -280,7 +280,7 @@ void * SWITCH_THREAD_FUNC mod_amqp_command_thread(switch_thread_t *thread, void
                        }
 
                        /* Check if exchange already exists */
-#if AMQP_VERSION_MAJOR == 0 && (AMQP_VERSION_MINOR > 5 || (AMQP_VERSION_MINOR == 5 && AMQP_VERSION_PATCH >= 2 ))
+#if AMQP_VERSION_MAJOR == 0 && AMQP_VERSION_MINOR >= 6
                        amqp_exchange_declare(profile->conn_active->state, 1,
                                                                  amqp_cstring_bytes(profile->exchange),
                                                                  amqp_cstring_bytes("topic"),
index 0085c99ddd385c79895ef58c9484c2b3890d9667..dd6fa599d9d60697c4ec51ad4824700771b124eb 100644 (file)
@@ -244,7 +244,7 @@ switch_status_t mod_amqp_logging_create(char *name, switch_xml_t cfg)
                goto err;
        }
 
-#if AMQP_VERSION_MAJOR == 0 && (AMQP_VERSION_MINOR > 5 || (AMQP_VERSION_MINOR == 5 && AMQP_VERSION_PATCH >= 2 ))
+#if AMQP_VERSION_MAJOR == 0 && AMQP_VERSION_MINOR >= 6
        amqp_exchange_declare(profile->conn_active->state, 1,
                                                  amqp_cstring_bytes(profile->exchange),
                                                  amqp_cstring_bytes(profile->exchange_type),
@@ -353,7 +353,7 @@ void * SWITCH_THREAD_FUNC mod_amqp_logging_thread(switch_thread_t *thread, void
       status = mod_amqp_connection_open(profile->conn_root, &(profile->conn_active), profile->name, profile->custom_attr);
       if ( status      == SWITCH_STATUS_SUCCESS ) {
                  // Ensure that the exchange exists, and is of the correct type
-#if AMQP_VERSION_MAJOR == 0 && (AMQP_VERSION_MINOR > 5 || (AMQP_VERSION_MINOR == 5 && AMQP_VERSION_PATCH >= 2 ))
+#if AMQP_VERSION_MAJOR == 0 && AMQP_VERSION_MINOR >= 6
                  amqp_exchange_declare(profile->conn_active->state, 1,
                                                                amqp_cstring_bytes(profile->exchange),
                                                                amqp_cstring_bytes(profile->exchange_type),
index d74776f564e79a6c57523ee79e768de056ce027e..0c3bc4e22e33b6e0f825fb7791fc5e55bf1675b6 100644 (file)
@@ -325,7 +325,7 @@ switch_status_t mod_amqp_producer_create(char *name, switch_xml_t cfg)
                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Profile[%s] was unable to connect to any connection\n", profile->name);
                goto err;
        }
-#if AMQP_VERSION_MAJOR == 0 && (AMQP_VERSION_MINOR > 5 || (AMQP_VERSION_MINOR == 5 && AMQP_VERSION_PATCH >= 2 ))
+#if AMQP_VERSION_MAJOR == 0 && AMQP_VERSION_MINOR >= 6
        amqp_exchange_declare(profile->conn_active->state, 1,
                                                  amqp_cstring_bytes(profile->exchange),
                                                  amqp_cstring_bytes(profile->exchange_type),
@@ -468,7 +468,7 @@ void * SWITCH_THREAD_FUNC mod_amqp_producer_thread(switch_thread_t *thread, void
                        status = mod_amqp_connection_open(profile->conn_root, &(profile->conn_active), profile->name, profile->custom_attr);
                        if ( status     == SWITCH_STATUS_SUCCESS ) {
                                // Ensure that the exchange exists, and is of the correct type
-#if AMQP_VERSION_MAJOR == 0 && (AMQP_VERSION_MINOR > 5 || (AMQP_VERSION_MINOR == 5 && AMQP_VERSION_PATCH >= 2 ))
+#if AMQP_VERSION_MAJOR == 0 && AMQP_VERSION_MINOR >= 6
                                amqp_exchange_declare(profile->conn_active->state, 1,
                                                                          amqp_cstring_bytes(profile->exchange),
                                                                          amqp_cstring_bytes(profile->exchange_type),