[asterisk-commits] jpeeler: branch 1.6.1 r139399 - in /branches/1.6.1: ./ channels/chan_dahdi.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Thu Aug 21 18:44:18 CDT 2008
Author: jpeeler
Date: Thu Aug 21 18:44:18 2008
New Revision: 139399
URL: http://svn.digium.com/view/asterisk?view=rev&rev=139399
Log:
Merged revisions 139391 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk
................
r139391 | jpeeler | 2008-08-21 18:41:50 -0500 (Thu, 21 Aug 2008) | 11 lines
Merged revisions 139387 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r139387 | jpeeler | 2008-08-21 18:39:31 -0500 (Thu, 21 Aug 2008) | 3 lines
Fixes loop that could possibly never exit in the event of a channel never being able to be opened or specify after a restart.
(closes issue #11017)
........
................
Modified:
branches/1.6.1/ (props changed)
branches/1.6.1/channels/chan_dahdi.c
Propchange: branches/1.6.1/
------------------------------------------------------------------------------
Binary property 'trunk-merged' - no diff available.
Modified: branches/1.6.1/channels/chan_dahdi.c
URL: http://svn.digium.com/view/asterisk/branches/1.6.1/channels/chan_dahdi.c?view=diff&rev=139399&r1=139398&r2=139399
==============================================================================
--- branches/1.6.1/channels/chan_dahdi.c (original)
+++ branches/1.6.1/channels/chan_dahdi.c Thu Aug 21 18:44:18 2008
@@ -8334,12 +8334,14 @@
int chan_sig = conf->chan.sig;
if (!here) {
if ((channel != CHAN_PSEUDO) && !pri) {
+ int count = 0;
snprintf(fn, sizeof(fn), "%d", channel);
/* Open non-blocking */
tmp->subs[SUB_REAL].dfd = dahdi_open(fn);
- while (tmp->subs[SUB_REAL].dfd < 0 && reloading == 2) { /* the kernel may not call dahdi_release fast enough for the open flagbit to be cleared in time */
+ while (tmp->subs[SUB_REAL].dfd < 0 && reloading == 2 && count < 1000) { /* the kernel may not call dahdi_release fast enough for the open flagbit to be cleared in time */
usleep(1);
tmp->subs[SUB_REAL].dfd = dahdi_open(fn);
+ count++;
}
/* Allocate a DAHDI structure */
if (tmp->subs[SUB_REAL].dfd < 0) {
More information about the asterisk-commits
mailing list