Register the session project with the background watcher for ongoing * change detection — unless auto_watch is disabled. */
| 11120 | /* Register the session project with the background watcher for ongoing |
| 11121 | * change detection — unless auto_watch is disabled. */ |
| 11122 | static void register_watcher_if_enabled(cbm_mcp_server_t *srv) { |
| 11123 | if (!srv->watcher || srv->session_project[0] == '\0' || srv->session_root[0] == '\0') { |
| 11124 | return; |
| 11125 | } |
| 11126 | if (!auto_watch_enabled(srv)) { |
| 11127 | cbm_log_info("watcher.register.skipped", "reason", "auto_watch_off", "project", |
| 11128 | srv->session_project); |
| 11129 | return; |
| 11130 | } |
| 11131 | cbm_watcher_watch(srv->watcher, srv->session_project, srv->session_root); |
| 11132 | } |
| 11133 | |
| 11134 | /* Background auto-index thread function */ |
| 11135 | static void *autoindex_thread(void *arg) { |
no test coverage detected