From f127495caa2d45a1b1fff3be7a9d3756259d23e2 Mon Sep 17 00:00:00 2001 From: px4dev Date: Fri, 11 Jan 2013 02:14:43 -0800 Subject: Manually fixup merge botches via direct comparison with NuttX r5447. --- nuttx/graphics/nxmu/nxmu_sendwindow.c | 44 +++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) (limited to 'nuttx/graphics/nxmu/nxmu_sendwindow.c') diff --git a/nuttx/graphics/nxmu/nxmu_sendwindow.c b/nuttx/graphics/nxmu/nxmu_sendwindow.c index 6f64ffff2..0826a45bc 100644 --- a/nuttx/graphics/nxmu/nxmu_sendwindow.c +++ b/nuttx/graphics/nxmu/nxmu_sendwindow.c @@ -112,3 +112,47 @@ int nxmu_sendwindow(FAR struct nxbe_window_s *wnd, FAR const void *msg, return ret; } + +/**************************************************************************** + * Name: nxmu_sendclientwindow + * + * Description: + * Send a message to the client at NX_CLIMSG_PRIO priority + * + * Input Parameters: + * wnd - A pointer to the back-end window structure + * msg - A pointer to the message to send + * msglen - The length of the message in bytes. + * + * Return: + * OK on success; ERROR on failure with errno set appropriately + * + ****************************************************************************/ + +int nxmu_sendclientwindow(FAR struct nxbe_window_s *wnd, FAR const void *msg, + size_t msglen) +{ + int ret = OK; + + /* Sanity checking */ + +#ifdef CONFIG_DEBUG + if (!wnd || !wnd->conn) + { + errno = EINVAL; + return ERROR; + } +#endif + + /* Ignore messages destined to a blocked window (no errors reported) */ + + if (!NXBE_ISBLOCKED(wnd)) + { + /* Send the message to the server */ + + ret = nxmu_sendclient(wnd->conn, msg, msglen); + } + + return ret; +} + -- cgit v1.2.3