struct ofono_ussd *ussd;
int err;
- if (ss_is_busy(modem)) {
- ADD_ERROR_RESULT(rsp->result, STK_RESULT_TYPE_TERMINAL_BUSY,
- busy_on_ss_result);
- return TRUE;
- }
-
atom = __ofono_modem_find_atom(modem, OFONO_ATOM_TYPE_USSD);
if (atom == NULL || !__ofono_atom_get_registered(atom)) {
rsp->result.type = STK_RESULT_TYPE_NOT_CAPABLE;
return TRUE;
}
+ if (ss_is_busy(modem)) {
+ ADD_ERROR_RESULT(rsp->result, STK_RESULT_TYPE_TERMINAL_BUSY,
+ busy_on_ss_result);
+ return TRUE;
+ }
+
err = __ofono_ussd_initiate(ussd, cmd->send_ussd.ussd_string.dcs,
cmd->send_ussd.ussd_string.string,
cmd->send_ussd.ussd_string.len,