struct telephony_call *t_call = t_call_list->data;
+ if (t_call == NULL) {
+ ERR("t_call is NULL");
+ break;
+ }
+
if (t_call->call_status == HFP_CALL_STATUS_ACTIVE) {
if (t_active_call == NULL)
t_active_call = t_call;
}
}
- if (t_held_call_count == 1)
+ if (t_held_call != NULL && t_held_call_count == 1)
t_held_call->call_conference = FALSE;
- if (t_active_call_count == 1)
+ if (t_active_call != NULL && t_active_call_count == 1)
t_active_call->call_conference = FALSE;
}
__bt_hfp_modify_indicator("call",
INDICATOR_EVENT_CALL_INACTIVE);
- if (org_status == HFP_CALL_STATUS_HOLD) {
+ if (org_status == HFP_CALL_STATUS_HOLD)
__bt_hfp_modify_indicator("callheld", INDICATOR_EVENT_CALLHELD_NONE);
- }
if ((org_status == HFP_CALL_STATUS_MO_ALERTING) ||
(org_status == HFP_CALL_STATUS_COMING) ||
} else if ((t_alert = __bt_hfp_get_call_with_status(
HFP_CALL_STATUS_CREATE))
!= NULL) {
- t_error = __bt_bt_hfp_reject_call(t_alert);
+ t_error = __bt_hfp_release_call(t_alert);
} else if ((t_alert = __bt_hfp_get_call_with_status(
HFP_CALL_STATUS_MO_ALERTING))
!= NULL) {
- t_error = __bt_bt_hfp_reject_call(t_alert);
+ t_error = __bt_hfp_release_call(t_alert);
} else if ((t_alert = __bt_hfp_get_call_with_status(
HFP_CALL_STATUS_COMING)) != NULL) {
t_error = __bt_bt_hfp_reject_call(t_alert);
if (ret == TRUE)
_bt_call_hold_response(t_device, HFP_STATE_MNGR_ERR_NONE);
- else {
+ else
_bt_call_hold_response(t_device, HFP_STATE_MNGR_ERR_AG_FAILURE);
- }
}
void _bt_hfp_key_press_request(const char *t_key_press, void *t_device)