mirror of
https://github.com/genodelabs/genode.git
synced 2025-04-08 11:55:24 +00:00
lxip: provide struct file pointer for udp_poll
Lxip may deference the file pointer in 'udp_poll()'. So we provide a valid dummy object. Fixes #1371.
This commit is contained in:
parent
363fd6065d
commit
a36d0ec83a
@ -273,11 +273,17 @@ class Net::Socketcall : public Genode::Signal_dispatcher_base,
|
||||
POLLEX_SET = (POLLPRI)
|
||||
};
|
||||
|
||||
/*
|
||||
* Needed by udp_poll because it may check file->f_flags
|
||||
*/
|
||||
struct file f;
|
||||
f.f_flags = 0;
|
||||
|
||||
/*
|
||||
* Set socket wait queue to one so we can block poll in 'tcp_poll -> poll_wait'
|
||||
*/
|
||||
set_sock_wait(sock, _call.poll.block ? 1 : 0);
|
||||
int mask =sock->ops->poll(0, sock, 0);
|
||||
int mask = sock->ops->poll(&f, sock, 0);
|
||||
set_sock_wait(sock, 0);
|
||||
|
||||
_result.err = 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user