From 0fb56449d624bb1b809cc2fdc3b9870c3bb88f37 Mon Sep 17 00:00:00 2001 From: Archie Cobbs Date: Thu, 25 Oct 2001 04:02:25 +0000 Subject: [PATCH] Fix bugs in NgSendMsg() and NgSendAsciiMsg() where the wrong token value could be returned when the debug level was non-zero. Submitted by: Harti Brandt MFC after: 5 days --- lib/libnetgraph/msg.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/libnetgraph/msg.c b/lib/libnetgraph/msg.c index 8246d4226fda..2c2565f2ee4f 100644 --- a/lib/libnetgraph/msg.c +++ b/lib/libnetgraph/msg.c @@ -81,7 +81,7 @@ NgSendMsg(int cs, const char *path, /* Deliver message */ if (NgDeliverMsg(cs, path, &msg, args, arglen) < 0) return (-1); - return (gMsgId); + return (msg.header.token); } /* @@ -146,7 +146,7 @@ NgSendAsciiMsg(int cs, const char *path, const char *fmt, ...) if (NgDeliverMsg(cs, path, binary, binary->data, binary->header.arglen) < 0) return (-1); - return (gMsgId); + return (binary->header.token); } /*