Return-Path: MIME-Version: 1.0 In-Reply-To: <1314013156-17328-1-git-send-email-bulislaw@linux.com> References: <1314013156-17328-1-git-send-email-bulislaw@linux.com> Date: Mon, 22 Aug 2011 13:50:13 +0200 Message-ID: Subject: Re: [PATCH BlueZ v2 1/3] Add SetRemoteProperties method for OOB COD setting From: Bartosz Szatkowski To: linux-bluetooth@vger.kernel.org Cc: Bartosz Szatkowski Content-Type: text/plain; charset=UTF-8 Sender: linux-bluetooth-owner@vger.kernel.org List-ID: T24gTW9uLCBBdWcgMjIsIDIwMTEgYXQgMTozOSBQTSwgQmFydG9zeiBTemF0a293c2tpIDxidWxp c2xhd0BsaW51eC5jb20+IHdyb3RlOgo+IEFkZCBtZXRob2QgZm9yIHN1cHBsaW5nIGNsYXNzIG9m IGRldmljZSB0aHJvdWdoIE9PQiBtZWNoYW5pc20sIHRvIGJlCj4gYXZhaWxhYmxlIGF0IHBhaXJp bmcgcGhhc2UuIEF0IHRoaXMgcG9pbnQgaXQgbWF5IGJlIHByZXNlbnRlZCB0byB0aGUKPiB1c2Vy LCBieSBhZ2VudCwgaW4gY29uZmlybWF0aW9uIHJlcXVlc3QgKG9yIHdoYXRldmVyKS4KPiAtLS0K PiDCoGRvYy9vb2ItYXBpLnR4dCDCoCB8IMKgIDEzICsrKysKPiDCoHBsdWdpbnMvZGJ1c29vYi5j IHwgwqAxNjQgKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysr KysrKysKPiDCoDIgZmlsZXMgY2hhbmdlZCwgMTc3IGluc2VydGlvbnMoKyksIDAgZGVsZXRpb25z KC0pCj4KPiBkaWZmIC0tZ2l0IGEvZG9jL29vYi1hcGkudHh0IGIvZG9jL29vYi1hcGkudHh0Cj4g aW5kZXggZDgzODcxMi4uMDMyNDc1OCAxMDA2NDQKPiAtLS0gYS9kb2Mvb29iLWFwaS50eHQKPiAr KysgYi9kb2Mvb29iLWFwaS50eHQKPiBAQCAtMzYsMyArMzYsMTYgQEAgT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