[PATCH obexd 1/2] Utilise os_set_response in check_put

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



---
 src/obex.c |   11 +----------
 1 files changed, 1 insertions(+), 10 deletions(-)

diff --git a/src/obex.c b/src/obex.c
index 2cabadb..b0a4183 100644
--- a/src/obex.c
+++ b/src/obex.c
@@ -1076,22 +1076,13 @@ static gboolean check_put(obex_t *obex, obex_object_t *obj)
 	switch (ret) {
 	case 0:
 		break;
-	case -EPERM:
-		OBEX_ObjectSetRsp(obj, OBEX_RSP_FORBIDDEN, OBEX_RSP_FORBIDDEN);
-		return FALSE;
-	case -EBADR:
-		OBEX_ObjectSetRsp(obj, OBEX_RSP_BAD_REQUEST,
-					OBEX_RSP_BAD_REQUEST);
-		return FALSE;
 	case -EAGAIN:
 		OBEX_SuspendRequest(obex, obj);
 		os->obj = obj;
 		os->driver->set_io_watch(os->object, handle_async_io, os);
 		return TRUE;
 	default:
-		DBG("Unhandled chkput error: %d", ret);
-		OBEX_ObjectSetRsp(obj, OBEX_RSP_INTERNAL_SERVER_ERROR,
-				OBEX_RSP_INTERNAL_SERVER_ERROR);
+		os_set_response(obj, ret);
 		return FALSE;
 
 	}
-- 
1.7.4.1

--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux