From 0c44f9ad546da808cfbe1d20eb6c729b0e82e0dc Mon Sep 17 00:00:00 2001 From: Slawomir Bochenski Date: Wed, 5 Oct 2011 16:52:04 +0200 Subject: [PATCH] obexd: Utilise os_set_response in check_put --- obexd/src/obex.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/obexd/src/obex.c b/obexd/src/obex.c index 38c5ca6aa..1615ea844 100644 --- a/obexd/src/obex.c +++ b/obexd/src/obex.c @@ -1081,22 +1081,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; } -- 2.47.3