| 137 | } |
| 138 | |
| 139 | static json_t *jselect_parent(const char **child_key, int create, md_json_t *json, va_list ap) |
| 140 | { |
| 141 | const char *key, *next; |
| 142 | json_t *j, *jn; |
| 143 | |
| 144 | *child_key = NULL; |
| 145 | j = json->j; |
| 146 | key = va_arg(ap, char *); |
| 147 | while (key && j) { |
| 148 | next = va_arg(ap, char *); |
| 149 | if (next) { |
| 150 | jn = json_object_get(j, key); |
| 151 | if (!jn && create) { |
| 152 | jn = json_object(); |
| 153 | json_object_set_new(j, key, jn); |
| 154 | } |
| 155 | j = jn; |
| 156 | } |
| 157 | else { |
| 158 | *child_key = key; |
| 159 | } |
| 160 | key = next; |
| 161 | } |
| 162 | return j; |
| 163 | } |
| 164 | |
| 165 | static apr_status_t jselect_add(json_t *val, md_json_t *json, va_list ap) |
| 166 | { |
no outgoing calls
no test coverage detected