From 75b2094cdd893bff4fb6e28f228f134701eee15a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C5=99emysl=20Eric=20Janouch?= Date: Thu, 15 Oct 2020 02:11:51 +0200 Subject: json-rpc-test-server: add a simple co-process mode A disgusting copy-paste but it will have to do for now. Closes #6 --- json-rpc-shell.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'json-rpc-shell.c') diff --git a/json-rpc-shell.c b/json-rpc-shell.c index 1da11b0..38ff022 100644 --- a/json-rpc-shell.c +++ b/json-rpc-shell.c @@ -2623,7 +2623,7 @@ static const http_parser_settings backend_co_http_settings = }; static bool -backend_co_write_starter (struct co_context *self, struct error **e) +backend_co_inject_starter (struct co_context *self, struct error **e) { // The default "Connection: keep-alive" maps well here. // We cannot feed this line into the parser from within callbacks. @@ -2653,7 +2653,7 @@ backend_co_parse (struct co_context *self, const char *data, size_t len, if (self->pending_fake_starter) { self->pending_fake_starter = false; - if (!backend_co_write_starter (self, e)) + if (!backend_co_inject_starter (self, e)) return false; } -- cgit v1.2.3