summaryrefslogtreecommitdiff
path: root/nuttx/graphics/nxmu
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2008-11-29 20:25:28 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2008-11-29 20:25:28 +0000
commita9a76255e924240cd29d9cd9f596292d71bae8cb (patch)
tree7dc4b58865681a74638920b2f0d7aec0771b3d59 /nuttx/graphics/nxmu
parent65b7a561e306289d7159bf533e1a5d7f0ebb3cda (diff)
downloadpx4-nuttx-a9a76255e924240cd29d9cd9f596292d71bae8cb.tar.gz
px4-nuttx-a9a76255e924240cd29d9cd9f596292d71bae8cb.tar.bz2
px4-nuttx-a9a76255e924240cd29d9cd9f596292d71bae8cb.zip
No longer waits for connection
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@1356 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/graphics/nxmu')
-rw-r--r--nuttx/graphics/nxmu/nx_connect.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/nuttx/graphics/nxmu/nx_connect.c b/nuttx/graphics/nxmu/nx_connect.c
index 0309e3d6c..69cf7e95a 100644
--- a/nuttx/graphics/nxmu/nx_connect.c
+++ b/nuttx/graphics/nxmu/nx_connect.c
@@ -94,8 +94,12 @@ static uint32 g_nxcid = 1;
* connection is normally needed per thread as each connection can host
* multiple windows.
*
- * NOTE that multiple instances of the NX server may run at the same time,
- * each with different message queue names.
+ * NOTES:
+ * - This function returns before the connection is fully instantiated.
+ * it is necessary to wait for the connection event before using the
+ * returned handle.
+ * - Multiple instances of the NX server may run at the same time,
+ * each with different message queue names.
*
* Input Parameters:
* svrmqname - The name for the server incoming message queue
@@ -183,6 +187,7 @@ NXHANDLE nx_connectionstance(FAR const char *svrmqname)
goto errout_with_wmq;
}
+#if 0
/* Now read until we get a response to this message. The server will
* respond with either (1) NX_CLIMSG_CONNECTED, in which case the state
* will change to NX_CLISTATE_CONNECTED, or (2) NX_CLIMSG_DISCONNECTED
@@ -197,9 +202,10 @@ NXHANDLE nx_connectionstance(FAR const char *svrmqname)
gdbg("nx_message failed: %d\n", errno);
goto errout_with_wmq;
}
+ usleep(300000);
}
while (conn->state != NX_CLISTATE_CONNECTED);
-
+#endif
return (NXHANDLE)conn;
errout_with_wmq: