NX server: Correct message queue names. Should not be at /dev, but rather relative to /var/mqueue.

This commit is contained in:
Gregory Nutt
2017-01-08 09:14:11 -06:00
parent e1d9bb2ef2
commit 7035d232f8
16 changed files with 26 additions and 17 deletions
+10 -1
View File
@@ -100,12 +100,21 @@ mqd_t mq_open(FAR const char *mq_name, int oflags, ...)
/* Make sure that a non-NULL name is supplied */
if (!mq_name)
if (mq_name == NULL || *mq_name == '/0')
{
errcode = EINVAL;
goto errout;
}
/* Skip over any leading '/'. All message queue paths are relative to
* CONFIG_FS_MQUEUE_MPATH.
*/
while (*mq_name == '/')
{
mq_name++;
}
/* Get the full path to the message queue */
snprintf(fullpath, MAX_MQUEUE_PATH, CONFIG_FS_MQUEUE_MPATH "/%s", mq_name);