Lines Matching refs:ctx

282 lejp_globals_cb(struct lejp_ctx *ctx, char reason)
284 struct jpargs *a = (struct jpargs *)ctx->user;
289 if (!(reason & LEJP_FLAG_CB_IS_VALUE) || !ctx->path_match)
294 ctx->path_match == LWJPGP_REJECT_SERVICE_KEYWORDS_NAME + 1) {
298 n = lejp_get_wildcard(ctx, 0, a->p, lws_ptr_diff(a->end, a->p));
302 lwsl_notice(" adding rej %s=%s\n", a->p, ctx->buf);
310 switch (ctx->path_match - 1) {
312 a->info->uid = (unsigned int)atoi(ctx->buf);
315 a->info->gid = (unsigned int)atoi(ctx->buf);
324 a->info->count_threads = (unsigned int)atoi(ctx->buf);
327 if (arg_to_bool(ctx->buf))
347 a->info->timeout_secs = (unsigned int)atoi(ctx->buf);
358 a->info->ip_limit_ah = (uint16_t)atoi(ctx->buf);
362 a->info->ip_limit_wsi = (uint16_t)atoi(ctx->buf);
367 a->info->rlimit_nofile = atoi(ctx->buf);
375 a->p += lws_snprintf(a->p, lws_ptr_diff_size_t(a->end, a->p), "%s", ctx->buf);
382 lejp_vhosts_cb(struct lejp_ctx *ctx, char reason)
384 struct jpargs *a = (struct jpargs *)ctx->user;
391 lwsl_notice(" %d: %s (%d)\n", reason, ctx->path, ctx->path_match);
392 for (n = 0; n < ctx->wildcount; n++)
393 lwsl_notice(" %d\n", ctx->wild[n]);
396 if (reason == LEJPCB_OBJECT_START && ctx->path_match == LEJPVP + 1) {
473 ctx->path_match == LEJPVP_MOUNTS + 1) {
480 ctx->path_match == LEJPVP_PROTOCOL_NAME + 1) {
484 n = lejp_get_wildcard(ctx, 0, a->p, lws_ptr_diff(a->end, a->p));
498 ctx->path_match == LEJPVP_HEADERS_NAME + 1) {
504 n = lejp_get_wildcard(ctx, 0, a->p,
511 lwsl_notice(" adding header %s=%s\n", a->p, ctx->buf);
526 (ctx->path_match == LEJPVP + 1 || !ctx->path[0]) &&
531 //lwsl_notice("%s\n", ctx->path);
580 ctx->path_match == LEJPVP_MOUNTS + 1) {
629 if (!(reason & LEJP_FLAG_CB_IS_VALUE) || !ctx->path_match)
632 switch (ctx->path_match - 1) {
637 a->info->port = atoi(ctx->buf);
643 if (arg_to_bool(ctx->buf))
652 if (arg_to_bool(ctx->buf))
673 a->m.mountpoint_len = (unsigned char)strlen(ctx->buf);
676 if (!strncmp(ctx->buf, "callback://", 11))
686 a->m.auth_mask = (unsigned int)atoi(ctx->buf);
689 a->m.cache_max_age = atoi(ctx->buf);
692 a->m.cache_reusable = !!arg_to_bool(ctx->buf);
695 a->m.cache_revalidate = !!arg_to_bool(ctx->buf);
698 a->m.cache_intermediaries = !!arg_to_bool(ctx->buf);;
706 a->m.cgi_timeout = atoi(ctx->buf);
709 a->info->fo_listen_queue = atoi(ctx->buf);
712 a->info->keepalive_timeout = atoi(ctx->buf);
742 n = lejp_get_wildcard(ctx, 0, a->p, lws_ptr_diff(a->end, a->p));
759 n = lejp_get_wildcard(ctx, 1, a->p, lws_ptr_diff(a->end, a->p));
773 n = lejp_get_wildcard(ctx, 0, a->p, lws_ptr_diff(a->end, a->p));
778 lwsl_notice(" + extra-mimetypes %s -> %s\n", a->p, ctx->buf);
788 n = lejp_get_wildcard(ctx, 0, a->p, lws_ptr_diff(a->end, a->p));
794 ctx->buf);
801 a->enable_client_ssl = !!arg_to_bool(ctx->buf);
816 set_reset_flag(&a->info->options, ctx->buf,
821 set_reset_flag(&a->info->options, ctx->buf,
827 set_reset_flag(&a->info->options, ctx->buf,
832 if (arg_to_bool(ctx->buf))
838 set_reset_flag(&a->info->options, ctx->buf,
843 set_reset_flag(&a->info->options, ctx->buf,
853 a->info->ssl_options_set |= atol(ctx->buf);
856 a->info->ssl_options_clear |= atol(ctx->buf);
861 a->info->ssl_client_options_set |= atol(ctx->buf);
864 a->info->ssl_client_options_clear |= atol(ctx->buf);
881 set_reset_flag(&a->info->options, ctx->buf,
886 a->info->vhost_name, ctx->buf);
887 set_reset_flag(&a->info->options, ctx->buf,
891 set_reset_flag(&a->info->options, ctx->buf,
895 set_reset_flag(&a->info->options, ctx->buf,
899 set_reset_flag(&a->info->options, ctx->buf,
908 set_reset_flag(&a->info->options, ctx->buf,
917 p = ctx->buf;
947 struct lejp_ctx ctx;
950 memset(&ctx, 0, sizeof(ctx));
958 lejp_construct(&ctx, cb, user, paths, (uint8_t)(unsigned int)count_paths);
965 m = lejp_parse(&ctx, buf, n);
969 n = (int32_t)ctx.line;
970 lejp_destruct(&ctx);