sms: don't try the generic SMS method if we got a timeout error
This commit is contained in:
@@ -1014,6 +1014,12 @@ send_from_storage_ready (MMBaseModem *modem,
|
|||||||
|
|
||||||
response = mm_base_modem_at_command_finish (MM_BASE_MODEM (modem), res, &error);
|
response = mm_base_modem_at_command_finish (MM_BASE_MODEM (modem), res, &error);
|
||||||
if (error) {
|
if (error) {
|
||||||
|
if (g_error_matches (error, MM_SERIAL_ERROR, MM_SERIAL_ERROR_RESPONSE_TIMEOUT)) {
|
||||||
|
g_simple_async_result_take_error (ctx->result, error);
|
||||||
|
sms_send_context_complete_and_free (ctx);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
mm_dbg ("Couldn't send SMS from storage: '%s'; trying generic send...",
|
mm_dbg ("Couldn't send SMS from storage: '%s'; trying generic send...",
|
||||||
error->message);
|
error->message);
|
||||||
g_error_free (error);
|
g_error_free (error);
|
||||||
|
Reference in New Issue
Block a user