[Asterisk-code-review] parking: Fall back to parker channel name even if it matches parkee. (asterisk[16])

Kevin Harwell asteriskteam at digium.com
Wed Dec 4 17:34:50 CST 2019


Kevin Harwell has submitted this change. ( https://gerrit.asterisk.org/c/asterisk/+/13295 )

Change subject: parking: Fall back to parker channel name even if it matches parkee.
......................................................................

parking: Fall back to parker channel name even if it matches parkee.

ASTERISK-28631

Change-Id: Ia74d084799fbb9bee3403e30d2391aacd46243cc
---
M res/parking/parking_bridge.c
1 file changed, 9 insertions(+), 4 deletions(-)

Approvals:
  Benjamin Keith Ford: Looks good to me, but someone else must approve
  Kevin Harwell: Looks good to me, approved; Approved for Submit



diff --git a/res/parking/parking_bridge.c b/res/parking/parking_bridge.c
index 981ef81..4e56d58 100644
--- a/res/parking/parking_bridge.c
+++ b/res/parking/parking_bridge.c
@@ -274,10 +274,15 @@
 	blind_transfer = ast_strdupa(S_OR(blind_transfer, ""));
 	ast_channel_unlock(bridge_channel->chan);
 	if (!parker || !strcmp(parker->name, ast_channel_name(bridge_channel->chan))) {
-		/* Even if there is no BLINDTRANSFER dialplan variable then blind_transfer will
-		 * be an empty string.
-		 */
-		parker_channel_name = blind_transfer;
+		if (ast_strlen_zero(blind_transfer) && parker) {
+			/* If no BLINDTRANSFER exists but the parker does then use their channel name */
+			parker_channel_name = parker->name;
+		} else {
+			/* Even if there is no BLINDTRANSFER dialplan variable then blind_transfer will
+			 * be an empty string.
+			 */
+			parker_channel_name = blind_transfer;
+		}
 	} else {
 		parker_channel_name = parker->name;
 	}

-- 
To view, visit https://gerrit.asterisk.org/c/asterisk/+/13295
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: 16
Gerrit-Change-Id: Ia74d084799fbb9bee3403e30d2391aacd46243cc
Gerrit-Change-Number: 13295
Gerrit-PatchSet: 1
Gerrit-Owner: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Benjamin Keith Ford <bford at digium.com>
Gerrit-Reviewer: Friendly Automation
Gerrit-Reviewer: Kevin Harwell <kharwell at digium.com>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20191204/514ba6db/attachment-0001.html>


More information about the asterisk-code-review mailing list