From: Felix Fietkau Date: Mon, 15 Apr 2013 14:48:57 +0000 (+0200) Subject: tls: fix container_of use for casting the ssl ustream to client state X-Git-Url: http://git.archive.openwrt.org/?p=project%2Fuhttpd.git;a=commitdiff_plain;h=9d83bd3c524c4bbeb8e6583155dd7df9e8a1b5d3 tls: fix container_of use for casting the ssl ustream to client state Signed-off-by: Felix Fietkau --- diff --git a/tls.c b/tls.c index 39b3169..d969b82 100644 --- a/tls.c +++ b/tls.c @@ -68,14 +68,14 @@ int uh_tls_init(const char *key, const char *crt) static void tls_ustream_read_cb(struct ustream *s, int bytes) { - struct client *cl = container_of(s, struct client, ssl); + struct client *cl = container_of(s, struct client, ssl.stream); uh_client_read_cb(cl); } static void tls_ustream_write_cb(struct ustream *s, int bytes) { - struct client *cl = container_of(s, struct client, ssl); + struct client *cl = container_of(s, struct client, ssl.stream); if (cl->dispatch.write_cb) cl->dispatch.write_cb(cl); @@ -83,7 +83,7 @@ static void tls_ustream_write_cb(struct ustream *s, int bytes) static void tls_notify_state(struct ustream *s) { - struct client *cl = container_of(s, struct client, ssl); + struct client *cl = container_of(s, struct client, ssl.stream); uh_client_notify_state(cl); }