Skip to content
Snippets Groups Projects
Commit 98aa70cd authored by Naveen Albert's avatar Naveen Albert Committed by Asterisk Development Team
Browse files

chan_dahdi: Don't retry opening nonexistent channels on restart.

Commit 729cb1d3 added logic to retry
opening DAHDI channels on "dahdi restart" if they failed initially,
up to 1,000 times in a loop, to address cases where the channel was
still in use. However, this retry loop does not use the actual error,
which means chan_dahdi will also retry opening nonexistent channels
1,000 times per channel, causing a flood of unnecessary warning logs
for an operation that will never succeed, with tens or hundreds of
thousands of open attempts being made.

The original patch would have been more targeted if it only retried
on the specific relevant error (likely EBUSY, although it's hard to
say since the original issue is no longer available).

To avoid the problem above while avoiding the possibility of breakage,
this skips the retry logic if the error is ENXIO (No such device or
address), since this will never succeed.

Resolves: #669
(cherry picked from commit 4e244528b398e959efb0085b9a2be63c1ee4a304)
parent 855ed6c1
Branches
Tags
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment