[PATCH obexd 3/4] Write pending bytes only if mime object is open

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

 



Without this in case of "non-checked" PUT there were calls to write()
prior to any obex_put_stream_start().
---
 src/obex.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/obex.c b/src/obex.c
index 938937c..38c5ca6 100644
--- a/src/obex.c
+++ b/src/obex.c
@@ -580,7 +580,7 @@ static int obex_read_stream(struct obex_session *os, obex_t *obex,
 		os->size = OBJECT_SIZE_UNKNOWN;
 
 	/* If there's something to write and we are able to write it */
-	if (os->pending > 0 && os->driver)
+	if (os->pending > 0 && os->driver && os->object)
 		goto write;
 
 	size = OBEX_ObjectReadStream(obex, obj, &buffer);
-- 
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