atmodem: Add a few more debug statements for SMS support
authorMarcel Holtmann <marcel@holtmann.org>
Fri, 20 Aug 2010 19:53:21 +0000 (21:53 +0200)
committerMarcel Holtmann <marcel@holtmann.org>
Fri, 20 Aug 2010 19:53:21 +0000 (21:53 +0200)
drivers/atmodem/sms.c

index 7460d78..e680984 100644 (file)
@@ -365,6 +365,8 @@ static inline void at_ack_delivery(struct ofono_sms *sms)
        struct sms_data *data = ofono_sms_get_data(sms);
        char buf[256];
 
+       DBG("");
+
        /* We must acknowledge the PDU using CNMA */
        if (data->cnma_ack_pdu)
                snprintf(buf, sizeof(buf), "AT+CNMA=1,%d\r%s",
@@ -440,6 +442,8 @@ static void at_cmgr_notify(GAtResult *result, gpointer user_data)
        long pdu_len;
        int tpdu_len;
 
+       DBG("");
+
        g_at_result_iter_init(&iter, result);
 
        if (!g_at_result_iter_next(&iter, "+CMGR:"))
@@ -588,6 +592,8 @@ static void at_cmgl_done(struct ofono_sms *sms)
 {
        struct sms_data *data = ofono_sms_get_data(sms);
 
+       DBG("");
+
        if (data->incoming == AT_UTIL_SMS_STORE_MT &&
                        data->store == AT_UTIL_SMS_STORE_ME) {
                at_cmgl_set_cpms(sms, AT_UTIL_SMS_STORE_SM);
@@ -621,6 +627,8 @@ static void at_cmgl_notify(GAtResult *result, gpointer user_data)
        int status;
        char buf[16];
 
+       DBG("");
+
        g_at_result_iter_init(&iter, result);
 
        while (g_at_result_iter_next(&iter, "+CMGL:")) {
@@ -788,6 +796,8 @@ static gboolean build_cnmi_string(char *buf, int *cnmi_opts,
        const char *mode;
        int len = sprintf(buf, "AT+CNMI=");
 
+       DBG("");
+
        if (data->vendor == OFONO_VENDOR_QUALCOMM_MSM ||
                        data->vendor == OFONO_VENDOR_HUAWEI ||
                        data->vendor == OFONO_VENDOR_NOVATEL)
@@ -842,6 +852,8 @@ static void construct_ack_pdu(struct sms_data *d)
        int len;
        int tpdu_len;
 
+       DBG("");
+
        memset(&ackpdu, 0, sizeof(ackpdu));
 
        ackpdu.type = SMS_TYPE_DELIVER_REPORT_ACK;