On Tue, May 30, 2017 at 01:56:24PM +0200, Toke Høiland-Jørgensen wrote: > Ondrej Zajicek <santi...@crfreenet.org> writes: > > > On Tue, May 30, 2017 at 01:37:56PM +0200, Toke Høiland-Jørgensen wrote: > >> > Also channel_is_active() is called but channel may not even exist? > >> > >> Ah, proto_configure_channel can leave the channel var entirely unset? > > > > Yes, it could add/remove/reconfigure the channel, based on whether there > > is or is not the configuration and the old channel. > > > >> was assuming it was just leaving it in place but inactive. Can I just > >> check for NULL, then? > > > > Yes, that should be enough, as all channels goes up together with the > > protocol and channel cannot be deconfigured when up (protocol will be > > restarted in that case). > > Right, so a new channel can appear on reconfigure, but existing ones > cannot go away?
See proto_configure_channel() code. It could remove channel only if the channel is already in CS_DOWN. Note that this is still more-or-less scaffolding code. We plan to have channel reconfiguration less dependent on protocol state in the future. -- Elen sila lumenn' omentielvo Ondrej 'Santiago' Zajicek (email: santi...@crfreenet.org) OpenPGP encrypted e-mails preferred (KeyID 0x11DEADC3, wwwkeys.pgp.net) "To err is human -- to blame it on a computer is even more so."