[svn-commits] mnicholson: trunk r859 - /trunk/channels/chan_mobile.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Wed Apr 8 15:28:18 CDT 2009


Author: mnicholson
Date: Wed Apr  8 15:28:14 2009
New Revision: 859

URL: http://svn.digium.com/svn-view/asterisk-addons?view=rev&rev=859
Log:
added support for handling "+CMS ERROR" response code

Modified:
    trunk/channels/chan_mobile.c

Modified: trunk/channels/chan_mobile.c
URL: http://svn.digium.com/svn-view/asterisk-addons/trunk/channels/chan_mobile.c?view=diff&rev=859&r1=858&r2=859
==============================================================================
--- trunk/channels/chan_mobile.c (original)
+++ trunk/channels/chan_mobile.c Wed Apr  8 15:28:14 2009
@@ -405,6 +405,7 @@
 	AT_CMTI,
 	AT_CMGR,
 	AT_SMS_PROMPT,
+	AT_CMS_ERROR,
 	/* at commands */
 	AT_A,
 	AT_D,
@@ -1834,6 +1835,8 @@
 		return AT_VGM;
 	} else if (at_match_prefix(buf, "+VGS:")) {
 		return AT_VGS;
+	} else if (at_match_prefix(buf, "+CMS ERROR:")) {
+		return AT_CMS_ERROR;
 	} else if (at_match_prefix(buf, "AT+VGM=")) {
 		return AT_VGM;
 	} else if (at_match_prefix(buf, "AT+VGS=")) {
@@ -1880,6 +1883,8 @@
 		return "AT+CMGR";
 	case AT_SMS_PROMPT:
 		return "SMS PROMPT";
+	case AT_CMS_ERROR:
+		return "+CMS ERROR";
 	/* at commands */
 	case AT_A:
 		return "ATA";
@@ -3034,6 +3039,7 @@
 	if ((entry = msg_queue_head(pvt))
 			&& (entry->expected == AT_OK
 			|| entry->expected == AT_ERROR
+			|| entry->expected == AT_CMS_ERROR
 			|| entry->expected == AT_SMS_PROMPT)) {
 		switch (entry->response_to) {
 
@@ -3437,6 +3443,7 @@
 			}
 			ast_mutex_unlock(&pvt->lock);
 			break;
+		case AT_CMS_ERROR:
 		case AT_ERROR:
 			ast_mutex_lock(&pvt->lock);
 			if (handle_response_error(pvt, buf)) {




More information about the svn-commits mailing list