ustream: make notify_state optional as well
This commit is contained in:
parent
efc9f4b702
commit
a9b44ebe55
2 changed files with 3 additions and 2 deletions
|
@ -104,7 +104,8 @@ static void ustream_state_change_cb(struct uloop_timeout *t)
|
|||
|
||||
if (s->write_error)
|
||||
ustream_free_buffers(&s->w);
|
||||
s->notify_state(s);
|
||||
if (s->notify_state)
|
||||
s->notify_state(s);
|
||||
}
|
||||
|
||||
void ustream_init_defaults(struct ustream *s)
|
||||
|
|
|
@ -68,7 +68,7 @@ struct ustream {
|
|||
void (*notify_write)(struct ustream *s, int bytes);
|
||||
|
||||
/*
|
||||
* notify_state:
|
||||
* notify_state: (optional)
|
||||
* called by the ustream implementation to notify that the read
|
||||
* side of the stream is closed (eof is set) or there was a write
|
||||
* error (write_error is set).
|
||||
|
|
Loading…
Reference in a new issue