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

Function cbm_httpd_conn_close

src/ui/httpd.c:411–425  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

409}
410
411void cbm_httpd_conn_close(cbm_http_conn_t *c) {
412 if (!c)
413 return;
414 cbm_httpd_t *owner = c->owner;
415 if (owner) {
416 cbm_mutex_lock(&owner->active_mutex);
417 if (owner->active == c)
418 owner->active = NULL;
419 cbm_sock_close(c->fd);
420 cbm_mutex_unlock(&owner->active_mutex);
421 } else {
422 cbm_sock_close(c->fd);
423 }
424 free(c);
425}
426
427int cbm_http_conn_status(const cbm_http_conn_t *c) {
428 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