From 80b884cddc90f31a5ea641947d0d8d6a8b9e22f6 Mon Sep 17 00:00:00 2001 From: patacongo Date: Sat, 29 Nov 2008 16:04:20 +0000 Subject: Fixes to MQ open logic git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@1348 42af7a65-404d-4744-a932-0658087f49c3 --- nuttx/graphics/nxmu/nx_connect.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'nuttx/graphics/nxmu/nx_connect.c') diff --git a/nuttx/graphics/nxmu/nx_connect.c b/nuttx/graphics/nxmu/nx_connect.c index 401d20d92..0309e3d6c 100644 --- a/nuttx/graphics/nxmu/nx_connect.c +++ b/nuttx/graphics/nxmu/nx_connect.c @@ -152,7 +152,7 @@ NXHANDLE nx_connectionstance(FAR const char *svrmqname) #else conn->crdmq = mq_open(climqname, O_RDONLY|O_CREAT|O_NONBLOCK, 0666, &attr); #endif - if (conn->crdmq) + if (conn->crdmq == (mqd_t)-1) { gdbg("mq_open(%s) failed: %d\n", climqname, errno); goto errout_with_conn; @@ -165,7 +165,7 @@ NXHANDLE nx_connectionstance(FAR const char *svrmqname) attr.mq_flags = 0; conn->cwrmq = mq_open(svrmqname, O_WRONLY|O_CREAT, 0666, &attr); - if (conn->cwrmq) + if (conn->cwrmq == (mqd_t)-1) { gdbg("mq_open(%s) failed: %d\n", svrmqname, errno); goto errout_with_rmq; -- cgit v1.2.3