Linux bluetooth development
 help / color / mirror / Atom feed
* [PATCH BlueZ] obexd/map: Populate new messages with event data
@ 2026-11-26  9:54 Mohammed Sadiq
  2026-11-26 15:11 ` [BlueZ] " bluez.test.bot
  0 siblings, 1 reply; 2+ messages in thread
From: Mohammed Sadiq @ 2026-11-26  9:54 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Mohammed Sadiq

notifications for new messages shall contain various details which are
already being parsed by mns.c, but are ignored when creating the message
object.

Fill new messages with those details from the notification event received,
if available.
---
 obexd/client/map.c | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/obexd/client/map.c b/obexd/client/map.c
index 6702aa333..e9dc198e2 100644
--- a/obexd/client/map.c
+++ b/obexd/client/map.c
@@ -2069,7 +2069,16 @@ static void map_handle_new_message(struct map_data *map,
 	if (msg)
 		g_hash_table_remove(map->messages, &event->handle);
 
-	map_msg_create(map, event->handle, event->folder, event->msg_type);
+	msg = map_msg_create(map, event->handle, event->folder,
+							event->msg_type);
+
+	if (msg) {
+		parse_datetime(msg, event->datetime);
+		parse_subject(msg, event->subject);
+		parse_sender(msg, event->sender_name);
+		if (event->priority)
+			parse_priority(msg, event->priority);
+	}
 }
 
 static void map_handle_status_changed(struct map_data *map,
-- 
2.47.3


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-11-26 15:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-26  9:54 [PATCH BlueZ] obexd/map: Populate new messages with event data Mohammed Sadiq
2026-11-26 15:11 ` [BlueZ] " bluez.test.bot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox