TT#81700 cfgt: add log info on creation and save

Helps creating/debugging tests scenarios

Change-Id: I9d94525b408a95ff5a7788261565f66828df04cb
mr9.2
Victor Seva 6 years ago
parent 6e835bd588
commit 6a80d80c35

@ -41,6 +41,7 @@ upstream/ndb_redis-set-message-level-to-debug-on-exec.patch
upstream/permissions-basic-safety-for-concurent-rpc-reload.patch
upstream/permissions-add-reload_delta-parameter.patch
upstream/ndb_redis-set-message-level-to-debug-on-reconnect.patch
upstream/cfgt-log-info-when-node-is-created-and-saved.patch
### relevant for upstream
sipwise/pua_dialoginfo-refresh_pubruri_avps_flag.patch
sipwise/pua_dialoginfo-local_identity_dlg_var.patch

@ -0,0 +1,42 @@
From: Victor Seva <vseva@sipwise.com>
Date: Thu, 3 Dec 2020 14:32:45 +0100
Subject: cfgt: log info when node is created and saved
---
src/modules/cfgt/cfgt_int.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/src/modules/cfgt/cfgt_int.c b/src/modules/cfgt/cfgt_int.c
index c47a1ce..7b0c991 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);
Loading…
Cancel
Save