write_queue: Add callback for exceptions as well.

This commit is contained in:
Holger Hans Peter Freyther 2010-04-08 10:58:20 +02:00
parent 9bb553ee40
commit 4052c811a9
2 changed files with 4 additions and 0 deletions

View File

@ -35,6 +35,7 @@ struct write_queue {
int (*read_cb)(struct bsc_fd *fd);
int (*write_cb)(struct bsc_fd *fd, struct msgb *msg);
int (*except_cb)(struct bsc_fd *fd);
};
void write_queue_init(struct write_queue *queue, int max_length);

View File

@ -32,6 +32,9 @@ int write_queue_bfd_cb(struct bsc_fd *fd, unsigned int what)
if (what & BSC_FD_READ)
queue->read_cb(fd);
if (what & BSC_FD_EXCEPT)
queue->except_cb(fd);
if (what & BSC_FD_WRITE) {
struct msgb *msg;