You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2023/05/25 14:41:54 UTC
[nuttx] branch master updated: vnc server: Fix that vnc_updater thread exited caused by readed a null data
This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git
The following commit(s) were added to refs/heads/master by this push:
new 73832ab0a4 vnc server: Fix that vnc_updater thread exited caused by readed a null data
73832ab0a4 is described below
commit 73832ab0a422d3bada710344c35d800fc1d4f91c
Author: jianglianfang <ji...@xiaomi.com>
AuthorDate: Thu May 18 16:39:34 2023 +0800
vnc server: Fix that vnc_updater thread exited caused by readed a null data
When updating the full-screen data, sq_ init() will clear the updqueue and add just one new full-screen data to the updqueue. So when the vnc_updater thread is awakened, it may read a null data due to multiple reading, leading to vnc_updater thread exited , which is not expected.
Signed-off-by: jianglianfang <ji...@xiaomi.com>
---
drivers/video/vnc/vnc_updater.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/video/vnc/vnc_updater.c b/drivers/video/vnc/vnc_updater.c
index b0ade582fc..63aac2a6ef 100644
--- a/drivers/video/vnc/vnc_updater.c
+++ b/drivers/video/vnc/vnc_updater.c
@@ -386,7 +386,10 @@ static FAR void *vnc_updater(FAR void *arg)
break;
}
- DEBUGASSERT(srcrect != NULL);
+ if (srcrect == NULL)
+ {
+ continue;
+ }
updinfo("Dequeued {(%d, %d),(%d, %d)}\n",
srcrect->rect.x, srcrect->rect.y,