Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix a bug that could sometimes lead to fatal assert, aborting the pro… #12

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion eva/vqec-dp/outputshim/vqec_sink_api.h
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ vqec_sink_read_internal (struct vqec_sink_ *sink,
#ifdef HAVE_FCC
if(pak->type == VQEC_PAK_TYPE_APP) {
VQEC_DP_ASSERT_FATAL(iobuf->buf_wrlen == 0,
"buffer write length is 0");
"buffer write length is not 0");
iobuf->buf_flags |= VQEC_DP_BUF_FLAGS_APP;
}
#endif /* HAVE_FCC */
Expand Down
5 changes: 5 additions & 0 deletions eva/vqec-dp/outputshim/vqec_sink_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,11 @@ int32_t vqec_sink_read (struct vqec_sink_ *sink,
break;
}

if (iobuf->buf_wrlen != 0 && pak_hdr->pak->type == VQEC_PAK_TYPE_APP) {
/* Never deQ an APP packet if the iobuf is not empty */
break;
}

/* only deQ when enough room to copy packet */
if ((iobuf->buf_len - iobuf->buf_wrlen) >=
vqec_pak_get_content_len(pak_hdr->pak)) {
Expand Down