| 2348 | } |
| 2349 | |
| 2350 | static char *application_auto_index_args(cbm_daemon_application_t *application, |
| 2351 | const char *root_path) { |
| 2352 | yyjson_mut_doc *document = yyjson_mut_doc_new(NULL); |
| 2353 | yyjson_mut_val *root = document ? yyjson_mut_obj(document) : NULL; |
| 2354 | if (!document || !root) { |
| 2355 | yyjson_mut_doc_free(document); |
| 2356 | return NULL; |
| 2357 | } |
| 2358 | yyjson_mut_doc_set_root(document, root); |
| 2359 | char *args = yyjson_mut_obj_add_strcpy(document, root, "repo_path", root_path) && |
| 2360 | application_index_args_add_policy(application, document, root) |
| 2361 | ? yyjson_mut_write(document, 0, NULL) |
| 2362 | : NULL; |
| 2363 | yyjson_mut_doc_free(document); |
| 2364 | return args; |
| 2365 | } |
| 2366 | |
| 2367 | static void application_background_initialize_impl(cbm_daemon_application_session_t *session) { |
| 2368 | if (!session || !session->application || !session->context_set || |
no test coverage detected