From c3be7e6b4f8beb2c7d3f58504ffe37a0f51166d3 Mon Sep 17 00:00:00 2001 From: Mikkel Krautz Date: Mon, 11 Apr 2011 18:35:15 +0200 Subject: [PATCH] More complete ChannelState transfer on connect. --- client.go | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/client.go b/client.go index 34b25da..71af537 100644 --- a/client.go +++ b/client.go @@ -541,6 +541,18 @@ func (client *Client) sendChannelTree(channel *Channel) { } } + if channel.Temporary { + chanstate.Temporary = proto.Bool(true) + } + + chanstate.Position = proto.Int32(int32(channel.Position)) + + links := []uint32{} + for cid, _ := range channel.Links { + links = append(links, uint32(cid)) + } + chanstate.Links = links + err := client.sendProtoMessage(MessageChannelState, chanstate) if err != nil { client.Panic(err.String())