diff options
author | Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | 2012-10-02 11:20:23 +0300 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2012-12-04 22:49:05 +0100 |
commit | a103426e51aaeb472e669962f5cac4b1274176f5 (patch) | |
tree | 1d522fa6503c020dd8ed3ffac0d40a5060637ccf /obexd/client/transfer.c | |
parent | 36d387af615a9f21c42c503c10f22cf41559313c (diff) | |
download | bluez-a103426e51aaeb472e669962f5cac4b1274176f5.tar.gz |
obexd: Make obc_transfer_put to accept NULL as filename
In that case contents should be valid so the modules can use
obc_transfer_put to create temporary files.
Diffstat (limited to 'obexd/client/transfer.c')
-rw-r--r-- | obexd/client/transfer.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/obexd/client/transfer.c b/obexd/client/transfer.c index bd5277b5d..fbcafc821 100644 --- a/obexd/client/transfer.c +++ b/obexd/client/transfer.c @@ -398,7 +398,8 @@ struct obc_transfer *obc_transfer_put(const char *type, const char *name, struct stat st; int perr; - if (filename == NULL || strcmp(filename, "") == 0) { + if ((filename == NULL || strcmp(filename, "") == 0) && + contents == NULL) { g_set_error(err, OBC_TRANSFER_ERROR, -EINVAL, "Invalid filename given"); return NULL; |