]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Merged revisions 218224 via svnmerge from
authorMatthew Nicholson <mnicholson@digium.com>
Mon, 14 Sep 2009 15:17:50 +0000 (15:17 +0000)
committerMatthew Nicholson <mnicholson@digium.com>
Mon, 14 Sep 2009 15:17:50 +0000 (15:17 +0000)
https://origsvn.digium.com/svn/asterisk/trunk

................
  r218224 | mnicholson | 2009-09-14 09:57:23 -0500 (Mon, 14 Sep 2009) | 14 lines

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

  ........
    r218223 | mnicholson | 2009-09-14 09:53:57 -0500 (Mon, 14 Sep 2009) | 8 lines

    Ensure we don't pickup ourselves when doing pickup by exten.

    (closes issue #15100)
    Reported by: lmsteffan
    Patches:
          (modified) pickup.patch uploaded by lmsteffan (license 779)
  ........
................

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

apps/app_directed_pickup.c

index d59488aa01e6e0dc15783ae7b3cdaaaaf6f53e21..0f6eb0a9071834fce1bd4f6b0070b377a4f720c1 100644 (file)
@@ -146,7 +146,7 @@ static int pickup_by_exten(struct ast_channel *chan, const char *exten, const ch
        while ((target = ast_channel_walk_locked(target))) {
                if ((!strcasecmp(target->macroexten, exten) || !strcasecmp(target->exten, exten)) &&
                        !strcasecmp(target->dialcontext, context) &&
-                       can_pickup(target)) {
+                       (chan != target) && can_pickup(target)) {
                        res = pickup_do(chan, target);
                        ast_channel_unlock(target);
                        break;