Module: kamailio
Branch: master
Commit: da59f7a2bb32b6c5995313249475207f9ca22790
URL:
https://github.com/kamailio/kamailio/commit/da59f7a2bb32b6c5995313249475207…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2018-09-07T09:00:50+02:00
dmq: fixed KEMI export for handle_message() after last commit adding int param
- new function handle_message_rc(...) exported to kemi
---
Modified: src/modules/dmq/dmq.c
Modified: src/modules/dmq/message.c
Modified: src/modules/dmq/message.h
---
Diff:
https://github.com/kamailio/kamailio/commit/da59f7a2bb32b6c5995313249475207…
Patch:
https://github.com/kamailio/kamailio/commit/da59f7a2bb32b6c5995313249475207…
---
diff --git a/src/modules/dmq/dmq.c b/src/modules/dmq/dmq.c
index d28686da9c..4c772e1481 100644
--- a/src/modules/dmq/dmq.c
+++ b/src/modules/dmq/dmq.c
@@ -380,6 +380,11 @@ static sr_kemi_t sr_kemi_dmq_exports[] = {
{ SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE,
SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE }
},
+ { str_init("dmq"), str_init("handle_message_rc"),
+ SR_KEMIP_INT, ki_dmq_handle_message_rc,
+ { SR_KEMIP_INT, SR_KEMIP_NONE, SR_KEMIP_NONE,
+ SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE }
+ },
{ str_init("dmq"), str_init("is_from_node"),
SR_KEMIP_INT, is_from_remote_node,
{ SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE,
diff --git a/src/modules/dmq/message.c b/src/modules/dmq/message.c
index 2293cc3600..bce42d6ffd 100644
--- a/src/modules/dmq/message.c
+++ b/src/modules/dmq/message.c
@@ -40,7 +40,7 @@ str dmq_404_rpl = str_init("User Not Found");
/**
* @brief config function to handle dmq messages
*/
-int ki_dmq_handle_message(sip_msg_t *msg, int returnval)
+int ki_dmq_handle_message_rc(sip_msg_t *msg, int returnval)
{
dmq_peer_t *peer;
if((parse_sip_msg_uri(msg) < 0) || (!msg->parsed_uri.user.s)) {
@@ -73,6 +73,12 @@ int ki_dmq_handle_message(sip_msg_t *msg, int returnval)
return -1;
}
+
+int ki_dmq_handle_message(sip_msg_t *msg)
+{
+ return ki_dmq_handle_message_rc(msg, 0);
+}
+
int w_dmq_handle_message(struct sip_msg *msg, char *str1, char *str2)
{
int i = 0;
@@ -80,10 +86,10 @@ int w_dmq_handle_message(struct sip_msg *msg, char *str1, char *str2)
if(get_int_fparam(&i, msg, (fparam_t*)str1)<0) return -1;
}
if(i>1) i = 1;
- return ki_dmq_handle_message(msg, i);
+ return ki_dmq_handle_message_rc(msg, i);
}
int dmq_handle_message(struct sip_msg *msg, char *str1, char *str2)
{
- return ki_dmq_handle_message(msg, 0);
+ return ki_dmq_handle_message_rc(msg, 0);
}
diff --git a/src/modules/dmq/message.h b/src/modules/dmq/message.h
index 9c9f835745..d47e421c6e 100644
--- a/src/modules/dmq/message.h
+++ b/src/modules/dmq/message.h
@@ -26,6 +26,7 @@
int w_dmq_handle_message(struct sip_msg *, char *str1, char *str2);
int dmq_handle_message(struct sip_msg *, char *str1, char *str2);
-int ki_dmq_handle_message(sip_msg_t *msg, int returnval);
+int ki_dmq_handle_message(sip_msg_t *msg);
+int ki_dmq_handle_message_rc(sip_msg_t *msg, int returnval);
#endif