From: Marcel Holtmann <marcel@holtmann.org>
To: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
Cc: linux-bluetooth@vger.kernel.org
Subject: Re: [PATCH BlueZ 4/6] gdbus: Call check_signals when sending signals with g_dbus_send_message
Date: Sun, 23 Dec 2012 08:10:10 -0800 [thread overview]
Message-ID: <1356279010.29264.25.camel@aeonflux> (raw)
In-Reply-To: <1356276298-13795-4-git-send-email-luiz.dentz@gmail.com>
Hi Luiz,
> If message passed to g_dbus_send_message is a signal verify if it is a
> valid and there really exists an interface with respective signal name.
> ---
> gdbus/object.c | 9 +++++++++
> 1 file changed, 9 insertions(+)
>
> diff --git a/gdbus/object.c b/gdbus/object.c
> index 510763a..6951171 100644
> --- a/gdbus/object.c
> +++ b/gdbus/object.c
> @@ -1475,6 +1475,15 @@ gboolean g_dbus_send_message(DBusConnection *connection, DBusMessage *message)
>
> if (dbus_message_get_type(message) == DBUS_MESSAGE_TYPE_METHOD_CALL)
> dbus_message_set_no_reply(message, TRUE);
> + else {
> + const char *path = dbus_message_get_path(message);
> + const char *interface = dbus_message_get_interface(message);
> + const char *name = dbus_message_get_member(message);
> + const GDBusArgInfo *args;
> +
> + if (!check_signal(connection, path, interface, name, &args))
> + return FALSE;
> + }
we have more than just method calls and signals. This could be also used
used for sending async method returns.
>
> result = dbus_connection_send(connection, message, NULL);
>
Regards
Marcel
next prev parent reply other threads:[~2012-12-23 16:10 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-23 15:24 [PATCH BlueZ 1/6] gdbus: Introduce G_DBUS_METHOD_FLAG_EXPERIMENTAL Luiz Augusto von Dentz
2012-12-23 15:24 ` [PATCH BlueZ 2/6] media: Enable RegisterPlayer and UnregisterPlayer methods as experimental Luiz Augusto von Dentz
2012-12-23 15:24 ` [PATCH BlueZ 3/6] gdbus: Introduce GDBusInterfaceFlags Luiz Augusto von Dentz
2012-12-23 16:09 ` Marcel Holtmann
2012-12-23 16:27 ` Luiz Augusto von Dentz
2012-12-23 16:30 ` Marcel Holtmann
2012-12-23 15:24 ` [PATCH BlueZ 4/6] gdbus: Call check_signals when sending signals with g_dbus_send_message Luiz Augusto von Dentz
2012-12-23 16:10 ` Marcel Holtmann [this message]
2012-12-23 16:31 ` Luiz Augusto von Dentz
2012-12-23 16:40 ` Marcel Holtmann
2012-12-23 15:24 ` [PATCH BlueZ 5/6] player: Enable MediaPlayer1 interface as experimental Luiz Augusto von Dentz
2012-12-23 15:24 ` [PATCH BlueZ 6/6] AVRCP: Fix not checking for media_player_controller_create Luiz Augusto von Dentz
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=1356279010.29264.25.camel@aeonflux \
--to=marcel@holtmann.org \
--cc=linux-bluetooth@vger.kernel.org \
--cc=luiz.dentz@gmail.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox