summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorReyk Floeter <reyk@cvs.openbsd.org>2008-01-03 15:32:49 +0000
committerReyk Floeter <reyk@cvs.openbsd.org>2008-01-03 15:32:49 +0000
commitfbf7ee21cee4b38af371d4210a0eacd1382fd8de (patch)
treed6bcd0d0a2714994454ece3094b332a92cd1c86d
parent112cf7cff5686997d200548006928fb798d1b4bd (diff)
send the correct length
-rw-r--r--usr.sbin/snmpd/snmpe.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.sbin/snmpd/snmpe.c b/usr.sbin/snmpd/snmpe.c
index 12048db654d..8a6627f733c 100644
--- a/usr.sbin/snmpd/snmpe.c
+++ b/usr.sbin/snmpd/snmpe.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: snmpe.c,v 1.7 2008/01/03 15:03:47 reyk Exp $ */
+/* $OpenBSD: snmpe.c,v 1.8 2008/01/03 15:32:48 reyk Exp $ */
/*
* Copyright (c) 2007 Reyk Floeter <reyk@vantronix.net>
@@ -790,8 +790,8 @@ snmpe_recvmsg(int fd, short sig, void *arg)
snmpe_debug_elements(resp);
#endif
- ber_write_elements(&ber, resp);
- if ((len = ber_get_writebuf(&ber, (void *)&ptr)) == -1)
+ len = ber_write_elements(&ber, resp);
+ if (ber_get_writebuf(&ber, (void *)&ptr) == -1)
goto done;
len = sendto(fd, ptr, len, 0, (struct sockaddr *)&ss, slen);