Gobi 2000 doesn't provide the QMI_WMS_RESULT_MESSAGE_ID field. As a
result, delivery is resolved as failed and it tries to retransmit it
again and again. From user point of view, a message is sent but the
message is received 4 times.
ofonod[6370]: drivers/qmimodem/qmibridge.c:ask_qmi() READ: QMI QMUX:
QMI length = 19
QMI flags = 0x80
QMI service = "wms"
QMI client = 1
QMI QMI:
QMI flags = "response"
QMI transaction = 293
QMI tlv_length = 7
QMI message = "Raw Send" (0x0020)
QMI TLV:
QMI type = "Result" (0x02)
QMI length = 4
QMI value = 00:00:00:00
QMI translated = SUCCESS
The previous commit fixed the bug, however performing a linear-search
through the entire tx-queue is quite wasteful. The current usage
pattern is to always modify the entry at the tail of the queue, so
optimize.
Using the enum which has a value of zero (PENDING) by default created
some problems. Use a slightly modified version of the logic and consume
less storage to boot.
Refactor tx_finished() and create a function to remove an entry from the
tx queue. This function will be used also when a message is cancelled.
Thus, handle the case in which state is MESSAGE_STATE_CANCELLED as well.
Based on patch from Yang Gu <gyagp0@gmail.com>
If sending of SMS fails, then oFono core will try to resend it after
n * 5 seconds(n = retry count). Due to this, conformance test case
27.22.8 sequence 1.4 fails(refer 31.124 spec). Plan is to limit the
failue codes for which the retry will be done. This patch allows the
retry if the failure is only due to network timeout. For all the
other failure cases, retry is not done.
Allow use of SMS atom both in online and offline (post_sim) states.
SMS atom now watches network registration atom and state. Thmessages
are queued but not sent if not registered to a network. Errors
occurring when a short message is being sent while transition from
online to offline or when network coverage is dropped are now handled
gracefully.
This patch was generated by the following semantic patch
(http://coccinelle.lip6.fr/)
// <smpl>
@fix disable is_null,isnt_null1@
expression *E;
@@
- !E
+ E == NULL
// </smpl>