packets: remember callbacks for acks on queued packets.

Not used yet.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2016-03-30 16:57:41 +10:30
parent 57689390fb
commit b7a7234717
3 changed files with 15 additions and 6 deletions

View File

@@ -72,7 +72,9 @@ static void queue_raw_pkt(struct peer *peer, Pkt *pkt)
{
size_t n = tal_count(peer->outpkt);
tal_resize(&peer->outpkt, n+1);
peer->outpkt[n] = pkt;
peer->outpkt[n].pkt = pkt;
peer->outpkt[n].ack_cb = NULL;
peer->outpkt[n].ack_arg = NULL;
/* In case it was waiting for output. */
io_wake(peer);