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