mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-09 11:28:25 +00:00
Improve handling of trying to ACK too many timer expirations.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@198183 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -357,9 +357,21 @@ static int check_timer(struct pthread_timer *timer)
|
|||||||
static void read_pipe(struct pthread_timer *timer, unsigned int quantity)
|
static void read_pipe(struct pthread_timer *timer, unsigned int quantity)
|
||||||
{
|
{
|
||||||
int rd_fd = timer->pipe[PIPE_READ];
|
int rd_fd = timer->pipe[PIPE_READ];
|
||||||
|
int pending_ticks = timer->pending_ticks;
|
||||||
|
|
||||||
ast_assert(quantity);
|
ast_assert(quantity);
|
||||||
ast_assert(quantity >= timer->pending_ticks);
|
|
||||||
|
if (timer->continuous && pending_ticks) {
|
||||||
|
pending_ticks--;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (quantity > pending_ticks) {
|
||||||
|
quantity = pending_ticks;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!quantity) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
do {
|
do {
|
||||||
unsigned char buf[1024];
|
unsigned char buf[1024];
|
||||||
|
|||||||
Reference in New Issue
Block a user