All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mohammed Sadiq <sadiq@sadiqpk.org>
To: linux-bluetooth@vger.kernel.org
Cc: Mohammed Sadiq <sadiq@sadiqpk.org>
Subject: [PATCH BlueZ] obexd: Handle message read status change events
Date: Tue, 20 Oct 2026 09:26:17 +0530	[thread overview]
Message-ID: <20261020035617.1089331-1-sadiq@sadiqpk.org> (raw)

obexd is advertised to support Extended Event Report 1.1.  But it was
not handling "ReadStatusChanged" type which made those events being
mismarked as MAP_ET_NEW_MESSAGE.  This resulted in existing message to
be replaced by new message with only "Status" property set instead of
updating the "Status" of the existing message.
---
 obexd/client/map-event.h | 3 ++-
 obexd/client/map.c       | 3 +++
 obexd/client/mns.c       | 2 ++
 3 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/obexd/client/map-event.h b/obexd/client/map-event.h
index bb127b0f4..ab185eadf 100644
--- a/obexd/client/map-event.h
+++ b/obexd/client/map-event.h
@@ -19,7 +19,8 @@ enum map_event_type {
 	MAP_ET_MEMORY_FULL,
 	MAP_ET_MEMORY_AVAILABLE,
 	MAP_ET_MESSAGE_DELETED,
-	MAP_ET_MESSAGE_SHIFT
+	MAP_ET_MESSAGE_SHIFT,
+	MAP_ET_READ_STATUS_CHANGED
 };
 
 struct map_event {
diff --git a/obexd/client/map.c b/obexd/client/map.c
index 955db9315..487354252 100644
--- a/obexd/client/map.c
+++ b/obexd/client/map.c
@@ -2148,6 +2148,9 @@ static void map_handle_notification(struct map_event *event, void *user_data)
 	case MAP_ET_MESSAGE_SHIFT:
 		map_handle_folder_changed(map, event, event->folder);
 		break;
+	case MAP_ET_READ_STATUS_CHANGED:
+		map_handle_status_changed(map, event, "read-status-changed");
+		break;
 	case MAP_ET_MEMORY_FULL:
 	case MAP_ET_MEMORY_AVAILABLE:
 	default:
diff --git a/obexd/client/mns.c b/obexd/client/mns.c
index c7f86afdc..6408e48d3 100644
--- a/obexd/client/mns.c
+++ b/obexd/client/mns.c
@@ -168,6 +168,8 @@ static void parse_event_report_type(struct map_event *event, const char *value)
 		event->type = MAP_ET_MESSAGE_DELETED;
 	else if (!g_ascii_strcasecmp(value, "MessageShift"))
 		event->type = MAP_ET_MESSAGE_SHIFT;
+	else if (!g_ascii_strcasecmp(value, "ReadStatusChanged"))
+		event->type = MAP_ET_READ_STATUS_CHANGED;
 }
 
 static void parse_event_report_handle(struct map_event *event,
-- 
2.47.3


             reply	other threads:[~2026-10-20  3:57 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-20  3:56 Mohammed Sadiq [this message]
2026-10-20  8:27 ` [BlueZ] obexd: Handle message read status change events bluez.test.bot
2026-10-23 22:20 ` [PATCH BlueZ] " patchwork-bot+bluetooth

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261020035617.1089331-1-sadiq@sadiqpk.org \
    --to=sadiq@sadiqpk.org \
    --cc=linux-bluetooth@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.