Return-Path: MIME-Version: 1.0 In-Reply-To: References: <1309816301-18377-1-git-send-email-bulislaw@linux.com> Date: Tue, 5 Jul 2011 11:00:44 +0200 Message-ID: Subject: Re: [PATCH obexd 1/5] Change EDS backend to support multiple ebooks From: Bartosz Szatkowski To: Luiz Augusto von Dentz Cc: linux-bluetooth@vger.kernel.org Content-Type: text/plain; charset=UTF-8 Sender: linux-bluetooth-owner@vger.kernel.org List-ID: T24gVHVlLCBKdWwgNSwgMjAxMSBhdCAxMDo0NSBBTSwgTHVpeiBBdWd1c3RvIHZvbiBEZW50ego8 bHVpei5kZW50ekBnbWFpbC5jb20+IHdyb3RlOgo+IEhpIEJhcnRvc3osCj4KPiBPbiBUdWUsIEp1 bCA1LCAyMDExIGF0IDEyOjUxIEFNLCBCYXJ0b3N6IFN6YXRrb3dza2kgPGJ1bGlzbGF3QGxpbnV4 LmNvbT4gd3JvdGU6Cj4+IFVudGlsIG5vdyBvbmx5IGRlZmF1bHQgZWJvb2sgd2FzIHVzZWQsIHRo aXMgcGF0Y2ggY2hhbmdlIHRoaXMgYmVoYXZpb3VyCj4+IHNvIGVhY2ggZnVuY3Rpb24gaXMgcnVu IG9uIGFsbCBhdmFpbGFibGUgKGFjdGl2ZSkgZWJvb2tzIGFuZCBtZXJnaW5nCj4+IHJlc3VsdHMg ZnJvbSBlYWNoIG9mIHRoZW0uCj4+IC0tLQo+PiDCoHBsdWdpbnMvcGhvbmVib29rLWVib29rLmMg fCDCoDI4MSArKysrKysrKysrKysrKysrKysrKysrKysrKysrKy0tLS0tLS0tLS0tLS0tLS0KPj4g wqAxIGZpbGVzIGNoYW5nZWQsIDE4MiBpbnNlcnRpb25zKCspLCA5OSBkZWxldGlvbnMoLSkKPj4K Pj4gZGlmZiAtLWdpdCBhL3BsdWdpbnMvcGhvbmVib29rLWVib29rLmMgYi9wbHVnaW5zL3Bob25l Ym9vay1lYm9vay5jCj4+IGluZGV4IDgyMDE5ZGEuLmYyMjM5NjUgMTAwNjQ0Cj4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