Linux bluetooth development
 help / color / mirror / Atom feed
* [PATCH BlueZ] obexd: Improve handling unsupported MAP events
@ 2026-10-24 11:57 Mohammed Sadiq
  2026-10-24 14:16 ` [BlueZ] " bluez.test.bot
  2026-10-26 21:40 ` [PATCH BlueZ] " patchwork-bot+bluetooth
  0 siblings, 2 replies; 3+ messages in thread
From: Mohammed Sadiq @ 2026-10-24 11:57 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Mohammed Sadiq

As per the spec, unsupported events should be ignored. But since bluez
used to notify all unsupported events over DBus, removing support for
those will break DBus API and clients that may be depending on them.

But all unsupported events are being notified by replacing the
original message object, as all map event types defaults to
MAP_ET_NEW_MESSAGE if unsupported - As the event struct is allocated
with g_new0().

So change the first member in event enum to MAP_ET_UNSUPPORTED so that
it'll be the default on allocation and notify over DBus on unsupported
events.
---
 obexd/client/map-event.h | 1 +
 obexd/client/map.c       | 3 +++
 2 files changed, 4 insertions(+)

diff --git a/obexd/client/map-event.h b/obexd/client/map-event.h
index ab185eadf..740c08be2 100644
--- a/obexd/client/map-event.h
+++ b/obexd/client/map-event.h
@@ -11,6 +11,7 @@
 struct obc_session;
 
 enum map_event_type {
+	MAP_ET_UNSUPPORTED,
 	MAP_ET_NEW_MESSAGE,
 	MAP_ET_DELIVERY_SUCCESS,
 	MAP_ET_SENDING_SUCCESS,
diff --git a/obexd/client/map.c b/obexd/client/map.c
index 487354252..6702aa333 100644
--- a/obexd/client/map.c
+++ b/obexd/client/map.c
@@ -2126,6 +2126,9 @@ static void map_handle_notification(struct map_event *event, void *user_data)
 		event->msg_type);
 
 	switch (event->type) {
+	case MAP_ET_UNSUPPORTED:
+		map_handle_status_changed(map, event, "notification");
+		break;
 	case MAP_ET_NEW_MESSAGE:
 		map_handle_new_message(map, event);
 		map_handle_status_changed(map, event, "notification");
-- 
2.47.3


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

end of thread, other threads:[~2026-10-26 21:40 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-24 11:57 [PATCH BlueZ] obexd: Improve handling unsupported MAP events Mohammed Sadiq
2026-10-24 14:16 ` [BlueZ] " bluez.test.bot
2026-10-26 21:40 ` [PATCH BlueZ] " patchwork-bot+bluetooth

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