kore

An easy to use, scalable and secure web application framework for writing web APIs in C.
Commits | Files | Refs | README | LICENSE | git clone https://git.kore.io/kore.git

commit ecefdb18ab681fc3491d581169e6ddc2dc6d5fe9
parent 34f6d088fa060240e30e3a465669607492b8ef0f
Author: Joris Vink <joris@coders.se>
Date:   Wed, 14 Aug 2013 15:56:44 +0200

cb_extra -> hdlr_extra and add one to struct connection as well for persistent data across requests.

Diffstat:
includes/http.h | 2+-
includes/kore.h | 1+
src/connection.c | 1+
src/http.c | 2+-
4 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/includes/http.h b/includes/http.h @@ -55,7 +55,7 @@ struct http_request { struct connection *owner; struct spdy_stream *stream; struct kore_buf *post_data; - void *cb_extra; + void *hdlr_extra; TAILQ_HEAD(, http_header) req_headers; TAILQ_HEAD(, http_header) resp_headers; diff --git a/includes/kore.h b/includes/kore.h @@ -120,6 +120,7 @@ struct connection { void *owner; SSL *ssl; u_int8_t flags; + void *hdlr_extra; u_int8_t addrtype; union { diff --git a/src/connection.c b/src/connection.c @@ -68,6 +68,7 @@ kore_connection_accept(struct listener *l, struct connection **out) c->owner = l; c->ssl = NULL; c->flags = 0; + c->hdlr_extra = NULL; c->inflate_started = 0; c->deflate_started = 0; c->client_stream_id = 0; diff --git a/src/http.c b/src/http.c @@ -65,8 +65,8 @@ http_request_new(struct connection *c, struct spdy_stream *s, char *host, req->owner = c; req->status = 0; req->stream = s; - req->cb_extra = NULL; req->post_data = NULL; + req->hdlr_extra = NULL; kore_strlcpy(req->host, host, sizeof(req->host)); kore_strlcpy(req->path, path, sizeof(req->path));