linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johan Hedberg <johan.hedberg@gmail.com>
To: Bastien Nocera <hadess@hadess.net>
Cc: linux-bluetooth@vger.kernel.org
Subject: Re: [PATCH] Get IEEE1284 for a single printer
Date: Tue, 8 Jun 2010 15:09:36 +0800	[thread overview]
Message-ID: <20100608070935.GA22068@jh-x301> (raw)
In-Reply-To: <1275849744.7994.38.camel@localhost.localdomain>

Hi Bastien,

On Sun, Jun 06, 2010, Bastien Nocera wrote:
> Let me know what you think.

Sounds ok'ish to me, but how exactly would udev-configure-printer be
called? If it's directly executed (as opposed to e.g. using D-Bus) then
privilege and environment inheritance needs to be considered (i.e. is it
fine that it gets run with the same privileges and environment as
bluetoothd itself).

> The patch below could still be useful for debugging (in the worst
> case).

I have nothing against pushing the patch upstream as long as its coding
style issues are fixed:

> +	message = dbus_message_new_method_call("org.bluez", "/",
> +					       "org.bluez.Manager",
> +					       "DefaultAdapter");

Mixed tabs and spaces for indentation.

> +	adapter_reply = dbus_connection_send_with_reply_and_block(conn,
> +								  message, -1, NULL);

Same.

> +	if (dbus_message_get_args(adapter_reply, NULL, DBUS_TYPE_OBJECT_PATH, &adapter, DBUS_TYPE_INVALID) == FALSE)

Longer line than 79 characters.

> +	message = dbus_message_new_method_call("org.bluez", adapter,
> +					       "org.bluez.Adapter",
> +					       "FindDevice");

Mixed tabs and spaces.

> +		message = dbus_message_new_method_call("org.bluez", adapter,
> +						       "org.bluez.Adapter",
> +						       "CreateDevice");

Mixed tabs and spaces.

> +		dbus_message_iter_init_append(message, &iter);
> +		dbus_message_iter_append_basic(&iter, DBUS_TYPE_STRING, &bdaddr);

Longer line than 79 characters.

> +		reply = dbus_connection_send_with_reply_and_block(conn,
> +								  message, -1, NULL);

Mixed tabs and spaces as well as overlong line.

> +		if (!reply)
> +			return FALSE;
> +	}
> +	if (dbus_message_get_args(reply, NULL, DBUS_TYPE_OBJECT_PATH, &object_path,

Missing empty line after } as well as too long line.

> +				  DBUS_TYPE_INVALID) == FALSE) {

Mixed tabs and spaces.

> +			fprintf(stderr, "Invalid Bluetooth address '%s'\n", argv[2]);

Too long line.

Johan

  reply	other threads:[~2010-06-08  7:09 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-06 18:42 [PATCH] Get IEEE1284 for a single printer Bastien Nocera
2010-06-08  7:09 ` Johan Hedberg [this message]
2010-06-08  9:21   ` Bastien Nocera
2010-06-08  9:26     ` Johan Hedberg
2010-09-01 14:35       ` Bastien Nocera
2010-09-01 18:49         ` Johan Hedberg
2010-09-02 10:07           ` Bastien Nocera

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=20100608070935.GA22068@jh-x301 \
    --to=johan.hedberg@gmail.com \
    --cc=hadess@hadess.net \
    --cc=linux-bluetooth@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).