From b39b605f320c56adbb3e5678fc1bb95059a0ebf5 Mon Sep 17 00:00:00 2001 From: Slawomir Bochenski Date: Wed, 5 Oct 2011 16:32:39 +0200 Subject: [PATCH] obexd: Write pending bytes only if mime object is open Without this in case of "non-checked" PUT there were calls to write() prior to any obex_put_stream_start(). --- obexd/src/obex.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/obexd/src/obex.c b/obexd/src/obex.c index 938937c10..38c5ca6aa 100644 --- a/obexd/src/obex.c +++ b/obexd/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); -- 2.47.3