Lines Matching defs:context

396 	lwsa->context = vh->context;
498 lws_protocol_init(struct lws_context *context)
500 struct lws_vhost *vh = context->vhost_list;
503 if (context->doing_protocol_init)
506 context->doing_protocol_init = 1;
508 lwsl_cx_info(context, "\n");
525 context->doing_protocol_init = 0;
528 lwsl_cx_warn(context, "some protocols did not init");
530 if (!context->protocol_init_done) {
532 context->protocol_init_done = 1;
533 lws_finalize_startup(context);
540 lws_tls_check_all_cert_lifetimes(context);
574 lws_create_vhost(struct lws_context *context,
577 struct lws_vhost *vh, **vh1 = &context->vhost_list;
581 struct lws_plugin *plugin = context->plugin_list;
601 + context->event_loop_ops->evlib_size_vh
615 context->event_loop_ops->evlib_size_vh;
628 vh->context = context;
640 __lws_lc_tag(context, &context->lcg[LWSLCG_VHOST], &vh->lc, "%s|%s|%d",
652 lws_fi_inherit_copy(&vh->fic, &context->fic, "vh", vh->name);
674 /* apply the context default lws_retry */
679 vh->retry_policy = &context->default_retry;
782 (unsigned int)context->plugin_protocol_count +
814 if (!context->vhost_list) {
835 if (context->options & LWS_SERVER_OPTION_EXPLICIT_VHOSTS)
889 vh->mt_traffic_rx = lws_metric_create(context, 0, buf);
891 vh->mt_traffic_tx = lws_metric_create(context, 0, buf);
986 if (context->uid != (uid_t)-1)
987 if (chown(info->log_filepath, context->uid,
988 context->gid) == -1)
1006 lws_context_lock(context, __func__);
1011 lws_context_unlock(context);
1019 n = !!context->vhost_list;
1032 lws_async_dns_init(context);
1037 if (context->protocol_init_done)
1039 lws_protocol_init(context)) {
1052 __lws_lc_untag(vh->context, &vh->lc);
1077 lws_plat_pipe_signal(wsi->a.context, wsi->tsi);
1081 lws_cancel_service(struct lws_context *context)
1083 struct lws_context_per_thread *pt = &context->pt[0];
1086 if (context->service_no_longer_possible)
1089 lwsl_cx_debug(context, "\n");
1091 for (m = 0; m < context->count_threads; m++) {
1093 lws_plat_pipe_signal(pt->context, m);
1099 __lws_create_event_pipes(struct lws_context *context)
1111 for (n = 0; n < context->count_threads; n++) {
1116 pt = &context->pt[n];
1121 wsi = __lws_wsi_create_with_role(context, n, &role_ops_pipe,
1126 __lws_lc_tag(context, &context->lcg[LWSLCG_WSI], &wsi->lc,
1142 wsi->desc.sockfd = context->pt[n].dummy_pipe_fds[0];
1185 int tsi = lws_pthread_self_to_tsi(vh->context);
1189 struct lws_context *ctx = vh->context;
1194 if (vh->close_flow_vs_tsi[lws_pthread_self_to_tsi(vh->context)])
1242 vh->close_flow_vs_tsi[lws_pthread_self_to_tsi(vh->context)] = 1;
1288 struct lws_context *context = vh->context;
1293 lws_context_lock(context, "vhost destroy 1"); /* ---------- context { */
1303 for (n = 0; n < context->count_threads; n++)
1304 lws_pt_lock((&context->pt[n]), __func__);
1314 &context->owner_vh_being_destroyed);
1342 context->vhost_list) {
1402 for (n = 0; n < context->count_threads; n++)
1403 lws_pt_unlock((&context->pt[n]));
1406 lws_context_unlock(context); /* --------------------------- context { */
1432 struct lws_context *context = vh->context;
1444 vh->context->no_listener_vhost_list) {
1459 wsi.a.context = vh->context;
1478 * remove vhost from context list of vhosts
1481 lws_start_foreach_llp(struct lws_vhost **, pv, context->vhost_list) {
1490 if (vh->context->vhost_pending_destruction_list != vh) {
1491 vh->vhost_next = vh->context->vhost_pending_destruction_list;
1492 vh->context->vhost_pending_destruction_list = vh;
1500 context->vhost_pending_destruction_list) {
1531 context->plugin_list ||
1533 (context->options & LWS_SERVER_OPTION_EXPLICIT_VHOSTS) ||
1596 __lws_lc_untag(vh->context, &vh->lc);
1631 struct lws_context *context = vh->context;
1633 lws_context_lock(context, __func__); /* ------ context { */
1660 lws_cancel_service(context);
1664 lws_context_unlock(context); /* } context ------------------- */
1722 lws_get_vhost_by_name(struct lws_context *context, const char *name)
1725 context->vhost_list) {
1789 lws_context_lock(wsi->a.context, __func__); /* -------------- cx { */
1858 lws_context_unlock(wsi->a.context); /* -------------- cx { */
1881 lws_context_unlock(wsi->a.context); /* -------------- cx { */
1913 lws_context_unlock(wsi->a.context); /* -------------- cx { */
1924 lws_context_unlock(wsi->a.context); /* -------------- cx { */