diff options
author | Sunil Kumar Behera <sunil.behera@samsung.com> | 2012-08-17 15:03:46 +0530 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2012-12-04 22:49:04 +0100 |
commit | a558890eb4a157aa1a5493e0a3949ceee9bda084 (patch) | |
tree | fbc4914df97f50cf0aa7af55fa08d60bd01320e6 /obexd/plugins | |
parent | c7523cb988122a9dad6c7026a5bf922e6353021a (diff) |
obexd: Fix invalid oflag check
Change logic to check for O_WRONLY, as oflag is
created by an OR operation of O_WRONLY, O_CREAT and
O_TRUNC.
Message update is a PUT function, this check returns
bad response if GET is received.
Diffstat (limited to 'obexd/plugins')
-rw-r--r-- | obexd/plugins/mas.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/obexd/plugins/mas.c b/obexd/plugins/mas.c index 30e529ff1..57d961107 100644 --- a/obexd/plugins/mas.c +++ b/obexd/plugins/mas.c @@ -632,7 +632,7 @@ static void *message_update_open(const char *name, int oflag, mode_t mode, DBG(""); - if (oflag != O_WRONLY) { + if (oflag == O_RDONLY) { *err = -EBADR; return NULL; } |