diff options
Diffstat (limited to 'drivers/atmodem/atutil.c')
-rw-r--r-- | drivers/atmodem/atutil.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/atmodem/atutil.c b/drivers/atmodem/atutil.c index 5dad679b..e668602e 100644 --- a/drivers/atmodem/atutil.c +++ b/drivers/atmodem/atutil.c @@ -40,6 +40,12 @@ void decode_at_error(struct ofono_error *error, const char *final) if (!strcmp(final, "OK")) { error->type = OFONO_ERROR_TYPE_NO_ERROR; error->error = 0; + } else if (g_str_has_prefix(final, "+CMS ERROR:")) { + error->type = OFONO_ERROR_TYPE_CMS; + error->error = strtol(&final[11], NULL, 0); + } else if (g_str_has_prefix(final, "+CME ERROR:")) { + error->type = OFONO_ERROR_TYPE_CME; + error->error = strtol(&final[11], NULL, 0); } else { error->type = OFONO_ERROR_TYPE_FAILURE; error->error = 0; |