Allow channels to be marked as dirty
This commit is contained in:
parent
d34a25a62d
commit
2b84318ebe
@ -237,6 +237,22 @@ chan_flush(struct chan *chan)
|
||||
return 0;
|
||||
}
|
||||
|
||||
/** Marks the channel as dirty */
|
||||
int
|
||||
chan_dirty(struct chan *chan)
|
||||
{
|
||||
/* Nothing to do, already dirty */
|
||||
if (chan->is_dirty)
|
||||
return 0;
|
||||
|
||||
if (set_dirty(chan) != 0) {
|
||||
err("%s: set_dirty failed\n", chan->name);
|
||||
return -1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void
|
||||
chan_prop_set(struct chan *chan, enum chan_prop prop, int value)
|
||||
{
|
||||
|
@ -63,5 +63,6 @@ USE_RET int chan_flush(struct chan *chan);
|
||||
void chan_prop_set(struct chan *chan, enum chan_prop prop, int value);
|
||||
USE_RET int chan_prop_get(struct chan *chan, enum chan_prop prop);
|
||||
void chan_set_dirty_cb(struct chan *chan, chan_cb_t func, void *arg);
|
||||
USE_RET int chan_dirty(struct chan *chan);
|
||||
|
||||
#endif /* CHAN_H */
|
||||
|
Loading…
Reference in New Issue
Block a user