Merge "res_pjsip_session.c: Extract sip_session_defer_termination_stop_timer()."
authorMatt Jordan <mjordan@digium.com>
Fri, 17 Jul 2015 01:33:24 +0000 (20:33 -0500)
committerGerrit Code Review <gerrit2@gerrit.digium.api>
Fri, 17 Jul 2015 01:33:24 +0000 (20:33 -0500)
res/parking/parking_applications.c

index 5077474..7ce8a32 100644 (file)
@@ -349,8 +349,12 @@ static int setup_park_common_datastore(struct ast_channel *parkee, const char *p
        attended_transfer = pbx_builtin_getvar_helper(parkee, "ATTENDEDTRANSFER");
        blind_transfer = pbx_builtin_getvar_helper(parkee, "BLINDTRANSFER");
 
-       if (attended_transfer || blind_transfer) {
-               parker_dial_string = ast_strdupa(S_OR(attended_transfer, blind_transfer));
+       if (!ast_strlen_zero(attended_transfer)) {
+               parker_dial_string = ast_strdupa(attended_transfer);
+       } else if (!ast_strlen_zero(blind_transfer)) {
+               parker_dial_string = ast_strdupa(blind_transfer);
+               /* Ensure that attended_transfer is NULL and not an empty string. */
+               attended_transfer = NULL;
        }
 
        ast_channel_unlock(parkee);