mirror of
https://github.com/apache/nuttx.git
synced 2026-06-05 15:43:28 +08:00
NX server: Correct message queue names. Should not be at /dev, but rather relative to /var/mqueue.
This commit is contained in:
+10
-1
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user