From a558890eb4a157aa1a5493e0a3949ceee9bda084 Mon Sep 17 00:00:00 2001 From: Sunil Kumar Behera Date: Fri, 17 Aug 2012 15:03:46 +0530 Subject: [PATCH] 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. --- obexd/plugins/mas.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; } -- 2.47.3