summaryrefslogtreecommitdiff
path: root/usr.sbin/ldpd/keepalive.c
diff options
context:
space:
mode:
authorClaudio Jeker <claudio@cvs.openbsd.org>2010-02-25 17:40:47 +0000
committerClaudio Jeker <claudio@cvs.openbsd.org>2010-02-25 17:40:47 +0000
commit0881f489b26d9f34324c43f0def89c85248d36e5 (patch)
tree76439cd1885b13a539fe3b2c0f3e1fa3e389be2b /usr.sbin/ldpd/keepalive.c
parentecbcc1cc41bb11020536019149cfbf54bc080809 (diff)
Do not use bufferevent for something that's already covered in the imsg
buffer API. This fixes a few possible problems in session_read and does some further cleanup in various places. Wrap msgbuf into evbuf to add libevent functionality and use buf_read to handle the read side of a session. OK michele@ and dlg@ did not see anything evil
Diffstat (limited to 'usr.sbin/ldpd/keepalive.c')
-rw-r--r--usr.sbin/ldpd/keepalive.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/usr.sbin/ldpd/keepalive.c b/usr.sbin/ldpd/keepalive.c
index c816a030782..ccf3d997668 100644
--- a/usr.sbin/ldpd/keepalive.c
+++ b/usr.sbin/ldpd/keepalive.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: keepalive.c,v 1.4 2010/02/20 21:28:39 michele Exp $ */
+/* $OpenBSD: keepalive.c,v 1.5 2010/02/25 17:40:46 claudio Exp $ */
/*
* Copyright (c) 2009 Michele Marchetto <michele@openbsd.org>
@@ -57,8 +57,7 @@ send_keepalive(struct nbr *nbr)
gen_msg_tlv(buf, MSG_TYPE_KEEPALIVE, size);
- bufferevent_write(nbr->bev, buf->buf, buf->wpos);
- buf_free(buf);
+ evbuf_enqueue(&nbr->wbuf, buf);
}
int