Send connman mailing list submissions to
        [email protected]

To subscribe or unsubscribe via the World Wide Web, visit
        https://lists.01.org/mailman/listinfo/connman
or, via email, send a message with subject or body 'help' to
        [email protected]

You can reach the person managing the list at
        [email protected]

When replying, please edit your Subject line so it is more specific
than "Re: Contents of connman digest..."


Today's Topics:

   1. [PATCH] [connman] gdbus: Drop message replies if the sender
      requested no reply (Philip Withnall)
   2. [PATCH] [pacrunner] gdbus: Drop message replies if the sender
      requested no reply (Philip Withnall)


----------------------------------------------------------------------

Message: 1
Date: Wed, 02 Dec 2015 15:42:28 +0000
From: Philip Withnall <[email protected]>
To: [email protected]
Subject: [PATCH] [connman] gdbus: Drop message replies if the sender
        requested no reply
Message-ID: <[email protected]>
Content-Type: text/plain; charset="utf-8"

If the sender flags a D-Bus message as not expecting a reply, it is
against system bus policy to send a reply ? sending one will result in
errors being sent to us by dbus-daemon.

Magically drop all replies to messages which request no reply.

This is not a complete fix. In an ideal world, the existing check for
G_DBUS_METHOD_FLAG_NOREPLY would be dropped, as the server should be
prepared to return a reply to every method, if the client requests and
expects one ? otherwise the client will time out. However, that?s a
much
bigger change with a much bigger risk of breaking things, so I?ll stick
with this for now.

Signed-off-by: Philip Withnall <[email protected]>
Reviewed-by: Simon McVittie <[email protected]>
---
?gdbus/object.c | 3 ++-
?1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/gdbus/object.c b/gdbus/object.c
index 96db516..146a255 100644
--- a/gdbus/object.c
+++ b/gdbus/object.c
@@ -258,7 +258,8 @@ static DBusHandlerResult
process_message(DBusConnection *connection,
?
?       reply = method->function(connection, message,
iface_user_data);
?
-       if (method->flags & G_DBUS_METHOD_FLAG_NOREPLY) {
+       if (method->flags & G_DBUS_METHOD_FLAG_NOREPLY ||
+       ????dbus_message_get_no_reply(message)) {
?               if (reply != NULL)
?                       dbus_message_unref(reply);
?               return DBUS_HANDLER_RESULT_HANDLED;
-- 
2.5.0
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 213 bytes
Desc: This is a digitally signed message part
URL: 
<http://lists.01.org/pipermail/connman/attachments/20151202/353f07f6/attachment-0001.asc>

------------------------------

Message: 2
Date: Wed, 02 Dec 2015 15:42:51 +0000
From: Philip Withnall <[email protected]>
To: [email protected]
Subject: [PATCH] [pacrunner] gdbus: Drop message replies if the sender
        requested no reply
Message-ID: <[email protected]>
Content-Type: text/plain; charset="utf-8"

If the sender flags a D-Bus message as not expecting a reply, it is
against system bus policy to send a reply ? sending one will result in
errors being sent to us by dbus-daemon.

Magically drop all replies to messages which request no reply.

This is not a complete fix. In an ideal world, the existing check for
G_DBUS_METHOD_FLAG_NOREPLY would be dropped, as the server should be
prepared to return a reply to every method, if the client requests and
expects one ? otherwise the client will time out. However, that?s a
much
bigger change with a much bigger risk of breaking things, so I?ll stick
with this for now.

Signed-off-by: Philip Withnall <[email protected]>
Reviewed-by: Simon McVittie <[email protected]>
---
?gdbus/object.c | 3 ++-
?1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/gdbus/object.c b/gdbus/object.c
index 96db516..146a255 100644
--- a/gdbus/object.c
+++ b/gdbus/object.c
@@ -258,7 +258,8 @@ static DBusHandlerResult
process_message(DBusConnection *connection,
?
?       reply = method->function(connection, message,
iface_user_data);
?
-       if (method->flags & G_DBUS_METHOD_FLAG_NOREPLY) {
+       if (method->flags & G_DBUS_METHOD_FLAG_NOREPLY ||
+       ????dbus_message_get_no_reply(message)) {
?               if (reply != NULL)
?                       dbus_message_unref(reply);
?               return DBUS_HANDLER_RESULT_HANDLED;
-- 
2.5.0
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 213 bytes
Desc: This is a digitally signed message part
URL: 
<http://lists.01.org/pipermail/connman/attachments/20151202/1b1ed931/attachment-0001.asc>

------------------------------

Subject: Digest Footer

_______________________________________________
connman mailing list
[email protected]
https://lists.01.org/mailman/listinfo/connman


------------------------------

End of connman Digest, Vol 2, Issue 4
*************************************

Reply via email to