Hi Amisha, On Mon, Apr 21, 2025 at 1:58 AM Amisha Jain <quic_amisjain@xxxxxxxxxxx> wrote: > > Incase of ongoing transfer, If the client sends Abort request, Server is not > sending any response back. > > Ideally it should send OK or Success reponse code for the abort command. > > This is required in PTS testing for passing below testcases - > 1) OPP/SR/OPH/BV-27-I > To verify that a server can respond to an ABORT from the client during an OBEX operation. > 2)FTP/SR/OTR/BV-02-C > To verify that the pushed file is aborted normally. > 3)PBAP/PSE/PDF/BV-06-I > Verify that the PCE can abort a Phone Book object download from the PSE. > 4)PBAP/PSE/PBF/BV-03-I > Verify that the PCE can abort a vCard-listing object download from the PSE. > > --- > obexd/src/obex.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/obexd/src/obex.c b/obexd/src/obex.c > index 370bfac9e..0330d5a7c 100644 > --- a/obexd/src/obex.c > +++ b/obexd/src/obex.c > @@ -389,6 +389,8 @@ static void transfer_complete(GObex *obex, GError *err, gpointer user_data) > > if (err != NULL) { > error("transfer failed: %s\n", err->message); > + if (strcmp(err->message, "Request was aborted") == 0) > + os_set_response(os, 0); We shouldn't be checking the error message but rather check the error code G_OBEX_ERROR_CANCELLED, that said I wonder why this is not being handled directly in the likes of gobex/gobex-transfer.c:transfer_abort_req, but it looks like it responding already: rsp = g_obex_packet_new(G_OBEX_RSP_SUCCESS, TRUE, G_OBEX_HDR_INVALID); g_obex_send(obex, rsp, NULL); > goto reset; > } > > -- > 2.34.1 > > -- Luiz Augusto von Dentz