diff mbox series

[v1] obex: Send response to client for Abort request

Message ID 20250409125232.1385922-1-quic_amisjain@quicinc.com
State New
Headers show
Series [v1] obex: Send response to client for Abort request | expand

Commit Message

Amisha Jain April 9, 2025, 12:52 p.m. UTC
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 mbox series

Patch

diff --git a/obexd/src/obex.c b/obexd/src/obex.c
index 370bfac9e..a9bc3d3a9 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);
 		goto reset;
 	}