| 2364 | } |
| 2365 | |
| 2366 | static mi_response_t *mi_dr_get_partition(const mi_params_t *params, |
| 2367 | struct head_db **partition) |
| 2368 | { |
| 2369 | str part_name; |
| 2370 | |
| 2371 | if (!use_partitions) |
| 2372 | return init_mi_error_extra(400, |
| 2373 | MI_SSTR("Invalid parameter: 'partition_name'"), |
| 2374 | MI_SSTR("'partition_name' supported only when 'use_partitions' is set")); |
| 2375 | |
| 2376 | if (get_mi_string_param(params, "partition_name", |
| 2377 | &part_name.s, &part_name.len) < 0) |
| 2378 | return init_mi_param_error(); |
| 2379 | |
| 2380 | if((*partition = get_partition(&part_name)) == NULL) { |
| 2381 | LM_ERR("Partition not found\n"); |
| 2382 | return init_mi_error(404, MI_SSTR("Partition not found")); |
| 2383 | } |
| 2384 | |
| 2385 | return NULL; |
| 2386 | } |
| 2387 | |
| 2388 | mi_response_t *dr_reload_cmd(const mi_params_t *params, |
| 2389 | struct mi_handler *async_hdl) |
no test coverage detected