RE: To enablue DID in coming bluez release

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Updated:
--- a/main.c	Tue Dec 16 17:43:24 2008 +0800
+++ b/main.c	Wed Dec 17 11:57:47 2008 +0800
@@ -174,6 +174,17 @@ static void parse_config(GKeyFile *confi
 		main_opts.inqmode = val;
 	}
 
+	str = g_key_file_get_string(config, "General",
+					"DeviceID", &err);
+	if (err) {
+		debug("%s", err->message);
+		g_clear_error(&err);
+	} else {
+		debug("deviceid=%s", str);
+		strncpy(main_opts.deviceid, str, sizeof(main_opts.deviceid));
+		g_free(str);
+	}
+
 	main_opts.link_mode = HCI_LM_ACCEPT;
 
 	main_opts.link_policy = HCI_LP_RSWITCH | HCI_LP_SNIFF |
diff -r 65556502911d main.conf
--- a/main.conf	Tue Dec 16 17:43:24 2008 +0800
+++ b/main.conf	Tue Dec 17 11:57:51 2008 +0800
@@ -28,3 +28,9 @@ OffMode = NoScan
 # Discover scheduler interval used in Adapter.DiscoverDevices
 # The value is in seconds. Defaults is 0 to use controller scheduler
 DiscoverSchedulerInterval = 0
+
+
+# User verndor and product and version information are used in DID profile
+# ":" to identify the value. FFFF is reserved for VendorId by default.
+DeviceID = 1234:5678:abcd
+

-----Original Message-----
From: linux-bluetooth-owner@xxxxxxxxxxxxxxx [mailto:linux-bluetooth-owner@xxxxxxxxxxxxxxx] On Behalf Of Marcel Holtmann
Sent: 2008年12月17日 10:38
To: Johan Hedberg
Cc: linux-bluetooth@xxxxxxxxxxxxxxx
Subject: Re: To enablue DID in coming bluez release

Hi Johan,

> Couple of comments:
> 
> On Tue, Dec 16, 2008, Li, Zhigang wrote:
> >  		main_opts.inqmode = val;
> >  	}
> > +	str = g_key_file_get_string(config, "General",
> 
> Coding style: add empty line after the closing bracket.
> 
> > +					"VID/PID/VER", &err);
> 
> Did you agree with this "VID/PID/VER" name with Marcel? I'd have used
> something like "DeviceID", "DeviceIDInfo" or "DIDInfo".

I think "DeviceID" sounds reasonable. Lets use that one.

Regards

Marcel


--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html
?韬{.n?????%??檩??w?{.n???{饼?z????n?■???h?璀?{?夸z罐?+€?zf"?????i?????_璁?:+v??撸?


[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux