| 4100 | |
| 4101 | |
| 4102 | static 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 | |
| 4125 | static int pv_get_log_level(struct sip_msg *msg, pv_param_t *param, pv_value_t *res) |
| 4126 | { |
nothing calls this directly
no test coverage detected