~mil/sxmo-devel

This thread contains a patchset. You're looking at the original emails, but you may wish to use the patch review UI. Review patch
2 2

[PATCH sxmo-utils] sxmo_modem.sh: Retry if failed to delete sms

Details
Message ID
<20230603031435.813-1-anjan@momi.ca>
DKIM signature
missing
Download raw message
Patch: +5 -1
On sdm845 devices, I would get the same text multiple times. Even
though, the person sending the text only sent it once.

I ran the sxmo modemmonitor daemon manually and got the following
log:

```
dbus-monitor: unable to enable new-style monitoring: org.freedesktop.DBus.Error.AccessDenied: "Rejected send message, 1 matched rules; type="method_call", sender=":1.13225" (uid=10000 pid=24991 comm="dbus-monitor --system interface='org.freedesktop.M") interface="org.freedesktop.DBus.Monitoring" member="BecomeMonitor" error name="(unset)" requested_reply="0" destination="org.freedesktop.DBus" (bus)". Falling back to eavesdropping.
dbus-monitor: unable to enable new-style monitoring: org.freedesktop.DBus.Error.AccessDenied: "Rejected send message, 1 matched rules; type="method_call", sender=":1.13227" (uid=10000 pid=24994 comm="dbus-monitor --system interface='org.freedesktop.M") interface="org.freedesktop.DBus.Monitoring" member="BecomeMonitor" error name="(unset)" requested_reply="0" destination="org.freedesktop.DBus" (bus)". Falling back to eavesdropping.
dbus-monitor: unable to enable new-style monitoring: org.freedesktop.DBus.Error.AccessDenied: "Rejected send message, 1 matched rules; type="method_call", sender=":1.13226" (uid=10000 pid=24999 comm="dbus-monitor --system interface='org.freedesktop.D") interface="org.freedesktop.DBus.Monitoring" member="BecomeMonitor" error name="(unset)" requested_reply="0" destination="org.freedesktop.DBus" (bus)". Falling back to eavesdropping.
Failed to open connection to session bus: Failed to connect to socket /tmp/dbus-QIILCAmZIu: No such file or directory
dbus-monitor: unable to enable new-style monitoring: org.freedesktop.DBus.Error.AccessDenied: "Rejected send message, 1 matched rules; type="method_call", sender=":1.13228" (uid=10000 pid=25007 comm="dbus-monitor --system interface='org.freedesktop.M") interface="org.freedesktop.DBus.Monitoring" member="BecomeMonitor" error name="(unset)" requested_reply="0" destination="org.freedesktop.DBus" (bus)". Falling back to eavesdropping.
error: couldn't delete SMS: 'GDBus.Error:org.freedesktop.ModemManager1.Error.Core.Failed: Couldn't delete 1 parts from this SMS'
/home/user/.config/sxmo/hooks/sxmo_hook_sms.sh: line 20: go-sendxmpp: not found
successfully deleted SMS from modem
/home/user/.config/sxmo/hooks/sxmo_hook_sms.sh: line 20: go-sendxmpp: not found
```

The important line is:

```
error: couldn't delete SMS: 'GDBus.Error:org.freedesktop.ModemManager1.Error.Core.Failed: Couldn't delete 1 parts from this SMS'
```

After applying this patch, I only recieve texts once. I dont know why deleting
text command fails the first time. Moreover, this patch fixes the double
text issue on sdm845 devices.
---
 scripts/modem/sxmo_modem.sh | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/scripts/modem/sxmo_modem.sh b/scripts/modem/sxmo_modem.sh
index d5939d4..f7c09a2 100755
--- a/scripts/modem/sxmo_modem.sh
+++ b/scripts/modem/sxmo_modem.sh
@@ -242,7 +242,11 @@ checkfornewtexts() {
		stderr "Text from number: $NUM (TEXTID: $TEXTID)"
		sxmo_hook_smslog.sh "recv" "$NUM" "$NUM" "$TIME" "$TEXT" >> "$SXMO_LOGDIR/$NUM/sms.txt"
		printf %b "$TIME\trecv_txt\t$NUM\t${#TEXT} chars\n" >> "$SXMO_LOGDIR/modemlog.tsv"
		mmcli -m any --messaging-delete-sms="$TEXTID"
		while mmcli -m any --messaging-delete-sms="$TEXTID"; [[ $? -ne 0 ]];
		do
			echo "Failed to delete text $TEXTID. Will retry"
			sleep 3
		done
		CONTACTNAME=$(sxmo_contacts.sh --name-or-number "$NUM")

		if [ -z "$SXMO_DISABLE_SMS_NOTIFS" ]; then
-- 
2.40.1

[sxmo-utils/patches/test.yml] build failed

builds.sr.ht <builds@sr.ht>
Details
Message ID
<CT2OSSPWLK5E.3TTGKQUXJ6K2R@cirno2>
In-Reply-To
<20230603031435.813-1-anjan@momi.ca> (view parent)
DKIM signature
missing
Download raw message
sxmo-utils/patches/test.yml: FAILED in 40s

[sxmo_modem.sh: Retry if failed to delete sms][0] from [Anjandev Momi][1]

[0]: https://lists.sr.ht/~mil/sxmo-devel/patches/41605
[1]: anjan@momi.ca

✗ #1000604 FAILED sxmo-utils/patches/test.yml https://builds.sr.ht/~mil/job/1000604
Details
Message ID
<CT2UTOE2JG4A.HL52L8PCT4FK@yellow-orcess>
In-Reply-To
<20230603031435.813-1-anjan@momi.ca> (view parent)
DKIM signature
missing
Download raw message
Marked as superseded !
Reply to thread Export thread (mbox)