| 517 | } |
| 518 | |
| 519 | static int th_server_start(th_server_t *ts) { |
| 520 | ts->srv = cbm_http_server_new(0); |
| 521 | if (!ts->srv) |
| 522 | return -1; |
| 523 | if (th_server_thread_start(&ts->tid, ts->srv) != 0) { |
| 524 | (void)cbm_http_server_free(ts->srv); |
| 525 | return -1; |
| 526 | } |
| 527 | return 0; |
| 528 | } |
| 529 | |
| 530 | static int th_server_start_with_watcher(th_server_t *ts, cbm_watcher_t *watcher) { |
| 531 | ts->srv = cbm_http_server_new(0); |
no test coverage detected