]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Merged revisions 272447 via svnmerge from
authorRichard Mudgett <rmudgett@digium.com>
Thu, 24 Jun 2010 22:19:36 +0000 (22:19 +0000)
committerRichard Mudgett <rmudgett@digium.com>
Thu, 24 Jun 2010 22:19:36 +0000 (22:19 +0000)
https://origsvn.digium.com/svn/asterisk/trunk

................
  r272447 | rmudgett | 2010-06-24 17:11:26 -0500 (Thu, 24 Jun 2010) | 17 lines

  Merged revisions 272446 via svnmerge from
  https://origsvn.digium.com/svn/asterisk/branches/1.4

  ........
    r272446 | rmudgett | 2010-06-24 16:58:49 -0500 (Thu, 24 Jun 2010) | 10 lines

    ss_thread calls pri_grab without lock during overlap dial

    Recent changes to chan_dahdi with relation to overlap dialing call
    pri_grab without first obtaining a lock.

    (closes issue #17414)
    Reported by: pdf
    Patches:
          bug17414.patch uploaded by jpeeler (license 325)
  ........
................

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

channels/chan_dahdi.c

index d642fac12635d2fbe9dd00acefd90fee73c994e8..f788ed8d2519593dc561518931b23a7b208e80ac 100644 (file)
@@ -7839,6 +7839,7 @@ static void *ss_thread(void *data)
                                ast_dsp_digitreset(p->dsp);
                        }
                        if (p->pri->overlapdial & DAHDI_OVERLAPDIAL_INCOMING) {
+                               ast_mutex_lock(&p->lock);
                                if (p->pri->pri) {              
                                        if (!pri_grab(p, p->pri)) {
                                                pri_proceeding(p->pri->pri, p->call, PVT_TO_CHANNEL(p), 0);
@@ -7848,6 +7849,7 @@ static void *ss_thread(void *data)
                                                ast_log(LOG_WARNING, "Unable to grab PRI on span %d\n", p->span);
                                        }
                                }
+                               ast_mutex_unlock(&p->lock);
                        }
                        dahdi_enable_ec(p);
                        ast_setstate(chan, AST_STATE_RING);