diff options
author | Felix Fietkau <nbd@openwrt.org> | 2013-05-09 03:06:40 +0400 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2013-05-09 03:06:55 +0400 |
commit | 3ceb819690a1f4900a1ff45dd75d79a7118b3bbf (patch) | |
tree | d22d1ddb889752009b18fb8b157c80a07c2b60a4 /examples | |
parent | ecee1a3bea109c50964355becdce16edaafc6151 (diff) |
ustream-example: fix container_of type errors
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Diffstat (limited to 'examples')
-rw-r--r-- | examples/ustream-example.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/ustream-example.c b/examples/ustream-example.c index 68611c6..88c7381 100644 --- a/examples/ustream-example.c +++ b/examples/ustream-example.c @@ -23,7 +23,7 @@ struct client { static void client_read_cb(struct ustream *s, int bytes) { - struct client *cl = container_of(s, struct client, s); + struct client *cl = container_of(s, struct client, s.stream); struct ustream_buf *buf = s->r.head; char *newline, *str; @@ -50,7 +50,7 @@ static void client_read_cb(struct ustream *s, int bytes) static void client_close(struct ustream *s) { - struct client *cl = container_of(s, struct client, s); + struct client *cl = container_of(s, struct client, s.stream); fprintf(stderr, "Connection closed\n"); ustream_free(s); @@ -70,7 +70,7 @@ static void client_notify_write(struct ustream *s, int bytes) static void client_notify_state(struct ustream *s) { - struct client *cl = container_of(s, struct client, s); + struct client *cl = container_of(s, struct client, s.stream); if (!s->eof) return; |