creates an element and links it to the parameters list * but without populating the parameter value */
| 32 | /* creates an element and links it to the parameters list |
| 33 | * but without populating the parameter value */ |
| 34 | evi_param_p evi_param_create(evi_params_p list, const str *name) |
| 35 | { |
| 36 | evi_param_p new_p; |
| 37 | |
| 38 | if (!list) { |
| 39 | LM_ERR("invalid param list\n"); |
| 40 | return 0; |
| 41 | } |
| 42 | |
| 43 | new_p = pkg_malloc(sizeof(evi_param_t)); |
| 44 | if (!new_p) { |
| 45 | LM_ERR("no more pkg mem for new parameter\n"); |
| 46 | return 0; |
| 47 | } |
| 48 | memset(new_p, 0, sizeof(evi_param_t)); |
| 49 | |
| 50 | if (name) |
| 51 | new_p->name = *name; |
| 52 | |
| 53 | new_p->next = NULL; |
| 54 | if (list->last) { |
| 55 | list->last->next = new_p; |
| 56 | list->last = new_p; |
| 57 | } else { |
| 58 | list->last = list->first = new_p; |
| 59 | } |
| 60 | return new_p; |
| 61 | } |
| 62 | |
| 63 | int evi_param_set(evi_param_p el, const void *param, int flags) |
| 64 | { |
no outgoing calls
no test coverage detected