fix asterisk setting of pritimers from chan_dahdi.conf
authorAlec L Davis <sivad.a@paradise.net.nz>
Tue, 2 Mar 2010 06:56:14 +0000 (06:56 +0000)
committerAlec L Davis <sivad.a@paradise.net.nz>
Tue, 2 Mar 2010 06:56:14 +0000 (06:56 +0000)
regression since sig_pri split.

(issue #16909)
Reported by: alecdavis
Patches:
      pritimer.asterisk.diff.txt uploaded by alecdavis (license 585)
Tested by: alecdavis

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@249759 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_dahdi.c

index 9be24e4..cd1dbcf 100644 (file)
@@ -418,9 +418,6 @@ static int mwilevel = 512;
 static int dtmfcid_level = 256;
 
 #ifdef HAVE_PRI
-#ifdef PRI_GETSET_TIMERS
-static int pritimers[PRI_MAX_TIMERS];
-#endif
 static int pridebugfd = -1;
 static char pridebugfilename[1024] = "";
 #endif
@@ -11386,6 +11383,10 @@ static struct dahdi_pvt *mkintf(int channel, const struct dahdi_chan_conf *conf,
                                                ast_copy_string(pris[span].pri.unknownprefix, conf->pri.pri.unknownprefix, sizeof(pris[span].pri.unknownprefix));
                                                pris[span].pri.resetinterval = conf->pri.pri.resetinterval;
 
+                                               for (x = 0; x < PRI_MAX_TIMERS; x++) {
+                                                       pris[span].pri.pritimers[x] = conf->pri.pri.pritimers[x];
+                                               }
+
                                                if (si.spanno != span + 1) { /* in another trunkgroup */
                                                        tmp->prioffset = pris[span].pri.numchans;
                                                } else {
@@ -16399,7 +16400,7 @@ static int process_dahdi(struct dahdi_chan_conf *confp, const char *cat, struct
                                                        "'%s' is not a valid value for ISDN timer '%s' at line %d.\n",
                                                        c, timerc, v->lineno);
                                        } else {
-                                               pritimers[timeridx] = timer;
+                                               confp->pri.pri.pritimers[timeridx] = timer;
                                        }
                                } else {
                                        ast_log(LOG_WARNING,