From adf9e685abbc5e415091c2439c38a5112e39da98 Mon Sep 17 00:00:00 2001 From: wangyingdong Date: Wed, 28 Jun 2023 22:09:56 +0800 Subject: [PATCH] Fix the bug that localsocket fails to send in CONFIG_NET_LOCAL_DGRAM mode because fs adds pipe check (commit 9e06c3e) Signed-off-by: wangyingdong --- net/local/local_fifo.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/net/local/local_fifo.c b/net/local/local_fifo.c index 4ff2caff03..9c4ec91f82 100644 --- a/net/local/local_fifo.c +++ b/net/local/local_fifo.c @@ -152,12 +152,11 @@ static bool local_fifo_exists(FAR const char *path) return false; } - /* FIFOs are character devices in NuttX. Return true if what we found - * is a FIFO. What if it is something else? In that case, we will - * return false and mkfifo() will fail. + /* Return true if what we found is a FIFO. What if it is something else? + * In that case, we will return false and mkfifo() will fail. */ - return (bool)S_ISCHR(buf.st_mode); + return (bool)S_ISFIFO(buf.st_mode); } /****************************************************************************