* of the GNU Lesser General Public License.
*/
-#include "ucw/lib.h"
-#include "ucw/fastbuf.h"
-#include "ucw/fb-socket.h"
+#include <ucw/lib.h>
+#include <ucw/fastbuf.h>
+#include <ucw/fb-socket.h>
#include <stdio.h>
#include <unistd.h>
byte buf[0];
};
-#define FB_SOCK(f) ((struct fb_sock *)(f)->is_fastbuf)
+#define FB_SOCK(f) ((struct fb_sock *)(f))
static int
fbs_refill(struct fastbuf *f)
.events = POLLOUT,
};
- int l = f->bptr - f->buffer;
- f->bptr = f->buffer;
- char *buf = f->buffer;
+ int l = f->bptr - f->bstop;
+ f->bptr = f->bstop;
+ char *buf = f->bstop;
while (l)
{
static void
fbs_close(struct fastbuf *f)
{
- close(FB_SOCK(f)->par.fd);
+ if (!FB_SOCK(f)->par.fd_is_shared)
+ close(FB_SOCK(f)->par.fd);
xfree(f);
}