Align with neatvnc API changes
parent
7fb2215c0f
commit
52e30e795b
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
10
src/stream.c
10
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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue