summaryrefslogtreecommitdiff
path: root/main
diff options
context:
space:
mode:
authorJeff Peeler <jpeeler@digium.com>2010-01-06 19:05:06 +0000
committerJeff Peeler <jpeeler@digium.com>2010-01-06 19:05:06 +0000
commit0a4f80cbcf71f9ef90af627d4c66262bab9a8a53 (patch)
tree88e3598c669cf750abd3b35f89b573db3907da37 /main
parentb70bc21627e2fc77df6e975c132a103e38b95adf (diff)
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/trunk@238134 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'main')
-rw-r--r--main/features.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/main/features.c b/main/features.c
index 85d36991e..261ba4670 100644
--- a/main/features.c
+++ b/main/features.c
@@ -4975,9 +4975,7 @@ static int bridge_exec(struct ast_channel *chan, const char *data)
ast_app_parse_options(bridge_exec_options, &opts, opt_args, 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);
ast_manager_event(chan, EVENT_FLAG_CALL, "BridgeExec",
"Response: Failed\r\n"