Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp219135pxb; Wed, 23 Mar 2022 16:45:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxf3DpPXhPlBFhshl4hTOrehlsDx7mfIf1ttTvdAb0u4Gd0GrxhJ7rFfldpmp5jnMS4bQc/ X-Received: by 2002:a17:90a:6393:b0:1bf:70e7:27d2 with SMTP id f19-20020a17090a639300b001bf70e727d2mr14685317pjj.1.1648079109876; Wed, 23 Mar 2022 16:45:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648079109; cv=none; d=google.com; s=arc-20160816; b=EQxeDVCr4thhQbshta4DxfRD04hi6XjJwNiX8+gRGmOroHZfhZdb6IX3YMLkzj9UY+ M8+PjF4qaDeyyb/wmUpppsm1UhC88m6xoHXNP0R2dNC2rzFePP6rSGAIKinEuSDJrKuX qUDnN7UQlLPq8URgY+uV3LModAFtMmzRdkNgm2ZWYMPwAGy45preJ8U5aLJC8lYaLrxU 6HHO1y3ssHFWmdt8YoT4MbXayU/rODvf44iy93NCH+obTC7KrWgVS3c4C8k6huqSb1q5 DLTzxvDHrQkVjtMXdTEhWyzNbRlnqZPf523dD10gHANFIql/DPKTU4LYXmw83cWjAMVm PLUQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from:cc :references:to:content-language:subject:user-agent:mime-version:date :message-id; bh=bCV1s3z+DCFbMe9tM0obZvPa9lUTvAMPKuTtx3JFGGk=; b=ZikX6n++d2PMfwuA0Jo1cc00h8ZjJxYWYZ+66uAJ+il7J/xjiHTF/oag/gE+LCsUtX NCj8K36UrHZ0zE7sbvxmduVHYYDeKFL0itUazlgO3c40aWxznu+57EewqNyKG+2/J9yo /8Bbif4kvSGUTC0VifmaNGAvVvzBg+lky7x1MfzZo7pM8EGdXJuVN1kEhOTPUttfy8Vt sfX8/m/LE89LY7a+x7ExjqxnP1eAMWkEV7sVCPXugUNN1rpjEvwVArI0HJOM60tpvhTv 467qo4tBzydXARMMWvayFl9ftQFhqGLevPbL8d34MaVZWYaM68cODyQAak4p+xnIb1T0 erYg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b18-20020a170902d31200b00153b2d164fbsi17629847plc.259.2022.03.23.16.44.55; Wed, 23 Mar 2022 16:45:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229925AbiCWGvT (ORCPT + 99 others); Wed, 23 Mar 2022 02:51:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41746 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242019AbiCWGvS (ORCPT ); Wed, 23 Mar 2022 02:51:18 -0400 Received: from mx1.molgen.mpg.de (mx3.molgen.mpg.de [141.14.17.11]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8C32C546A5 for ; Tue, 22 Mar 2022 23:49:47 -0700 (PDT) Received: from [192.168.0.3] (ip5f5ae903.dynamic.kabel-deutschland.de [95.90.233.3]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) (Authenticated sender: pmenzel) by mx.molgen.mpg.de (Postfix) with ESMTPSA id 0013461EA1928; Wed, 23 Mar 2022 07:49:44 +0100 (CET) Message-ID: <8ff37c48-4e71-1c40-53bb-5bb99d7a1a88@molgen.mpg.de> Date: Wed, 23 Mar 2022 07:49:44 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.7.0 Subject: Re: [PATCH] obexd: Fix can't receive small files sent by windows Content-Language: en-US To: Xinpeng Wang References: <20220323052149.28674-1-wangxinpeng@uniontech.com> Cc: linux-bluetooth@vger.kernel.org From: Paul Menzel In-Reply-To: <20220323052149.28674-1-wangxinpeng@uniontech.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org Dear Xinpeng, Thank you for the patch. You can use `git format-patch`’s switch `--reroll-count` to denote that it’s replacing an earlier sent in patch. It’s also good practice to write the changes between the version below the `---` line, so it’s clear for the reviewer, what changed. For example: v2: Fix typo in commit message summary Am 23.03.22 um 06:21 schrieb xinpeng wang: > Windows devices use streaming mode to send files. If a small file is What do you mean by Windows devices exactly? Windows phone or any computer? > sent,the first time processing data will be completed successfully, Please add a space after the comma. > and the transfer_complete function will be called before the end to > clear os->path.At this time, the dbus signal is still pending, and Please add a space after the dot/period. > the dbus method call requesting the file path has not been processed; > in this way, the upper-level program will not be able to obtain the > file path, resulting in failure to receive the file. > Therefore, the signal of Filename is generated, and it is forced to > be sent when status=active. I’d also add a blank line between paragraphs. How can your issue be reproduced, and the fix verified? > Signed-off-by: xinpeng wang > --- > obexd/src/manager.c | 6 +++++- > obexd/src/obex.c | 1 + > 2 files changed, 6 insertions(+), 1 deletion(-) > > diff --git a/obexd/src/manager.c b/obexd/src/manager.c > index 01741fe62..2c180dc44 100644 > --- a/obexd/src/manager.c > +++ b/obexd/src/manager.c > @@ -533,8 +533,12 @@ void manager_emit_transfer_property(struct obex_transfer *transfer, > void manager_emit_transfer_started(struct obex_transfer *transfer) > { > transfer->status = TRANSFER_STATUS_ACTIVE; > + if (!transfer->path) > + return; > > - manager_emit_transfer_property(transfer, "Status"); > + g_dbus_emit_property_changed_full(connection, transfer->path, > + TRANSFER_INTERFACE, "Status", > + G_DBUS_PROPERTY_CHANGED_FLAG_FLUSH); > } > > static void emit_transfer_completed(struct obex_transfer *transfer, > diff --git a/obexd/src/obex.c b/obexd/src/obex.c > index 3a68fd66c..c0d9e160a 100644 > --- a/obexd/src/obex.c > +++ b/obexd/src/obex.c > @@ -720,6 +720,7 @@ int obex_put_stream_start(struct obex_session *os, const char *filename) > manager_emit_transfer_property(os->service_data, "Size"); > > os->path = g_strdup(filename); > + manager_emit_transfer_property(os->service_data, "Filename"); > > return 0; > }