diff options
author | Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | 2012-10-02 11:20:23 +0300 |
---|---|---|
committer | Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | 2012-10-02 11:20:23 +0300 |
commit | d5d032b7e36192ae975b8222d2124fec70083f6c (patch) | |
tree | 5669c25915956f2426e9cf6f33ad45d22b9bc08f | |
parent | f98f1ebeb551f83a19b5ff03c2d0dce4abeaa7af (diff) | |
download | obexd-d5d032b7e36192ae975b8222d2124fec70083f6c.tar.gz |
client: 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.
-rw-r--r-- | client/transfer.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/client/transfer.c b/client/transfer.c index bd5277b..fbcafc8 100644 --- a/client/transfer.c +++ b/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; |