Module: kamailio
Branch: master
Commit: b0f4c835b91059f021c4e5be1b16a6493cc46fbe
URL:
https://github.com/kamailio/kamailio/commit/b0f4c835b91059f021c4e5be1b16a64…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2021-12-14T20:42:02+01:00
kazoo: fix kemi export due to changed function prototype
- change done in dcb8e1650204c9453457871515ab5c7ec2d497f1
---
Modified: src/modules/kazoo/kz_amqp.c
Modified: src/modules/kazoo/kz_amqp.h
---
Diff:
https://github.com/kamailio/kamailio/commit/b0f4c835b91059f021c4e5be1b16a64…
Patch:
https://github.com/kamailio/kamailio/commit/b0f4c835b91059f021c4e5be1b16a64…
---
diff --git a/src/modules/kazoo/kz_amqp.c b/src/modules/kazoo/kz_amqp.c
index 7155c62d37..4d9e3dcd8a 100644
--- a/src/modules/kazoo/kz_amqp.c
+++ b/src/modules/kazoo/kz_amqp.c
@@ -1262,10 +1262,10 @@ int kz_amqp_publish_ex(struct sip_msg* msg, char* exchange, char*
routing_key, c
headers_s.s = "";
}
- return ki_kz_amqp_publish(msg, &exchange_s, &routing_key_s, &pl_s,
&headers_s);
+ return ki_kz_amqp_publish_hdrs(msg, &exchange_s, &routing_key_s, &pl_s,
&headers_s);
};
-int ki_kz_amqp_publish(sip_msg_t* msg, str* exchange, str* routing_key, str* payload,
str* headers)
+int ki_kz_amqp_publish_hdrs(sip_msg_t* msg, str* exchange, str* routing_key, str*
payload, str* headers)
{
char *pl = ((str*)payload)->s;
struct json_object *j = json_tokener_parse(pl);
@@ -1279,6 +1279,11 @@ int ki_kz_amqp_publish(sip_msg_t* msg, str* exchange, str*
routing_key, str* pay
return kz_amqp_pipe_send(exchange, routing_key, payload, headers);
}
+int ki_kz_amqp_publish(sip_msg_t* msg, str* exchange, str* routing_key, str* payload)
+{
+ return ki_kz_amqp_publish_hdrs(msg, exchange, routing_key, payload, NULL);
+}
+
int kz_amqp_publish(struct sip_msg* msg, char* exchange, char* routing_key, char*
payload)
{
return kz_amqp_publish_ex(msg, exchange, routing_key, payload, NULL);
diff --git a/src/modules/kazoo/kz_amqp.h b/src/modules/kazoo/kz_amqp.h
index 5903314139..46897f694b 100644
--- a/src/modules/kazoo/kz_amqp.h
+++ b/src/modules/kazoo/kz_amqp.h
@@ -276,6 +276,7 @@ int kz_amqp_add_connection(modparam_t type, void* val);
int kz_amqp_publish(struct sip_msg* msg, char* exchange, char* routing_key, char*
payload);
int kz_amqp_publish_ex(struct sip_msg* msg, char* exchange, char* routing_key, char*
payload, char* headers);
int ki_kz_amqp_publish(sip_msg_t* msg, str* exchange, str* routing_key, str* payload,
str* headers);
+int ki_kz_amqp_publish_hdrs(sip_msg_t* msg, str* exchange, str* routing_key, str*
payload);
int kz_amqp_query(struct sip_msg* msg, char* exchange, char* routing_key, char* payload,
char* dst, char* headers);
int kz_amqp_query_ex(struct sip_msg* msg, char* exchange, char* routing_key, char*
payload, char* headers);
int kz_amqp_subscribe(struct sip_msg* msg, char* payload);