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

This commit is contained in:
Joris Vink 2013-08-14 15:56:44 +02:00
parent 34f6d088fa
commit ecefdb18ab
4 changed files with 4 additions and 2 deletions

View File

@ -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;

View File

@ -120,6 +120,7 @@ struct connection {
void *owner;
SSL *ssl;
u_int8_t flags;
void *hdlr_extra;
u_int8_t addrtype;
union {

View File

@ -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;

View File

@ -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));