]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: fct peer_prepare_ackmsg should not use trash.
authorEmeric Brun <ebrun@haproxy.com>
Tue, 22 Sep 2015 13:50:18 +0000 (15:50 +0200)
committerWilly Tarreau <w@1wt.eu>
Tue, 22 Sep 2015 14:07:34 +0000 (16:07 +0200)
function 'peer_prepare_ackmsg' is designed to use the argument 'msg'
instead of 'trash.str'.

There is currently no bug because the caller passes 'trash.str' in
the 'msg' argument.

src/peers.c

index be701a8631fff83a821bb52e5c3a15a800840457..1e661159e925c61ee81d2fa33b8791f8f5f96ebe 100644 (file)
@@ -417,7 +417,7 @@ static int peer_prepare_ackmsg(struct shared_table *st, char *msg, size_t size)
        char *cursor, *datamsg;
        uint32_t netinteger;
 
-       cursor = datamsg = trash.str + 2 + 5;
+       cursor = datamsg = msg + 2 + 5;
 
        intencode(st->remote_id, &cursor);
        netinteger = htonl(st->last_get);