MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / cbm_httpd_conn_close

Function cbm_httpd_conn_close

src/ui/httpd.c:406–420  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

404}
405
406void cbm_httpd_conn_close(cbm_http_conn_t *c) {
407 if (!c)
408 return;
409 cbm_httpd_t *owner = c->owner;
410 if (owner) {
411 cbm_mutex_lock(&owner->active_mutex);
412 if (owner->active == c)
413 owner->active = NULL;
414 cbm_sock_close(c->fd);
415 cbm_mutex_unlock(&owner->active_mutex);
416 } else {
417 cbm_sock_close(c->fd);
418 }
419 free(c);
420}
421
422int cbm_http_conn_status(const cbm_http_conn_t *c) {
423 return c ? c->response_status : 0;

Callers 3

cbm_http_server_runFunction · 0.85
test_httpd.cFile · 0.85
th_httpd_large_replyFunction · 0.85

Calls 2

cbm_mutex_lockFunction · 0.85
cbm_mutex_unlockFunction · 0.85

Tested by 1

th_httpd_large_replyFunction · 0.68