From 511d94399b9a1e576e023fb9daebd1113a6ba6e8 Mon Sep 17 00:00:00 2001 From: Jeff Peeler Date: Wed, 6 Jan 2010 19:07:03 +0000 Subject: [PATCH] Merged revisions 238134 via svnmerge from https://origsvn.digium.com/svn/asterisk/trunk ........ r238134 | jpeeler | 2010-01-06 13:05:06 -0600 (Wed, 06 Jan 2010) | 10 lines Fix channel name comparison for bridge application. The channel name comparison was not comparing the whole string and therefore if one channel name was a substring of the other, the bridge would fail. (closes issue #16528) Reported by: telecos82 Patches: res_features_r236843.diff uploaded by telecos82 (license 687) ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.0@238135 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- main/features.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/main/features.c b/main/features.c index 58ee55c1e1..283c1805f8 100644 --- a/main/features.c +++ b/main/features.c @@ -3954,9 +3954,7 @@ static int bridge_exec(struct ast_channel *chan, void *data) ast_app_parse_options(bridge_exec_options, &opts, NULL, args.options); /* avoid bridge with ourselves */ - if (!strncmp(chan->name, args.dest_chan, - strlen(chan->name) < strlen(args.dest_chan) ? - strlen(chan->name) : strlen(args.dest_chan))) { + if (!strcmp(chan->name, args.dest_chan)) { ast_log(LOG_WARNING, "Unable to bridge channel %s with itself\n", chan->name); manager_event(EVENT_FLAG_CALL, "BridgeExec", "Response: Failed\r\n" -- 2.47.2