mirror of
https://github.com/clearlinux/hyperstart.git
synced 2026-08-27 11:56:04 +00:00
always comsume the date after handle()
even handle() failed. Signed-off-by: Lai Jiangshan <jiangshanlai@gmail.com>
This commit is contained in:
+3
-4
@@ -135,6 +135,7 @@ int hyper_event_read(struct hyper_event *he, int efd)
|
||||
int offset = he->ops->len_offset;
|
||||
int end = offset + 4;
|
||||
int size;
|
||||
int ret;
|
||||
|
||||
fprintf(stdout, "%s\n", __func__);
|
||||
|
||||
@@ -198,12 +199,10 @@ int hyper_event_read(struct hyper_event *he, int efd)
|
||||
}
|
||||
|
||||
/* get and consume the whole data */
|
||||
if (he->ops->handle(he, len) != 0)
|
||||
return -1;
|
||||
|
||||
ret = he->ops->handle(he, len);
|
||||
buf->get = 0;
|
||||
|
||||
return 0;
|
||||
return ret == 0 ? 0 : -1;
|
||||
}
|
||||
|
||||
int hyper_event_write(struct hyper_event *he, int efd)
|
||||
|
||||
Reference in New Issue
Block a user