From 17bc5220c332fdd083fd47fc600010f85171adc7 Mon Sep 17 00:00:00 2001 From: Guus Sliepen Date: Wed, 27 Feb 2002 22:37:55 +0000 Subject: [PATCH] Fix send_request() bug. --- src/protocol.c | 6 +++--- src/protocol_key.c | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/protocol.c b/src/protocol.c index af8029d0..9b30a8a6 100644 --- a/src/protocol.c +++ b/src/protocol.c @@ -17,7 +17,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - $Id: protocol.c,v 1.28.4.122 2002/02/10 21:57:54 guus Exp $ + $Id: protocol.c,v 1.28.4.123 2002/02/27 22:37:54 guus Exp $ */ #include "config.h" @@ -67,17 +67,17 @@ cp va_start(args, format); len = vsnprintf(buffer, MAXBUFSIZE, format, args); - request = va_arg(args, int); va_end(args); if(len < 0 || len > MAXBUFSIZE-1) { - syslog(LOG_ERR, _("Output buffer overflow while sending %s to %s (%s)"), request_name[request], c->name, c->hostname); + syslog(LOG_ERR, _("Output buffer overflow while sending request to %s (%s)"), request_name[request], c->name, c->hostname); return -1; } if(debug_lvl >= DEBUG_PROTOCOL) { + sscanf(buffer, "%d", &request); if(debug_lvl >= DEBUG_META) syslog(LOG_DEBUG, _("Sending %s to %s (%s): %s"), request_name[request], c->name, c->hostname, buffer); else diff --git a/src/protocol_key.c b/src/protocol_key.c index aec78899..b85de5ed 100644 --- a/src/protocol_key.c +++ b/src/protocol_key.c @@ -17,7 +17,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - $Id: protocol_key.c,v 1.1.4.3 2002/02/20 19:25:09 guus Exp $ + $Id: protocol_key.c,v 1.1.4.4 2002/02/27 22:37:55 guus Exp $ */ #include "config.h" @@ -208,7 +208,7 @@ cp if(to != myself) { - return send_request(to->nexthop->connection, c->buffer); + return send_request(to->nexthop->connection, "%s", c->buffer); } /* Update our copy of the origin's packet key */ -- 2.20.1