--- a/src/line_proto.c Sun Mar 01 00:34:33 2009 +0200
+++ b/src/line_proto.c Sun Mar 01 01:48:14 2009 +0200
@@ -251,7 +251,7 @@
// drop line if we already have output buffered
if (lp->out_offset)
- return -ERR_WRITE_EOF;
+ return -ERR_LINE_TOO_LONG;
// try and write the line
if ((ret = sock_stream_write(lp->sock, line, len)) < 0) {
@@ -275,7 +275,8 @@
lp->out_offset = trailing;
// register for EV_WRITE
- line_proto_schedule_events(lp, EV_READ | EV_WRITE);
+ if (line_proto_schedule_events(lp, EV_READ | EV_WRITE))
+ return -ERROR_CODE(&lp->err);
// buffered...
return 1;
@@ -317,7 +318,8 @@
}
// register for EV_WRITE
- line_proto_schedule_events(lp, EV_READ | EV_WRITE);
+ if (line_proto_schedule_events(lp, EV_READ | EV_WRITE))
+ return -ERROR_CODE(&lp->err);
// ok
return 1;