[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: smsd problem with AT model - Part II
From: |
Pawel Kot |
Subject: |
Re: smsd problem with AT model - Part II |
Date: |
Thu, 5 Oct 2006 22:14:27 +0200 |
Hi,
Please see the following patch (hope gmail doesn't mangle it).
Index: common/phones/atgen.c
===================================================================
RCS file: /cvsroot/gnokii/gnokii/common/phones/atgen.c,v
retrieving revision 1.128
diff -u -r1.128 atgen.c
--- common/phones/atgen.c 3 Oct 2006 21:55:21 -0000 1.128
+++ common/phones/atgen.c 5 Oct 2006 20:13:15 -0000
@@ -552,7 +552,6 @@
{
at_driver_instance *drvinst = AT_DRVINST(state);
gn_data data;
- gn_sms_status sms_status;
char req[32];
gn_error ret = GN_ERR_NONE;
@@ -560,17 +559,10 @@
if (mt >= NR_MEMORIES)
return GN_ERR_INVALIDMEMORYTYPE;
gn_data_clear(&data);
- data.sms_status = &sms_status;
- ret = AT_GetSMSStatus(&data, state);
- if (ret != GN_ERR_NONE)
- return ret;
-
- sprintf(req, "AT+CPMS=\"%s\",\"%s\",\"%s\"\r",
memorynames[mt], memorynames[mt],
- memorynames[data.sms_status->new_message_store]);
+ sprintf(req, "AT+CPMS=\"%s\"\r", memorynames[mt]);
ret = sm_message_send(23, GN_OP_Init, req, state);
- if (ret != GN_ERR_NONE)
- return GN_ERR_NOTREADY;
- ret = sm_block_no_retry(GN_OP_Init, &data, state);
+ if (ret == GN_ERR_NONE)
+ ret = sm_block_no_retry(GN_OP_Init, &data, state);
if (ret == GN_ERR_NONE)
drvinst->smsmemorytype = mt;
}
@@ -1458,8 +1450,6 @@
{
at_line_buffer buf;
gn_error error;
- char store[3] = "XX";
- int i;
if ((error = at_error_get(buffer, state)) != GN_ERR_NONE) return error;
@@ -1467,22 +1457,13 @@
buf.length = length;
splitlines(&buf);
- if (sscanf(buf.line2, "+CPMS:
\"%*c%*c\",%d,%*d,\"%*c%*c\",%*d,%*d,\"%c%c\",%*d,%*d",
- &data->sms_status->number, &store[0], &store[1]) != 3)
+ if (sscanf(buf.line2, "+CPMS: \"%*c%*c\",%d,%*d",
&data->sms_status->number) != 1)
return GN_ERR_FAILED;
data->sms_status->unread = 0;
data->sms_status->changed = 0;
data->sms_status->folders_count = 0;
- data->sms_status->new_message_store = GN_MT_ME;
- for (i = 0; i < NR_MEMORIES; i++) {
- if (strcmp(store, memorynames[i]) == 0) {
- data->sms_status->new_message_store = i;
- break;
- }
- }
-
return GN_ERR_NONE;
}
take care,
pkot
--
Pawel Kot
- smsd problem with AT model - Part II, Romain Parmantier - Mobile Devices, 2006/10/05
- RE: smsd problem with AT model - Part II, Romain Parmantier - Mobile Devices, 2006/10/05
- Re: smsd problem with AT model - Part II, Daniele Forsi, 2006/10/05
- Re: smsd problem with AT model - Part II, Pawel Kot, 2006/10/05
- Re: smsd problem with AT model - Part II,
Pawel Kot <=
- RE: smsd problem with AT model - Part II, Romain Parmantier - Mobile Devices, 2006/10/06
- Re: smsd problem with AT model - Part II, Pawel Kot, 2006/10/06
- RE: smsd problem with AT model - Part II, Romain Parmantier - Mobile Devices, 2006/10/09
- Re: smsd problem with AT model - Part II, Pawel Kot, 2006/10/09
- Re: smsd problem with AT model - Part II, Daniele Forsi, 2006/10/06
- Re: smsd problem with AT model - Part II, Pawel Kot, 2006/10/06