Linux bluetooth development
 help / color / mirror / Atom feed
* Re: [PATCH obexd 1/2] Utilise os_set_response in check_put
  2011-10-05 14:52 [PATCH obexd 1/2] Utilise os_set_response in check_put Slawomir Bochenski
@ 2011-10-05 14:41 ` Johan Hedberg
  2011-10-05 14:52 ` [PATCH obexd 2/2] Pass through error returned by open in PUTs Slawomir Bochenski
  1 sibling, 0 replies; 3+ messages in thread
From: Johan Hedberg @ 2011-10-05 14:41 UTC (permalink / raw)
  To: Slawomir Bochenski; +Cc: linux-bluetooth

Hi Slawek,

On Wed, Oct 05, 2011, Slawomir Bochenski wrote:
> ---
>  src/obex.c |   11 +----------
>  1 files changed, 1 insertions(+), 10 deletions(-)

Both patches have been applied. Thanks.

Johan

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH obexd 1/2] Utilise os_set_response in check_put
@ 2011-10-05 14:52 Slawomir Bochenski
  2011-10-05 14:41 ` Johan Hedberg
  2011-10-05 14:52 ` [PATCH obexd 2/2] Pass through error returned by open in PUTs Slawomir Bochenski
  0 siblings, 2 replies; 3+ messages in thread
From: Slawomir Bochenski @ 2011-10-05 14:52 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Slawomir Bochenski

---
 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


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH obexd 2/2] Pass through error returned by open in PUTs
  2011-10-05 14:52 [PATCH obexd 1/2] Utilise os_set_response in check_put Slawomir Bochenski
  2011-10-05 14:41 ` Johan Hedberg
@ 2011-10-05 14:52 ` Slawomir Bochenski
  1 sibling, 0 replies; 3+ messages in thread
From: Slawomir Bochenski @ 2011-10-05 14:52 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Slawomir Bochenski

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

diff --git a/src/obex.c b/src/obex.c
index b0a4183..59bbe7a 100644
--- a/src/obex.c
+++ b/src/obex.c
@@ -958,7 +958,7 @@ int obex_put_stream_start(struct obex_session *os, const char *filename)
 					(size_t *) &os->size : NULL, &err);
 	if (os->object == NULL) {
 		error("open(%s): %s (%d)", filename, strerror(-err), -err);
-		return -EPERM;
+		return err;
 	}
 
 	os->path = g_strdup(filename);
-- 
1.7.4.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-10-05 14:52 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-05 14:52 [PATCH obexd 1/2] Utilise os_set_response in check_put Slawomir Bochenski
2011-10-05 14:41 ` Johan Hedberg
2011-10-05 14:52 ` [PATCH obexd 2/2] Pass through error returned by open in PUTs Slawomir Bochenski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox