Return-Path: From: "Gu, Chao Jie" To: Arman Uguray CC: BlueZ development , Marcel Holtmann Subject: RE: [PATCH] ATT signed write command Date: Fri, 12 Sep 2014 07:43:55 +0000 Message-ID: <3D02B219753AD44CBDDDE484323B1774113086F7@SHSMSX104.ccr.corp.intel.com> References: <1410426586-9075-1-git-send-email-chao.jie.gu@intel.com> In-Reply-To: Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 List-ID: SGksIGFybWFuLA0KDQo+ID4gVGhpcyBwYXRjaCBmb3Igc2lnbmluZyBvdXRnb2luZywgY3NyayBh bmQgY3J5dG8gc3RvcmVkIGluIGJ0X2F0dC4NCj4gPiB0aGUgdmVyaWZ5aW5nIGluY29taW5nIEFU VCBQRFUgaW1wbGVtZW50YXRpb24gaW50cm9kdWNlIHRoZQ0KPiA+IHNoYXJlZC9nYXR0LXNlcnZl ciB3aGljaCBjb21iaW5lZCB3aXRoIHNoYXJlZC9nYXR0LWRiLmMsIHNvIG5lZWQgbW9yZQ0KPiA+ IGRpc2NjdXNzaW9uLg0KPiA+DQo+ID4gU2lnbmVkLW9mZi1ieTogR3UgQ2hhb2ppZSA8Y2hhby5q aWUuZ3VAaW50ZWwuY29tPg0KPiANCj4gSSBkb24ndCB0aGluayBpbmNsdWRlICJTaWduZWQtb2Zm LWJ5IiBpbiBjb21taXQgbWVzc2FnZXMgaW4gQmx1ZVouDQo+IA0KDQogSSB3aWxsIGZvbGxvdyBi bHVleiBydWxlcy4NCg0KPiA+ICsvKiBMZW4gb2Ygc2lnbmF0dXJlIGluIHdyaXRlIHNpZ25lZCBw YWNrZXQgKi8NCj4gPiArI2RlZmluZSBCVF9BVFRfU0lHTkFUVVJFX0xFTiAgICAgICAgICAgMTIN Cj4gDQo+IENhbiB5b3Ugc3BlbGwgb3V0ICJMZW5ndGggb2Ygc2lnbmF0dXJlIiBpbiB0aGUgY29t bWVudCBpbnN0ZWFkIG9mIGp1c3QgIkxlbiI/DQoNCk5vIHByb2JsZW0uDQoNCj4gD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0KPiA+ICsgICAgICAg ICAgICAgICBpZiAoIWJ0X2NyeXB0b19zaWduX2F0dChhdHQtPmNyeXB0bywNCj4gPiArICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYXR0LT5sb2NhbF9jc3JrLA0KPiA+ICsg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBvcC0+cGR1LA0KPiA+ICsgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxICsgbGVuZ3RoLA0KPiA+ICsgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhdHQtPmxvY2FsX3NpZ25fY250LA0K PiA+ICsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmKCh1aW50OF90ICop IG9wLT5wZHUpWzEgKw0KPiBsZW5ndGhdKSkNCj4gPiArICAgICAgICAgICAgICAgcmV0dXJuIGZh bHNlOw0KPiA+ICsgICAgICAgfQ0KPiANCj4gWW91IHNob3VsZG4ndCBoYXZlIHRvIGNoZWNrIGlm ICJhdHQiIGlzIE5VTEwuICJhdHQiIHNob3VsZCBhbHdheXMgYmUgcHJlc2VudCBpZiBzdHJ1Y3QN Cj4gYXR0X3NlbmRfb3AgaGFzIGEgZmllbGQgZm9yIGl0Lg0KDQpUaGlzIHByb2JsZW0gd291bGQg YmUgZml4ZWQgYnkgZXh0ZW5kaW5nIHN0cnVjdCBhdHRfc2VuZF9vcC4NCg0KPiBJIHdvdWxkIGFs c28gcmVtb3ZlIHRoZSBuZXN0ZWQgaWYgc3RhdGVtZW50IGFuZCBqdXN0IHJldHVybiB0aGUgcmV0 dXJuIHZhbHVlIG9mDQo+IGJ0X2NyeXB0b19zaWduX2F0dCBpbmxpbmUuDQo+IA0KPiBPdGhlciB0 aGFuIHRoYXQsIEkgZG9uJ3Qgc2VlIGhvdyB0aGUgQ1NSSyBpcyBiZWluZyBwcm92aWRlZCB0byB0 aGUgYnRfYXR0IHN0cnVjdHVyZS4NCj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