[sr-dev] git:master:cf1907ca: mtree: Re-instate error log messages in RPC reload removed in an earlier commit

Olle E. Johansson oej at edvina.net
Tue Jan 4 10:49:58 CET 2022


Module: kamailio
Branch: master
Commit: cf1907cac4c21fe12a27057cc3eeb2dd98e65635
URL: https://github.com/kamailio/kamailio/commit/cf1907cac4c21fe12a27057cc3eeb2dd98e65635

Author: Olle E. Johansson <oej at edvina.net>
Committer: Olle E. Johansson <oej at edvina.net>
Date: 2022-01-04T10:47:28+01:00

mtree: Re-instate error log messages in RPC reload removed in an earlier commit

---

Modified: src/modules/mtree/mtree_mod.c

---

Diff:  https://github.com/kamailio/kamailio/commit/cf1907cac4c21fe12a27057cc3eeb2dd98e65635.diff
Patch: https://github.com/kamailio/kamailio/commit/cf1907cac4c21fe12a27057cc3eeb2dd98e65635.patch

---

diff --git a/src/modules/mtree/mtree_mod.c b/src/modules/mtree/mtree_mod.c
index 1a2cd9f737..8c703f3531 100644
--- a/src/modules/mtree/mtree_mod.c
+++ b/src/modules/mtree/mtree_mod.c
@@ -937,6 +937,7 @@ void rpc_mtree_reload(rpc_t* rpc, void* c)
 		if(mt_load_db_trees()!=0)
 		{
 			rpc->fault(c, 500, "Can not reload Mtrees from database.");
+			LM_ERR("RPC failed: cannot reload mtrees from database\n");
 			return;
 		}
 		rpc->rpl_printf(c, "Ok. Mtrees reloaded.");
@@ -945,6 +946,7 @@ void rpc_mtree_reload(rpc_t* rpc, void* c)
 	if(!mt_defined_trees())
 	{
 		rpc->fault(c, 500, "No Mtrees defined.");
+		LM_ERR("RPC failed: No Mtrees defined\n");
 		return;
 	}
 
@@ -971,6 +973,7 @@ void rpc_mtree_reload(rpc_t* rpc, void* c)
 			if(mt_load_db(pt)!=0)
 			{
 				rpc->fault(c, 500, "Mtree Reload Failed");
+				LM_ERR("RPC failed: cannot reload mtrees from database\n");
 				return;
 			}
 			treeloaded = 1;
@@ -978,7 +981,7 @@ void rpc_mtree_reload(rpc_t* rpc, void* c)
 		pt = pt->next;
 	}
 	if(treeloaded == 0) {
-		rpc->fault(c, 500, "Can not find specified Mtree");
+		rpc->fault(c, 500, "Can not find specified Mtree");	
 	}
 	rpc->rpl_printf(c, "Ok. Mtree reloaded.");
 	return;




More information about the sr-dev mailing list