Nest: fix bug in previous patches related to channel reconfiguration
The patch d506263d... blocked adding channel during reconfiguration, that broke protocols which use the same functiona also during init. This patch fixes that.
This commit is contained in:
parent
cb311b441a
commit
cfa6ff9569
1 changed files with 7 additions and 3 deletions
10
nest/proto.c
10
nest/proto.c
|
@ -663,9 +663,13 @@ proto_configure_channel(struct proto *p, struct channel **pc, struct channel_con
|
||||||
{
|
{
|
||||||
/* We could add the channel, but currently it would just stay in down state
|
/* We could add the channel, but currently it would just stay in down state
|
||||||
until protocol is restarted, so it is better to force restart anyways. */
|
until protocol is restarted, so it is better to force restart anyways. */
|
||||||
log(L_INFO "Cannot add channel %s.%s", p->name, cf->name);
|
if (p->proto_state != PS_DOWN)
|
||||||
return 0;
|
{
|
||||||
// *pc = proto_add_channel(p, cf);
|
log(L_INFO "Cannot add channel %s.%s", p->name, cf->name);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
*pc = proto_add_channel(p, cf);
|
||||||
}
|
}
|
||||||
else if (c && !cf)
|
else if (c && !cf)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue