Module: kamailio Branch: 5.4 Commit: b9846143c171d731e94d7f0d450b40f66f2ac2c6 URL: https://github.com/kamailio/kamailio/commit/b9846143c171d731e94d7f0d450b40f6...
Author: Victor Seva linuxmaniac@torreviejawireless.org Committer: Victor Seva linuxmaniac@torreviejawireless.org Date: 2020-12-04T10:32:21+01:00
cfgt: log info when node is created and saved
(cherry picked from commit a2eff905626c6428539d3d848e7968f5dd0f2108)
---
Modified: src/modules/cfgt/cfgt_int.c
---
Diff: https://github.com/kamailio/kamailio/commit/b9846143c171d731e94d7f0d450b40f6... Patch: https://github.com/kamailio/kamailio/commit/b9846143c171d731e94d7f0d450b40f6...
---
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);