Browse code

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

Olle E. Johansson authored on 04/01/2022 09:47:28
Showing 1 changed files
... ...
@@ -937,6 +937,7 @@ void rpc_mtree_reload(rpc_t* rpc, void* c)
937 937
 		if(mt_load_db_trees()!=0)
938 938
 		{
939 939
 			rpc->fault(c, 500, "Can not reload Mtrees from database.");
940
+			LM_ERR("RPC failed: cannot reload mtrees from database\n");
940 941
 			return;
941 942
 		}
942 943
 		rpc->rpl_printf(c, "Ok. Mtrees reloaded.");
... ...
@@ -945,6 +946,7 @@ void rpc_mtree_reload(rpc_t* rpc, void* c)
945 946
 	if(!mt_defined_trees())
946 947
 	{
947 948
 		rpc->fault(c, 500, "No Mtrees defined.");
949
+		LM_ERR("RPC failed: No Mtrees defined\n");
948 950
 		return;
949 951
 	}
950 952
 
... ...
@@ -971,6 +973,7 @@ void rpc_mtree_reload(rpc_t* rpc, void* c)
971 973
 			if(mt_load_db(pt)!=0)
972 974
 			{
973 975
 				rpc->fault(c, 500, "Mtree Reload Failed");
976
+				LM_ERR("RPC failed: cannot reload mtrees from database\n");
974 977
 				return;
975 978
 			}
976 979
 			treeloaded = 1;
... ...
@@ -978,7 +981,7 @@ void rpc_mtree_reload(rpc_t* rpc, void* c)
978 981
 		pt = pt->next;
979 982
 	}
980 983
 	if(treeloaded == 0) {
981
-		rpc->fault(c, 500, "Can not find specified Mtree");
984
+		rpc->fault(c, 500, "Can not find specified Mtree");	
982 985
 	}
983 986
 	rpc->rpl_printf(c, "Ok. Mtree reloaded.");
984 987
 	return;