[Asterisk-code-review] parking: Fix case where we can't get the parker. (asterisk[16])

George Joseph asteriskteam at digium.com
Tue Nov 19 09:23:47 CST 2019


George Joseph has submitted this change. ( https://gerrit.asterisk.org/c/asterisk/+/13208 )

Change subject: parking: Fix case where we can't get the parker.
......................................................................

parking: Fix case where we can't get the parker.

ASTERISK-28616

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

Approvals:
  Kevin Harwell: Looks good to me, but someone else must approve
  George Joseph: Looks good to me, approved; Approved for Submit



diff --git a/res/parking/parking_bridge.c b/res/parking/parking_bridge.c
index bfbe55f..981ef81 100644
--- a/res/parking/parking_bridge.c
+++ b/res/parking/parking_bridge.c
@@ -273,8 +273,10 @@
 	blind_transfer = pbx_builtin_getvar_helper(bridge_channel->chan, "BLINDTRANSFER");
 	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)))
-		&& !ast_strlen_zero(blind_transfer)) {
+	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;
 	} else {
 		parker_channel_name = parker->name;

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

Gerrit-Project: asterisk
Gerrit-Branch: 16
Gerrit-Change-Id: Iabe31ae38d01604284fcc5c2438d44e29a32ea4d
Gerrit-Change-Number: 13208
Gerrit-PatchSet: 1
Gerrit-Owner: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Friendly Automation
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
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/20191119/283b9cf9/attachment.html>


More information about the asterisk-code-review mailing list