]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-8329 #resolve Also fixes default configs to keep in line with a change made for...
authorWilliam King <william.king@quentustech.com>
Sat, 10 Oct 2015 22:37:43 +0000 (15:37 -0700)
committerWilliam King <william.king@quentustech.com>
Sat, 10 Oct 2015 22:38:06 +0000 (15:38 -0700)
conf/vanilla/autoload_configs/amqp.conf.xml
src/mod/event_handlers/mod_amqp/mod_amqp_command.c
src/mod/event_handlers/mod_amqp/mod_amqp_producer.c

index 0d139169a97c2725b01b3e945d4a62f456ea415f..43bff5d23e857c58c2e1f1b81da3d7c0bb99de11 100644 (file)
@@ -20,8 +20,8 @@
        </connection>
       </connections>
       <params>
-       <param name="exchange" value="TAP.Events"/>
-       <param name="exchange_type" value="topic"/>
+       <param name="exchange-name" value="TAP.Events"/>
+       <param name="exchange-type" value="topic"/>
        <param name="circuit_breaker_ms" value="10000"/>
        <param name="reconnect_interval_ms" value="1000"/>
        <param name="send_queue_size" value="5000"/>
@@ -54,7 +54,7 @@
        </connection>
       </connections>
       <params>
-       <param name="exchange" value="TAP.Commands"/>
+       <param name="exchange-name" value="TAP.Commands"/>
        <param name="binding_key" value="commandBindingKey"/>
        <param name="reconnect_interval_ms" value="1000"/>
       </params>
index 6299b7a656f69b70113d843924738244ef961158..c20ae3d937dbaa69b8e51128f52e93f25b07ae95 100644 (file)
@@ -119,7 +119,7 @@ switch_status_t mod_amqp_command_create(char *name, switch_xml_t cfg)
                                if ( interval && interval > 0 ) {
                                        profile->reconnect_interval_ms = interval;
                                }
-                       } else if (!strncmp(var, "exchange", 8)) {
+                       } else if (!strncmp(var, "exchange-name", 13)) {
                                exchange = switch_core_strdup(profile->pool, val);
                        } else if (!strncmp(var, "binding_key", 11)) {
                                binding_key = switch_core_strdup(profile->pool, val);
index 088be1e1ff15de62d72f4c966e40999a77cd6cde..3c82aa6225b3b54dbccc0128b3fd8d9d6c724765 100644 (file)
@@ -176,7 +176,6 @@ switch_status_t mod_amqp_producer_create(char *name, switch_xml_t cfg)
        switch_threadattr_t *thd_attr = NULL;
        char *exchange = NULL, *exchange_type = NULL, *content_type = NULL;
        int exchange_durable = 1; /* durable */
-       int exchange_auto_delete = 0;
        int delivery_mode = -1;
        int delivery_timestamp = 1;
        switch_memory_pool_t *pool;
@@ -246,8 +245,6 @@ switch_status_t mod_amqp_producer_create(char *name, switch_xml_t cfg)
                                exchange = switch_core_strdup(profile->pool, val);
                        } else if (!strncmp(var, "exchange-durable", 16)) {
                                exchange_durable = switch_true(val);
-                       } else if (!strncmp(var, "exchange-auto-delete", 20)) {
-                               exchange_auto_delete = switch_true(val);
                        } else if (!strncmp(var, "delivery-mode", 13)) {
                                delivery_mode = atoi(val);
                        } else if (!strncmp(var, "delivery-timestamp", 18)) {
@@ -289,7 +286,6 @@ switch_status_t mod_amqp_producer_create(char *name, switch_xml_t cfg)
        profile->exchange = exchange ? exchange : switch_core_strdup(profile->pool, "TAP.Events");
        profile->exchange_type = exchange_type ? exchange_type : switch_core_strdup(profile->pool, "topic");
        profile->exchange_durable = exchange_durable;
-       profile->exchange_auto_delete = exchange_auto_delete;
        profile->delivery_mode = delivery_mode;
        profile->delivery_timestamp = delivery_timestamp;
        profile->content_type = content_type ? content_type : switch_core_strdup(profile->pool, MOD_AMQP_DEFAULT_CONTENT_TYPE);
@@ -340,8 +336,8 @@ switch_status_t mod_amqp_producer_create(char *name, switch_xml_t cfg)
        amqp_exchange_declare(profile->conn_active->state, 1,
                                                  amqp_cstring_bytes(profile->exchange),
                                                  amqp_cstring_bytes(profile->exchange_type),
+                                                 0, /* passive */
                                                  profile->exchange_durable,
-                                                 profile->exchange_auto_delete,
                                                  amqp_empty_table);
        
        if (mod_amqp_log_if_amqp_error(amqp_get_rpc_reply(profile->conn_active->state), "Declaring exchange")) {