From 70b9f135f8400349838df2d682a073a0706245c5 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Sat, 19 Jan 2013 16:47:37 +0100 Subject: [PATCH 1/1] fix container_of() on ustream callbacks Signed-off-by: Felix Fietkau --- client.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/client.c b/client.c index d1584f9..bcb6897 100644 --- a/client.c +++ b/client.c @@ -486,14 +486,14 @@ void uh_client_notify_state(struct client *cl) static void client_ustream_read_cb(struct ustream *s, int bytes) { - struct client *cl = container_of(s, struct client, sfd); + struct client *cl = container_of(s, struct client, sfd.stream); uh_client_read_cb(cl); } static void client_ustream_write_cb(struct ustream *s, int bytes) { - struct client *cl = container_of(s, struct client, sfd); + struct client *cl = container_of(s, struct client, sfd.stream); if (cl->dispatch.write_cb) cl->dispatch.write_cb(cl); @@ -501,7 +501,7 @@ static void client_ustream_write_cb(struct ustream *s, int bytes) static void client_notify_state(struct ustream *s) { - struct client *cl = container_of(s, struct client, sfd); + struct client *cl = container_of(s, struct client, sfd.stream); uh_client_notify_state(cl); } -- 2.11.0