aboutsummaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authormnicholson <mnicholson@f38db490-d61c-443f-a65b-d21fe96a405b>2009-09-14 14:53:57 +0000
committermnicholson <mnicholson@f38db490-d61c-443f-a65b-d21fe96a405b>2009-09-14 14:53:57 +0000
commit2210e74e334058eb8e54a006ba6a578906c3a185 (patch)
tree88b7a343f0c013e32f97861f8e5ac60c804241c9 /apps
parent5a82dd8a9322bf8790b38d0dca0a64db6fffb65b (diff)
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: http://svn.digium.com/svn/asterisk/branches/1.4@218223 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps')
-rw-r--r--apps/app_directed_pickup.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/apps/app_directed_pickup.c b/apps/app_directed_pickup.c
index 68d965244..d591ca180 100644
--- a/apps/app_directed_pickup.c
+++ b/apps/app_directed_pickup.c
@@ -98,7 +98,7 @@ static int pickup_by_exten(struct ast_channel *chan, char *exten, char *context)
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;