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

View File

@ -1663,7 +1663,7 @@ CONFIG_NXWM_TASKBAR_LEFT=y
CONFIG_NXWM_STARTWINDOW_VSPACING=4
CONFIG_NXWM_STARTWINDOW_HSPACING=4
# CONFIG_NXWM_CUSTOM_STARTWINDOW_ICON is not set
CONFIG_NXWM_STARTWINDOW_MQNAME="/dev/nxwm"
CONFIG_NXWM_STARTWINDOW_MQNAME="nxwm"
CONFIG_NXWM_STARTWINDOW_MXMSGS=32
CONFIG_NXWM_STARTWINDOW_MXMPRIO=42
CONFIG_NXWM_STARTWINDOW_PRIO=100

View File

@ -1195,7 +1195,7 @@ CONFIG_NXWM_TASKBAR_LEFT=y
CONFIG_NXWM_STARTWINDOW_VSPACING=4
CONFIG_NXWM_STARTWINDOW_HSPACING=4
# CONFIG_NXWM_CUSTOM_STARTWINDOW_ICON is not set
CONFIG_NXWM_STARTWINDOW_MQNAME="/dev/nxwm"
CONFIG_NXWM_STARTWINDOW_MQNAME="nxwm"
CONFIG_NXWM_STARTWINDOW_MXMSGS=32
CONFIG_NXWM_STARTWINDOW_MXMPRIO=42
CONFIG_NXWM_STARTWINDOW_PRIO=100

View File

@ -1522,7 +1522,7 @@ CONFIG_NXWM_TOOLBAR_FONTID=5
CONFIG_NXWM_STARTWINDOW_VSPACING=4
CONFIG_NXWM_STARTWINDOW_HSPACING=4
# CONFIG_NXWM_CUSTOM_STARTWINDOW_ICON is not set
CONFIG_NXWM_STARTWINDOW_MQNAME="/dev/nxwm"
CONFIG_NXWM_STARTWINDOW_MQNAME="nxwm"
CONFIG_NXWM_STARTWINDOW_MXMSGS=32
CONFIG_NXWM_STARTWINDOW_MXMPRIO=42
CONFIG_NXWM_STARTWINDOW_PRIO=100

View File

@ -1281,7 +1281,7 @@ CONFIG_NXWM_TOOLBAR_FONTID=6
CONFIG_NXWM_STARTWINDOW_VSPACING=8
CONFIG_NXWM_STARTWINDOW_HSPACING=8
# CONFIG_NXWM_CUSTOM_STARTWINDOW_ICON is not set
CONFIG_NXWM_STARTWINDOW_MQNAME="/dev/nxwm"
CONFIG_NXWM_STARTWINDOW_MQNAME="nxwm"
CONFIG_NXWM_STARTWINDOW_MXMSGS=32
CONFIG_NXWM_STARTWINDOW_MXMPRIO=42
CONFIG_NXWM_STARTWINDOW_PRIO=100

View File

@ -1674,7 +1674,7 @@ CONFIG_NXWM_TOOLBAR_FONTID=6
CONFIG_NXWM_STARTWINDOW_VSPACING=8
CONFIG_NXWM_STARTWINDOW_HSPACING=8
# CONFIG_NXWM_CUSTOM_STARTWINDOW_ICON is not set
CONFIG_NXWM_STARTWINDOW_MQNAME="/dev/nxwm"
CONFIG_NXWM_STARTWINDOW_MQNAME="nxwm"
CONFIG_NXWM_STARTWINDOW_MXMSGS=32
CONFIG_NXWM_STARTWINDOW_MXMPRIO=42
CONFIG_NXWM_STARTWINDOW_PRIO=100

View File

@ -1321,7 +1321,7 @@ CONFIG_NXWM_TOOLBAR_FONTID=5
CONFIG_NXWM_STARTWINDOW_VSPACING=4
CONFIG_NXWM_STARTWINDOW_HSPACING=4
# CONFIG_NXWM_CUSTOM_STARTWINDOW_ICON is not set
CONFIG_NXWM_STARTWINDOW_MQNAME="/dev/nxwm"
CONFIG_NXWM_STARTWINDOW_MQNAME="nxwm"
CONFIG_NXWM_STARTWINDOW_MXMSGS=32
CONFIG_NXWM_STARTWINDOW_MXMPRIO=42
CONFIG_NXWM_STARTWINDOW_PRIO=100

View File

@ -1514,7 +1514,7 @@ CONFIG_NXWM_TOOLBAR_FONTID=5
CONFIG_NXWM_STARTWINDOW_VSPACING=4
CONFIG_NXWM_STARTWINDOW_HSPACING=4
# CONFIG_NXWM_CUSTOM_STARTWINDOW_ICON is not set
CONFIG_NXWM_STARTWINDOW_MQNAME="/dev/nxwm"
CONFIG_NXWM_STARTWINDOW_MQNAME="nxwm"
CONFIG_NXWM_STARTWINDOW_MXMSGS=32
CONFIG_NXWM_STARTWINDOW_MXMPRIO=42
CONFIG_NXWM_STARTWINDOW_PRIO=100

View File

@ -1673,7 +1673,7 @@ CONFIG_NXWM_TASKBAR_LEFT=y
CONFIG_NXWM_STARTWINDOW_VSPACING=4
CONFIG_NXWM_STARTWINDOW_HSPACING=4
# CONFIG_NXWM_CUSTOM_STARTWINDOW_ICON is not set
CONFIG_NXWM_STARTWINDOW_MQNAME="/dev/nxwm"
CONFIG_NXWM_STARTWINDOW_MQNAME="nxwm"
CONFIG_NXWM_STARTWINDOW_MXMSGS=32
CONFIG_NXWM_STARTWINDOW_MXMPRIO=42
CONFIG_NXWM_STARTWINDOW_PRIO=100

View File

@ -979,7 +979,7 @@ CONFIG_NXWM_TASKBAR_LEFT=y
CONFIG_NXWM_STARTWINDOW_VSPACING=4
CONFIG_NXWM_STARTWINDOW_HSPACING=4
# CONFIG_NXWM_CUSTOM_STARTWINDOW_ICON is not set
CONFIG_NXWM_STARTWINDOW_MQNAME="/dev/nxwm"
CONFIG_NXWM_STARTWINDOW_MQNAME="nxwm"
CONFIG_NXWM_STARTWINDOW_MXMSGS=32
CONFIG_NXWM_STARTWINDOW_MXMPRIO=42
CONFIG_NXWM_STARTWINDOW_PRIO=100

View File

@ -1706,7 +1706,7 @@ CONFIG_NXWM_TASKBAR_LEFT=y
CONFIG_NXWM_STARTWINDOW_VSPACING=4
CONFIG_NXWM_STARTWINDOW_HSPACING=4
# CONFIG_NXWM_CUSTOM_STARTWINDOW_ICON is not set
CONFIG_NXWM_STARTWINDOW_MQNAME="/dev/nxwm"
CONFIG_NXWM_STARTWINDOW_MQNAME="nxwm"
CONFIG_NXWM_STARTWINDOW_MXMSGS=32
CONFIG_NXWM_STARTWINDOW_MXMPRIO=42
CONFIG_NXWM_STARTWINDOW_PRIO=100

View File

@ -1389,7 +1389,7 @@ CONFIG_NXWM_TASKBAR_LEFT=y
CONFIG_NXWM_STARTWINDOW_VSPACING=4
CONFIG_NXWM_STARTWINDOW_HSPACING=4
# CONFIG_NXWM_CUSTOM_STARTWINDOW_ICON is not set
CONFIG_NXWM_STARTWINDOW_MQNAME="/dev/nxwm"
CONFIG_NXWM_STARTWINDOW_MQNAME="nxwm"
CONFIG_NXWM_STARTWINDOW_MXMSGS=32
CONFIG_NXWM_STARTWINDOW_MXMPRIO=42
CONFIG_NXWM_STARTWINDOW_PRIO=100

View File

@ -1711,7 +1711,7 @@ CONFIG_NXWM_TASKBAR_LEFT=y
CONFIG_NXWM_STARTWINDOW_VSPACING=4
CONFIG_NXWM_STARTWINDOW_HSPACING=4
# CONFIG_NXWM_CUSTOM_STARTWINDOW_ICON is not set
CONFIG_NXWM_STARTWINDOW_MQNAME="/dev/nxwm"
CONFIG_NXWM_STARTWINDOW_MQNAME="nxwm"
CONFIG_NXWM_STARTWINDOW_MXMSGS=32
CONFIG_NXWM_STARTWINDOW_MXMPRIO=42
CONFIG_NXWM_STARTWINDOW_PRIO=100

View File

@ -1497,7 +1497,7 @@ CONFIG_NXWM_TASKBAR_LEFT=y
CONFIG_NXWM_STARTWINDOW_VSPACING=4
CONFIG_NXWM_STARTWINDOW_HSPACING=4
# CONFIG_NXWM_CUSTOM_STARTWINDOW_ICON is not set
CONFIG_NXWM_STARTWINDOW_MQNAME="/dev/nxwm"
CONFIG_NXWM_STARTWINDOW_MQNAME="nxwm"
CONFIG_NXWM_STARTWINDOW_MXMSGS=32
CONFIG_NXWM_STARTWINDOW_MXMPRIO=42
CONFIG_NXWM_STARTWINDOW_PRIO=100

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);

View File

@ -64,7 +64,7 @@
/* Default server MQ name used by nx_run() macro */
#define NX_DEFAULT_SERVER_MQNAME "/dev/nxs"
#define NX_DEFAULT_SERVER_MQNAME "nxs"
/* Mouse button bits */

View File

@ -71,8 +71,8 @@
/* Used to create unique client MQ name */
#define NX_CLIENT_MQNAMEFMT "/dev/nxc%d"
#define NX_CLIENT_MXNAMELEN (16)
#define NX_CLIENT_MQNAMEFMT "nxc%d"
#define NX_CLIENT_MXNAMELEN (12)
#define NX_MXSVRMSGLEN (64) /* Maximum size of a client->server command */
#define NX_MXEVENTLEN (64) /* Maximum size of an event */