From: Claudio Takahasi <cktakahasi@gmail.com>
To: bluez-devel@lists.sourceforge.net
Subject: Re: [Bluez-devel] [DBUS PATCH] more cleanup
Date: Thu, 3 Nov 2005 12:41:15 -0200 [thread overview]
Message-ID: <e1effdeb0511030641k5b2dc809r3c76a146e0c5259c@mail.gmail.com> (raw)
In-Reply-To: <1131026420.6634.26.camel@localhost.localdomain>
[-- Attachment #1: Type: text/plain, Size: 1477 bytes --]
Hi Marcel,
It's done!
Regards,
Claudio.
On 11/3/05, Marcel Holtmann <marcel@holtmann.org> wrote:
> Hi Claudio,
>
> > Here are some cleanups that I detected when I was reading the last modification.
> >
> > 1. Fallback
> > I changed the return message when the path is not registered.
> > Currently, the dbus-daemon returns the following message: 'Error
> > org.freedesktop.DBus.Error.UnknownMethod: Method "Inquiry" with
> > signature "yy" on interface "org.bluez.Device" doesn't exist'
> > Now it's returning "Unknow D-Bus path when a client sent a message to
> > invalid path(the path was unregistered or wrong).
> >
> > 2. msg unref
> > It's not necessary check if the message is NULL, this verification is
> > already done inside the dbus_message_unref.
> >
> > 3. up_adapters removed
> >
> > 4. Added some comments
> >
> > 5. device path checking
> > It's not necessary check if the message belongs to the device path
> > hierarchy because we split the msg_func(msg_func_device and
> > msg_func_manager)
>
> I applied the patch, but I don't like the BTADDR_LEN thingy. The size of
> BD_ADDR in string representation is always 18 and so do addr[18] inside
> the code. That's just fine. Please send me a patch that removes the
> BTADDR_LEN stuff and replaces it with 18.
>
> Regards
>
> Marcel
>
>
>
--
---------------------------------------------------------
Claudio Takahasi
Instituto Nokia de Tecnologia - INdT
[-- Attachment #2: cleanup_02.patch --]
[-- Type: text/x-patch, Size: 821 bytes --]
--- bluez-utils-cvs.orig/hcid/dbus.c 2005-11-03 11:33:57.000000000 -0200
+++ bluez-utils-cvs-hcid/hcid/dbus.c 2005-11-03 11:32:00.000000000 -0200
@@ -48,7 +48,6 @@
static int default_dev = -1;
#define TIMEOUT (30 * 1000) /* 30 seconds */
-#define BTADDR_LEN 18
#define MAX_PATH_LENGTH 64
#define MAX_CONN_NUMBER 10
@@ -1548,7 +1547,7 @@
DBusMessageIter iter;
DBusMessageIter array_iter;
DBusMessageIter struct_iter;
- char addr[BTADDR_LEN];
+ char addr[18];
const char array_sig[] = HCI_CONN_INFO_STRUCT_SIGNATURE;
const char *paddr = addr;
struct hci_dbus_data *dbus_data = data;
@@ -1816,7 +1815,7 @@
for (i = 0; i < dl->dev_num; i++, dr++) {
char apath[MAX_PATH_LENGTH];
- char aaddr[BTADDR_LEN];
+ char aaddr[18];
char *paddr = aaddr;
char *ppath = apath;
char *ptype;
next prev parent reply other threads:[~2005-11-03 14:41 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-11-03 13:32 [Bluez-devel] [DBUS PATCH] more cleanup Claudio Takahasi
2005-11-03 14:00 ` Marcel Holtmann
2005-11-03 14:41 ` Claudio Takahasi [this message]
2005-11-03 14:47 ` Marcel Holtmann
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=e1effdeb0511030641k5b2dc809r3c76a146e0c5259c@mail.gmail.com \
--to=cktakahasi@gmail.com \
--cc=bluez-devel@lists.sourceforge.net \
/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