MCPcopy Create free account
hub / github.com/OpenSIPS/opensips / pv_set_log_level

Function pv_set_log_level

pvar.c:4102–4123  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4100
4101
4102static int pv_set_log_level(struct sip_msg* msg, pv_param_t *param, int op,
4103 pv_value_t *val)
4104{
4105 if(param==NULL)
4106 {
4107 LM_ERR("bad parameters\n");
4108 return -1;
4109 }
4110
4111 if(val==NULL || (val->flags&(PV_VAL_NULL|PV_VAL_NONE))!=0) {
4112 /* reset the value to default */
4113 reset_proc_log_level();
4114 } else {
4115 if ((val->flags&PV_TYPE_INT)==0) {
4116 LM_ERR("input for $log_level found not to be an integer\n");
4117 return -1;
4118 }
4119 set_proc_log_level(val->ri);
4120 }
4121
4122 return 0;
4123}
4124
4125static int pv_get_log_level(struct sip_msg *msg, pv_param_t *param, pv_value_t *res)
4126{

Callers

nothing calls this directly

Calls 2

reset_proc_log_levelFunction · 0.85
set_proc_log_levelFunction · 0.85

Tested by

no test coverage detected