]> jfr.im git - irc/atheme/libmowgli-2.git/commitdiff
linebuf: accomodations for edge-triggered interfaces.
authorElizabeth J. Myers <redacted>
Thu, 29 Mar 2012 04:09:51 +0000 (23:09 -0500)
committerElizabeth J. Myers <redacted>
Thu, 29 Mar 2012 04:09:51 +0000 (23:09 -0500)
src/libmowgli/linebuf/linebuf.c

index 0db42e8904a8a791a5b93222fe8c8a38108b4335..8b13040ae1c7b759ebd23218fc1eb6871edd9337 100644 (file)
@@ -135,7 +135,11 @@ static void mowgli_linebuf_read_data(mowgli_eventloop_t *eventloop, mowgli_event
                return;
        }
 
-       /* Do we want an SSL write? */
+       /* Le sigh -- stupid edge-triggered interfaces */
+       if (mowgli_vio_hasflag(linebuf->vio, MOWGLI_VIO_FLAGS_NEEDREAD))
+               mowgli_pollable_setselect(eventloop, io, MOWGLI_EVENTLOOP_IO_READ, mowgli_linebuf_read_data);
+
+       /* Do we want a write for SSL? */
        if (mowgli_vio_hasflag(linebuf->vio, MOWGLI_VIO_FLAGS_NEEDWRITE))
                mowgli_pollable_setselect(eventloop, io, MOWGLI_EVENTLOOP_IO_WRITE, mowgli_linebuf_write_data);