pseudo-variable functions */
| 1104 | |
| 1105 | /* pseudo-variable functions */ |
| 1106 | static int pv_get_rl_count(struct sip_msg *msg, pv_param_t *param, |
| 1107 | pv_value_t *res) |
| 1108 | { |
| 1109 | int counter; |
| 1110 | |
| 1111 | if (!param) |
| 1112 | return pv_get_null(msg, param, res); |
| 1113 | |
| 1114 | if(pv_get_spec_name(msg, param, res)!=0 || (!(res->flags&PV_VAL_STR))) { |
| 1115 | LM_ERR("invalid name\n"); |
| 1116 | return -1; |
| 1117 | } |
| 1118 | |
| 1119 | counter = rl_get_counter_value(&res->rs); |
| 1120 | if (counter < 0) { |
| 1121 | return pv_get_null(msg, param, res); |
| 1122 | } |
| 1123 | |
| 1124 | return pv_get_uintval(msg, param, res, counter); |
| 1125 | } |
| 1126 | |
| 1127 | static int pv_parse_rl_count(pv_spec_p sp, const str *in) |
| 1128 | { |
nothing calls this directly
no test coverage detected