Lines Matching defs:httpdmgr
235 isc_httpdmgr_t *httpdmgr = httpd->mgr;
239 LOCK(&httpdmgr->lock);
242 ISC_LIST_UNLINK(httpdmgr->running, httpd, link);
245 isc_mem_put(httpdmgr->mctx, httpd->headerdata,
248 isc_mem_put(httpdmgr->mctx, httpd, sizeof(isc_httpd_t));
250 UNLOCK(&httpdmgr->lock);
252 httpdmgr_destroy(httpdmgr);
324 httpdmgr_destroy(isc_httpdmgr_t *httpdmgr)
331 LOCK(&httpdmgr->lock);
333 if (!MSHUTTINGDOWN(httpdmgr)) {
335 UNLOCK(&httpdmgr->lock);
342 if (!ISC_LIST_EMPTY(httpdmgr->running)) {
344 UNLOCK(&httpdmgr->lock);
350 isc_socket_detach(&httpdmgr->sock);
351 isc_task_detach(&httpdmgr->task);
352 httpdmgr->timermgr = NULL;
358 url = ISC_LIST_HEAD(httpdmgr->urls);
360 isc_mem_free(httpdmgr->mctx, url->url);
361 ISC_LIST_UNLINK(httpdmgr->urls, url, link);
362 isc_mem_put(httpdmgr->mctx, url, sizeof(isc_httpdurl_t));
363 url = ISC_LIST_HEAD(httpdmgr->urls);
366 UNLOCK(&httpdmgr->lock);
367 (void)isc_mutex_destroy(&httpdmgr->lock);
369 if (httpdmgr->ondestroy != NULL)
370 (httpdmgr->ondestroy)(httpdmgr->cb_arg);
372 mctx = httpdmgr->mctx;
373 isc_mem_putanddetach(&mctx, httpdmgr, sizeof(isc_httpdmgr_t));
519 isc_httpdmgr_t *httpdmgr = ev->ev_arg;
527 LOCK(&httpdmgr->lock);
528 if (MSHUTTINGDOWN(httpdmgr)) {
545 if (httpdmgr->client_ok != NULL &&
546 !(httpdmgr->client_ok)(&peeraddr, httpdmgr->cb_arg)) {
551 httpd = isc_mem_get(httpdmgr->mctx, sizeof(isc_httpd_t));
559 httpd->mgr = httpdmgr;
561 ISC_LIST_APPEND(httpdmgr->running, httpd, link);
570 httpd->headerdata = isc_mem_get(httpdmgr->mctx, HTTP_SENDGROW);
572 isc_mem_put(httpdmgr->mctx, httpd, sizeof(isc_httpd_t));
594 result = isc_socket_accept(httpdmgr->sock, task, isc_httpd_accept,
595 httpdmgr);
602 UNLOCK(&httpdmgr->lock);
604 httpdmgr_destroy(httpdmgr);
771 isc_httpdmgr_t *httpdmgr;
773 httpdmgr = *httpdmgrp;
778 LOCK(&httpdmgr->lock);
780 MSETSHUTTINGDOWN(httpdmgr);
782 isc_socket_cancel(httpdmgr->sock, httpdmgr->task, ISC_SOCKCANCEL_ALL);
784 httpd = ISC_LIST_HEAD(httpdmgr->running);
786 isc_socket_cancel(httpd->sock, httpdmgr->task,
791 UNLOCK(&httpdmgr->lock);
1002 isc_httpdmgr_addurl(isc_httpdmgr_t *httpdmgr, const char *url,
1008 httpdmgr->render_404 = func;
1012 item = isc_mem_get(httpdmgr->mctx, sizeof(isc_httpdurl_t));
1016 item->url = isc_mem_strdup(httpdmgr->mctx, url);
1018 isc_mem_put(httpdmgr->mctx, item, sizeof(isc_httpdurl_t));
1025 ISC_LIST_APPEND(httpdmgr->urls, item, link);