Module: kamailio
Branch: master
Commit: 114ec80c58f06c876fc76d884b73095c5dcc8bff
URL:
https://github.com/kamailio/kamailio/commit/114ec80c58f06c876fc76d884b73095…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2016-10-31T20:25:13+01:00
htable: switched to json macros for numbers in dmq operations
---
Modified: modules/htable/ht_dmq.c
---
Diff:
https://github.com/kamailio/kamailio/commit/114ec80c58f06c876fc76d884b73095…
Patch:
https://github.com/kamailio/kamailio/commit/114ec80c58f06c876fc76d884b73095…
---
diff --git a/modules/htable/ht_dmq.c b/modules/htable/ht_dmq.c
index 0983f61..975daf0 100644
--- a/modules/htable/ht_dmq.c
+++ b/modules/htable/ht_dmq.c
@@ -142,7 +142,7 @@ int ht_dmq_handle_msg(struct sip_msg* msg, peer_reponse_t* resp,
dmq_node_t* dmq
{
LM_DBG("found field: %s\n", it->string);
if (strcmp(it->string, "action")==0) {
- action = it->valueint;
+ action = SRJSON_GET_INT(it);
} else if (strcmp(it->string, "htname")==0) {
htname.s = it->valuestring;
htname.len = strlen(htname.s);
@@ -150,14 +150,14 @@ int ht_dmq_handle_msg(struct sip_msg* msg, peer_reponse_t* resp,
dmq_node_t* dmq
cname.s = it->valuestring;
cname.len = strlen(cname.s);
} else if (strcmp(it->string, "type")==0) {
- type = it->valueint;
+ type = SRJSON_GET_INT(it);
} else if (strcmp(it->string, "strval")==0) {
val.s.s = it->valuestring;
val.s.len = strlen(val.s.s);
} else if (strcmp(it->string, "intval")==0) {
- val.n = it->valueint;
+ val.n = SRJSON_GET_INT(it);
} else if (strcmp(it->string, "mode")==0) {
- mode = it->valueint;
+ mode = SRJSON_GET_INT(it);
} else {
LM_ERR("unrecognized field in json object\n");
goto invalid;