helper functions ********/ * convert unsigned int to pv_value_t */
| 159 | * convert unsigned int to pv_value_t |
| 160 | */ |
| 161 | int pv_get_uintval(struct sip_msg *msg, pv_param_t *param, |
| 162 | pv_value_t *res, unsigned int uival) |
| 163 | { |
| 164 | int l = 0; |
| 165 | char *ch = NULL; |
| 166 | |
| 167 | if(res==NULL) |
| 168 | return -1; |
| 169 | |
| 170 | ch = int2str(uival, &l); |
| 171 | res->rs.s = ch; |
| 172 | res->rs.len = l; |
| 173 | |
| 174 | res->ri = (int)uival; |
| 175 | res->flags = PV_VAL_STR|PV_VAL_INT|PV_TYPE_INT; |
| 176 | return 0; |
| 177 | } |
| 178 | |
| 179 | /** |
| 180 | * convert signed int to pv_value_t |
no test coverage detected