The following reply was made to PR user/6509; it has been noted by GNATS.
From: Reyk Floeter <[email protected]>
To: Reyk Floeter <[email protected]>
Cc: Stuart Henderson <[email protected]>, [email protected],
Jonathan Gray <[email protected]>
Subject: Re: user/6509: relayctl show sessions make relayd crash
Date: Thu, 19 May 2011 14:30:42 +0200
On Thu, May 19, 2011 at 01:59:36PM +0200, Reyk Floeter wrote:
> + if (c->waiting == 0) {
> + log_debug("%s: unexpected imsg", __func__);
> + return (-1);
Actually it shouldn't even fail here and just ignore the error. Our
Id is the fd of the control connection and it might happen that it
gets reused for a new control connection.
if (c->waiting == 0) {
log_debug("%s: no pending control requests", __func__);
return (0);
> + } else if (--c->waiting == 0) {
> + /* Last ack for a previous request */
> + imsg_compose_event(&c->iev, IMSG_CTL_END,
> + 0, 0, -1, NULL, 0);
> + }