Module: kamailio
Branch: master
Commit: 22e33ba64c3aad3b50e9ba649c5fa736462a30b4
URL:
https://github.com/kamailio/kamailio/commit/22e33ba64c3aad3b50e9ba649c5fa73…
Author: lazedo <luis.azedo(a)factorlusitano.com>
Committer: lazedo <luis.azedo(a)factorlusitano.com>
Date: 2017-04-09T06:39:44+01:00
kazoo: fix connection to root vhost
---
Modified: src/modules/kazoo/kz_amqp.c
---
Diff:
https://github.com/kamailio/kamailio/commit/22e33ba64c3aad3b50e9ba649c5fa73…
Patch:
https://github.com/kamailio/kamailio/commit/22e33ba64c3aad3b50e9ba649c5fa73…
---
diff --git a/src/modules/kazoo/kz_amqp.c b/src/modules/kazoo/kz_amqp.c
index c3faa05..f3a7c2c 100644
--- a/src/modules/kazoo/kz_amqp.c
+++ b/src/modules/kazoo/kz_amqp.c
@@ -735,8 +735,10 @@ int kz_amqp_add_connection(modparam_t type, void* val)
if(newConn->info.vhost == NULL) {
newConn->info.vhost = KZ_URL_ROOT;
+#if AMQP_VERSION_MAJOR == 0 && AMQP_VERSION_MINOR < 6
} else if(newConn->info.vhost[0] == '/' &&
strlen(newConn->info.vhost) == 1) { // bug in amqp_parse_url ?
newConn->info.vhost++;
+#endif
}
kz_amqp_server_ptr server_ptr = (kz_amqp_server_ptr)shm_malloc(sizeof(kz_amqp_server));