Add the check on req.status to show users invalid requests.
Signed-off-by: Yang Shen shenyang39@huawei.com --- wd_zlibwrapper.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/wd_zlibwrapper.c b/wd_zlibwrapper.c index 7189b7f..afa8ee7 100644 --- a/wd_zlibwrapper.c +++ b/wd_zlibwrapper.c @@ -236,8 +236,8 @@ static int wd_zlib_do_request(z_streamp strm, int flush, enum wd_comp_op_type ty req.last = (flush == Z_FINISH) ? 1 : 0;
ret = wd_do_comp_strm(h_sess, &req); - if (unlikely(ret)) { - WD_ERR("failed to do compress(%d)!\n", ret); + if (unlikely(ret || req.status == WD_IN_EPARA)) { + WD_ERR("failed to do compress, ret = %d, req.status = %u!\n", ret, req.status); return Z_STREAM_ERROR; }