write_queue: Add callback for exceptions as well.
authorHolger Hans Peter Freyther <zecke@selfish.org>
Thu, 8 Apr 2010 08:58:20 +0000 (10:58 +0200)
committerHolger Hans Peter Freyther <zecke@selfish.org>
Thu, 8 Apr 2010 08:58:20 +0000 (10:58 +0200)
include/osmocore/write_queue.h
src/write_queue.c

index 64d4159..ef244c3 100644 (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);
index a0ac2d6..618a8c0 100644 (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;