diff options
author | Slawomir Bochenski <lkslawek@gmail.com> | 2011-10-05 16:32:39 +0200 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@intel.com> | 2011-10-05 17:11:07 +0300 |
commit | c3a055dc6021aee3a4640b431b3de2e1845ee7ce (patch) | |
tree | 759dfcf9e4a3b080b18412243e4df98542a5b727 /src | |
parent | 76b517ac61e0ab94359a5e4902098ae9a65b2dbe (diff) | |
download | obexd-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.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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); |