Open Source Telephony
 help / color / mirror / Atom feed
* [PATCH 5/6] atutil: Parse CMS and CME error codes.
@ 2010-08-05 17:31 Andrzej Zaborowski
  2010-08-05 17:31 ` [PATCH 6/6] calypso: Create STK atom and reorder initialisation Andrzej Zaborowski
  2010-08-06 17:20 ` [PATCH 5/6] atutil: Parse CMS and CME error codes Denis Kenzior
  0 siblings, 2 replies; 8+ messages in thread
From: Andrzej Zaborowski @ 2010-08-05 17:31 UTC (permalink / raw)
  To: ofono

[-- Attachment #1: Type: text/plain, Size: 873 bytes --]

From: root <root@neo.(none)>

---
 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 5dad679..e668602 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;
-- 
1.7.1.86.g0e460.dirty


^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2010-08-09  9:03 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-08-05 17:31 [PATCH 5/6] atutil: Parse CMS and CME error codes Andrzej Zaborowski
2010-08-05 17:31 ` [PATCH 6/6] calypso: Create STK atom and reorder initialisation Andrzej Zaborowski
2010-08-06  8:25   ` Support of call hold for a single call Kouassu, AlainX
2010-08-06  8:29     ` Li, Zhigang
2010-08-06 14:56     ` Ofono limit the max length for a phone number to 20 digit Kouassu, AlainX
2010-08-06 15:46       ` Denis Kenzior
2010-08-09  9:03         ` Kouassu, AlainX
2010-08-06 17:20 ` [PATCH 5/6] atutil: Parse CMS and CME error codes Denis Kenzior

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox