Return-Path: MIME-Version: 1.0 In-Reply-To: References: <1317825160-21429-1-git-send-email-lkslawek@gmail.com> <1317825160-21429-4-git-send-email-lkslawek@gmail.com> Date: Wed, 5 Oct 2011 19:43:09 +0300 Message-ID: Subject: Re: [PATCH obexd 4/4] Simplify code for calling mime driver flush() From: Luiz Augusto von Dentz To: Slawomir Bochenski Cc: linux-bluetooth@vger.kernel.org Content-Type: text/plain; charset=ISO-8859-1 Sender: linux-bluetooth-owner@vger.kernel.org List-ID: Hi, On Wed, Oct 5, 2011 at 7:12 PM, Slawomir Bochenski wrote: > On Wed, Oct 5, 2011 at 5:38 PM, Luiz Augusto von Dentz > wrote: >> I don't think this is true, if it was then why would we call >> service->put on the end of stream and I also never see this happening >> in practice e.g. calling ftp_put in the end of stream. > > Actually, if you will add DBG call to filesystem_write() you will > clearly see, that ftp_put is called at the end of stream. That is true only if the body is not bigger than the MTU, in other words the body is not fragmented, otherwise it would be pointless to check for name and folder only at the very end of the stream. I also don't like the fact that OBEX_EV_REQ is generated in the end of the first package, it is really confusing that a request event comes after its data, but maybe there is a reason for that or the intention was not that so we are not handling the event the way it was meant? -- Luiz Augusto von Dentz