From: Marcel Holtmann <marcel@holtmann.org>
To: ofono@ofono.org
Subject: Re: [PATCH] modem: do not allow more than one client to lock down
Date: Wed, 26 Jan 2011 09:54:36 +0100 [thread overview]
Message-ID: <1296032076.1520.76.camel@aeonflux> (raw)
In-Reply-To: <1296027237-2532-1-git-send-email-remi.denis-courmont@nokia.com>
[-- Attachment #1: Type: text/plain, Size: 929 bytes --]
Hi Remi,
> src/modem.c | 13 ++++++-------
> 1 files changed, 6 insertions(+), 7 deletions(-)
patch has been applied.
However I added some paranoia protection for lock_owner reset to NULL. I
know that in theory it is protected via lockdown == TRUE, but that is an
issue bound to break something eventually.
> @@ -847,12 +850,8 @@ static DBusMessage *set_property_lockdown(struct ofono_modem *modem,
> OFONO_MODEM_INTERFACE,
> "Powered", DBUS_TYPE_BOOLEAN,
> &powered);
> - } else {
> - if (g_strcmp0(caller, modem->lock_owner))
> - return __ofono_error_access_denied(msg);
> -
> + } else
> lockdown_remove(modem);
> - }
>
> done:
> g_dbus_send_reply(conn, msg, DBUS_TYPE_INVALID);
And since this becomes a one line statement now and we already have a
goto label there, I changed this a bit around and removed the
unnecessary indentation.
Regards
Marcel
prev parent reply other threads:[~2011-01-26 8:54 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-26 7:33 [PATCH] modem: do not allow more than one client to lock down =?unknown-8bit?q?R=C3=A9mi?= Denis-Courmont
2011-01-26 8:54 ` Marcel Holtmann [this message]
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=1296032076.1520.76.camel@aeonflux \
--to=marcel@holtmann.org \
--cc=ofono@ofono.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox