summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSlawomir Bochenski <lkslawek@gmail.com>2011-10-05 16:32:39 +0200
committerJohan Hedberg <johan.hedberg@intel.com>2011-10-05 17:11:07 +0300
commitc3a055dc6021aee3a4640b431b3de2e1845ee7ce (patch)
tree759dfcf9e4a3b080b18412243e4df98542a5b727 /src
parent76b517ac61e0ab94359a5e4902098ae9a65b2dbe (diff)
downloadobexd-c3a055dc6021aee3a4640b431b3de2e1845ee7ce.tar.gz
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().
Diffstat (limited to 'src')
-rw-r--r--src/obex.c2
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);