Return-Path: From: "Gix, Brian" To: "linux-bluetooth@vger.kernel.org" , "Stotland, Inga" Subject: Re: [PATCH BlueZ v2] mesh: Add start up management command chain Date: Thu, 6 Sep 2018 20:29:37 +0000 Message-ID: <1536265776.15697.0.camel@intel.com> References: <20180905002034.9984-1-inga.stotland@intel.com> In-Reply-To: <20180905002034.9984-1-inga.stotland@intel.com> Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Sender: linux-bluetooth-owner@vger.kernel.org List-ID: SGkgSW5nYSwNCg0KVGhpcyBwYXRjaCB3YXMgYXBwbGllZC4NCg0KT24gVHVlLCAyMDE4LTA5LTA0 IGF0IDE3OjIwIC0wNzAwLCBJbmdhIFN0b3RsYW5kIHdyb3RlOg0KPiBUaGlzIGFsbG93cyBjby1l eGlzdGVuc2Ugb2YgbWVzaGQgYW5kIGJsdWV0b290aGQuIG1lc2hkIHdpbGwNCj4gYXV0b21hdGlj YWxseSB0YWtlIGNvbnRyb2wgb2YgdGhlIGZpcnN0IGF2YWlsYWJsZSBMRS1jYXBhYmxlDQo+IGNv bnRyb2xsZXIgdGhhdCBpcyBwb3dlcmVkIGRvd24uDQo+IC0tLQ0KPiAgTWFrZWZpbGUubWVzaCB8 ICAgNCArLQ0KPiAgbWVzaC9idG1lc2guYyB8ICAgNSArLQ0KPiAgbWVzaC9tYWluLmMgICB8ICAy MiArKy0tLQ0KPiAgbWVzaC9tZXNoLmMgICB8IDI1MyArKysrKysrKysrKysrKysrKysrKysrKysr KysrKysrKysrKysrKysrKysrKystLS0tLQ0KPiAgbWVzaC9tZXNoLmggICB8ICAgNCArLQ0KPiAg bWVzaC9uZXQuYyAgICB8ICA0OSArKysrKy0tLS0tDQo+ICA2IGZpbGVzIGNoYW5nZWQsIDI2OSBp bnNlcnRpb25zKCspLCA2OCBkZWxldGlvbnMoLSkNCj4gDQo+IGRpZmYgLS1naXQgYS9NYWtlZmls ZS5tZXNoIGIvTWFrZWZpbGUubWVzaA0KPiBpbmRleCA2NDNiMWE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