| 611 | } |
| 612 | |
| 613 | static int th_server_start(th_server_t *ts) { |
| 614 | ts->srv = cbm_http_server_new(0); |
| 615 | if (!ts->srv) |
| 616 | return -1; |
| 617 | if (th_server_thread_start(&ts->tid, ts->srv) != 0) { |
| 618 | (void)cbm_http_server_free(ts->srv); |
| 619 | return -1; |
| 620 | } |
| 621 | return 0; |
| 622 | } |
| 623 | |
| 624 | static int th_server_start_with_watcher(th_server_t *ts, cbm_watcher_t *watcher) { |
| 625 | ts->srv = cbm_http_server_new(0); |
no test coverage detected