Return error from update when there are no pending clients
parent
7d4af0e741
commit
8973ce5637
|
@ -821,6 +821,8 @@ void on_client_update_fb_done(uv_work_t *work, int status)
|
||||||
if (--server->n_pending_updates == 0)
|
if (--server->n_pending_updates == 0)
|
||||||
if (update->on_done)
|
if (update->on_done)
|
||||||
update->on_done(server);
|
update->on_done(server);
|
||||||
|
|
||||||
|
assert(server->n_pending_updates >= 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
int schedule_client_update_fb(struct nvnc_client *client,
|
int schedule_client_update_fb(struct nvnc_client *client,
|
||||||
|
@ -902,7 +904,7 @@ int nvnc_update_fb(struct nvnc *self, const struct nvnc_fb *fb,
|
||||||
schedule_client_update_fb(client, fb, ®ion, on_update_done);
|
schedule_client_update_fb(client, fb, ®ion, on_update_done);
|
||||||
}
|
}
|
||||||
|
|
||||||
rc = 0;
|
rc = self->n_pending_updates > 0 ? 0 : -1;
|
||||||
failure:
|
failure:
|
||||||
pixman_region_fini(®ion);
|
pixman_region_fini(®ion);
|
||||||
return rc;
|
return rc;
|
||||||
|
|
Loading…
Reference in New Issue