| 409 | } |
| 410 | |
| 411 | static int th_server_start(th_server_t *ts) { |
| 412 | ts->srv = cbm_http_server_new(0); |
| 413 | if (!ts->srv) |
| 414 | return -1; |
| 415 | if (cbm_thread_create(&ts->tid, 0, th_server_thread, ts->srv) != 0) { |
| 416 | cbm_http_server_free(ts->srv); |
| 417 | return -1; |
| 418 | } |
| 419 | return 0; |
| 420 | } |
| 421 | |
| 422 | static int th_server_start_with_watcher(th_server_t *ts, cbm_watcher_t *watcher) { |
| 423 | ts->srv = cbm_http_server_new(0); |
no test coverage detected