diff --git a/examples/draw.c b/examples/draw.c index 418a9d4..2db2e30 100644 --- a/examples/draw.c +++ b/examples/draw.c @@ -138,7 +138,7 @@ int main(int argc, char* argv[]) memset(addr, 0xff, width * height * 4); - struct aml* aml = aml_new(NULL, 0); + struct aml* aml = aml_new(); aml_set_default(aml); struct nvnc* server = nvnc_open("127.0.0.1", 5900); diff --git a/examples/png-server.c b/examples/png-server.c index 054ad33..2f623df 100644 --- a/examples/png-server.c +++ b/examples/png-server.c @@ -44,7 +44,7 @@ int main(int argc, char* argv[]) return 1; } - struct aml* aml = aml_new(NULL, 0); + struct aml* aml = aml_new(); aml_set_default(aml); struct nvnc* server = nvnc_open("127.0.0.1", 5900); diff --git a/src/stream.c b/src/stream.c index 6916cad..25a29fe 100644 --- a/src/stream.c +++ b/src/stream.c @@ -41,17 +41,17 @@ static int stream__try_tls_accept(struct stream* self); static inline void stream__poll_r(struct stream* self) { - aml_set_event_mask(self->handler, POLLIN); + aml_set_event_mask(self->handler, AML_EVENT_READ); } static inline void stream__poll_w(struct stream* self) { - aml_set_event_mask(self->handler, POLLOUT); + aml_set_event_mask(self->handler, AML_EVENT_WRITE); } static inline void stream__poll_rw(struct stream* self) { - aml_set_event_mask(self->handler, POLLIN | POLLOUT); + aml_set_event_mask(self->handler, AML_EVENT_READ | AML_EVENT_WRITE); } static void stream_req__finish(struct stream_req* req, @@ -267,10 +267,10 @@ static void stream__on_event(void* obj) struct stream* self = aml_get_userdata(obj); uint32_t events = aml_get_revents(obj); - if (events & POLLIN) + if (events & AML_EVENT_READ) stream__on_readable(self); - if (events & POLLOUT) + if (events & AML_EVENT_WRITE) stream__on_writable(self); }