Module: kamailio
Branch: master
Commit: 6c40983bf04a23bd7394c247980f21c5f2d6d817
URL:
https://github.com/kamailio/kamailio/commit/6c40983bf04a23bd7394c247980f21c…
Author: lazedo <luis.azedo(a)factorlusitano.com>
Committer: lazedo <luis.azedo(a)factorlusitano.com>
Date: 2018-02-28T16:24:22Z
kazoo: free envelope only on normal response
---
Modified: src/modules/kazoo/kz_amqp.c
---
Diff:
https://github.com/kamailio/kamailio/commit/6c40983bf04a23bd7394c247980f21c…
Patch:
https://github.com/kamailio/kamailio/commit/6c40983bf04a23bd7394c247980f21c…
---
diff --git a/src/modules/kazoo/kz_amqp.c b/src/modules/kazoo/kz_amqp.c
index affaad4eda..3e161839dc 100644
--- a/src/modules/kazoo/kz_amqp.c
+++ b/src/modules/kazoo/kz_amqp.c
@@ -3127,7 +3127,6 @@ int kz_amqp_consumer_proc(kz_amqp_server_ptr server_ptr)
LM_DBG("CONSUMER INIT DONE\n");
while(OK) {
-// payload = NULL;
amqp_envelope_t envelope;
amqp_maybe_release_buffers(consumer->conn);
amqp_rpc_reply_t reply = amqp_consume_message(consumer->conn, &envelope, NULL,
0);
@@ -3165,6 +3164,7 @@ int kz_amqp_consumer_proc(kz_amqp_server_ptr server_ptr)
if(OK)
kz_amqp_send_worker_event(server_ptr, &envelope,
consumer_channels[idx].consumer);
}
+ amqp_destroy_envelope(&envelope);
break;
case AMQP_RESPONSE_SERVER_EXCEPTION:
LM_ERR("AMQP_RESPONSE_SERVER_EXCEPTION in consume\n");
@@ -3176,7 +3176,6 @@ int kz_amqp_consumer_proc(kz_amqp_server_ptr server_ptr)
OK = 0;
break;
};
- amqp_destroy_envelope(&envelope);
}
kz_amqp_connection_close(consumer);