mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-07-14 17:47:33 -05:00
Put an optional IdempotentCallback in bufchains.
The callback has the same semantics as for packet queues: it triggers automatically when data is added to a bufchain, not when it's removed.
This commit is contained in:
4
misc.c
4
misc.c
@ -707,6 +707,7 @@ void bufchain_init(bufchain *ch)
|
||||
{
|
||||
ch->head = ch->tail = NULL;
|
||||
ch->buffersize = 0;
|
||||
ch->ic = NULL;
|
||||
}
|
||||
|
||||
void bufchain_clear(bufchain *ch)
|
||||
@ -758,6 +759,9 @@ void bufchain_add(bufchain *ch, const void *data, int len)
|
||||
ch->tail = newbuf;
|
||||
}
|
||||
}
|
||||
|
||||
if (ch->ic)
|
||||
queue_idempotent_callback(ch->ic);
|
||||
}
|
||||
|
||||
void bufchain_consume(bufchain *ch, int len)
|
||||
|
Reference in New Issue
Block a user