Module: kamailio
Branch: master
Commit: a2eff905626c6428539d3d848e7968f5dd0f2108
URL:
https://github.com/kamailio/kamailio/commit/a2eff905626c6428539d3d848e7968f…
Author: Victor Seva <linuxmaniac(a)torreviejawireless.org>
Committer: Victor Seva <linuxmaniac(a)torreviejawireless.org>
Date: 2020-12-04T10:23:04+01:00
cfgt: log info when node is created and saved
---
Modified: src/modules/cfgt/cfgt_int.c
---
Diff:
https://github.com/kamailio/kamailio/commit/a2eff905626c6428539d3d848e7968f…
Patch:
https://github.com/kamailio/kamailio/commit/a2eff905626c6428539d3d848e7968f…
---
diff --git a/src/modules/cfgt/cfgt_int.c b/src/modules/cfgt/cfgt_int.c
index c47a1cecc0..7b0c991285 100644
--- a/src/modules/cfgt/cfgt_int.c
+++ b/src/modules/cfgt/cfgt_int.c
@@ -429,6 +429,8 @@ void cfgt_save_node(cfgt_node_p node)
}
fclose(fp);
node->jdoc.free_fn(dest.s);
+ LM_INFO("*** node uuid:[%.*s] id:[%d] saved ***\n",
+ STR_FMT(&node->uuid), node->msgid);
} else {
LM_ERR("Can't open file [%s] to write\n", dest.s);
pkg_free(dest.s);
@@ -767,7 +769,7 @@ int cfgt_msgin(sr_event_param_t *evp)
int cfgt_pre(struct sip_msg *msg, unsigned int flags, void *bar)
{
str unknown = {"unknown", 7};
- int get_hdr_result = 0;
+ int get_hdr_result = 0, res;
if(_cfgt_node) {
if(_cfgt_node->msgid == 0) {
@@ -786,7 +788,10 @@ int cfgt_pre(struct sip_msg *msg, unsigned int flags, void *bar)
}
pkg_str_dup(&_cfgt_node->uuid, &unknown);
}
- return _cfgt_get_uuid_id(_cfgt_node);
+ res = _cfgt_get_uuid_id(_cfgt_node);
+ LM_INFO("*** node uuid:[%.*s] id:[%d] created ***\n",
+ STR_FMT(&_cfgt_node->uuid), _cfgt_node->msgid);
+ return res;
} else {
LM_DBG("_cfgt_node->uuid:[%.*s]\n", _cfgt_node->uuid.len,
_cfgt_node->uuid.s);