r3792 - in trunk/src/target/OM-2007.2/applications/openmoko-dialer2: . src/phone-kit

chris at sita.openmoko.org chris at sita.openmoko.org
Wed Jan 9 11:43:35 CET 2008


Author: chris
Date: 2008-01-09 11:43:34 +0100 (Wed, 09 Jan 2008)
New Revision: 3792

Modified:
   trunk/src/target/OM-2007.2/applications/openmoko-dialer2/ChangeLog
   trunk/src/target/OM-2007.2/applications/openmoko-dialer2/src/phone-kit/moko-network.c
Log:
        * src/phone-kit/moko-network.c: (on_network_registered),
        (sms_msghandler):
        Add support for reading delivery status reports from the SIM card


Modified: trunk/src/target/OM-2007.2/applications/openmoko-dialer2/ChangeLog
===================================================================
--- trunk/src/target/OM-2007.2/applications/openmoko-dialer2/ChangeLog	2008-01-09 05:25:53 UTC (rev 3791)
+++ trunk/src/target/OM-2007.2/applications/openmoko-dialer2/ChangeLog	2008-01-09 10:43:34 UTC (rev 3792)
@@ -1,3 +1,9 @@
+2008-01-09  Chris Lord  <chris at openedhand.com>
+
+	* src/phone-kit/moko-network.c: (on_network_registered),
+	(sms_msghandler):
+	Add support for reading delivery status reports from the SIM card
+
 2008-01-07  Chris Lord  <chris at openedhand.com>
 
 	* src/phone-kit/moko-network.c: (stop_retrying),

Modified: trunk/src/target/OM-2007.2/applications/openmoko-dialer2/src/phone-kit/moko-network.c
===================================================================
--- trunk/src/target/OM-2007.2/applications/openmoko-dialer2/src/phone-kit/moko-network.c	2008-01-09 05:25:53 UTC (rev 3791)
+++ trunk/src/target/OM-2007.2/applications/openmoko-dialer2/src/phone-kit/moko-network.c	2008-01-09 10:43:34 UTC (rev 3792)
@@ -174,6 +174,9 @@
       break;
     case GSMD_NETREG_DENIED:
       /* This may be a pin issue*/
+
+      /* Stop trying to get details */
+      stop_retrying (MOKO_NETWORK (listener));
       break;
     case GSMD_NETREG_REG_HOME:
     case GSMD_NETREG_REG_ROAMING:
@@ -455,7 +458,8 @@
                                       sms);
       }
     } else {
-      g_warning ("Delivery status report not in-line, left unhandled");
+      g_debug ("Delivery status report stored on SIM, reading...");
+      lgsm_sms_read (lh, aux->u.sms.index);
     }
     break;
   case GSMD_EVT_IN_CLIP :
@@ -508,8 +512,19 @@
     struct gsmd_sms_list *sms_list = (struct gsmd_sms_list *)
                                      ((void *) gmh + sizeof(*gmh));
     for (l = priv->listeners; l; l = l->next) {
-      moko_listener_on_incoming_sms (MOKO_LISTENER (l->data), priv->handle,
-                                     sms_list);
+      switch (sms_list->payload.tp_mti) {
+        case GSMD_SMS_TP_MTI_DELIVER :
+        case GSMD_SMS_TP_MTI_SUBMIT :
+          moko_listener_on_incoming_sms (MOKO_LISTENER (l->data), priv->handle,
+                                         sms_list);
+          break;
+        case GSMD_SMS_TP_MTI_STATUS_REPORT :
+          moko_listener_on_incoming_ds (MOKO_LISTENER (l->data), priv->handle,
+                                        sms_list);
+          break;
+        default :
+          break;
+      }
     }
   } else {
     return -EINVAL;





More information about the commitlog mailing list