From 2ad4bbe2388e8366ee001b7324b259a56d91cede Mon Sep 17 00:00:00 2001 From: sin Date: Fri, 26 Sep 2014 17:03:08 +0100 Subject: No need to open for writing --- ratox.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ratox.c') diff --git a/ratox.c b/ratox.c index bdcdbcf..0f816d7 100644 --- a/ratox.c +++ b/ratox.c @@ -339,7 +339,7 @@ cbfriendrequest(Tox *m, const uint8_t *id, const uint8_t *data, uint16_t len, vo r = mkfifoat(gslots[REQUEST].fd[OUT], req->idstr, 0644); if (r < 0 && errno != EEXIST) eprintf("mkfifoat %s:", req->idstr); - r = openat(gslots[REQUEST].fd[OUT], req->idstr, O_RDWR | O_NONBLOCK); + r = openat(gslots[REQUEST].fd[OUT], req->idstr, O_RDONLY | O_NONBLOCK); if (r < 0) eprintf("openat %s:", req->idstr); req->fd = r; -- cgit v1.2.3