mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-04 11:58:52 +00:00
Fix regression with distinctive ring detection.
The issue here is that passing an array to a function prohibits the ARRAY_LEN macro from returning the real size. To avoid this the size is now defined and use of ARRAY_LEN is avoided. (closes issue #15718) Reported by: alecdavis Patches: bug15718.patch uploaded by jpeeler (license 325) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@277837 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -2281,7 +2281,7 @@ static void *__analog_ss_thread(void *data)
|
||||
int timeout = 10000; /* Ten seconds */
|
||||
struct timeval start = ast_tvnow();
|
||||
enum analog_event ev;
|
||||
int curRingData[3] = { 0 };
|
||||
int curRingData[RING_PATTERNS] = { 0 };
|
||||
int receivedRingT = 0;
|
||||
|
||||
namebuf[0] = 0;
|
||||
@@ -2315,7 +2315,7 @@ static void *__analog_ss_thread(void *data)
|
||||
}
|
||||
/* Increment the ringT counter so we can match it against
|
||||
values in chan_dahdi.conf for distinctive ring */
|
||||
if (++receivedRingT == ARRAY_LEN(curRingData)) {
|
||||
if (++receivedRingT == RING_PATTERNS) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user