Commit 4c15a85
libvncclient: fix the fork()ing listening for incoming connections
listenForIncomingConnections() uses a socket declared as a local variable, whereas accepting
used an uninitialized client member variable. Note that the use of a
local variable is necessary because the pointer to the client is invalid
in the child process.
The problem was highlighted with x11vnc when running a VNC repeater
(x11vnc -reflect listen:5500) waiting for an incoming connection from a
VNC server (x11vnc -connect IP.ADDRESS.OF.REPEATER). When an incoming
connection request was submitted, the repeater did not accept it and
returned an error.
The regression was introduced by 75bfb1f
Co-authored-by: Vincent Forest <vincent.forest@meso-star.com>1 parent e64fa92 commit 4c15a85
1 file changed
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
103 | 103 | | |
104 | 104 | | |
105 | 105 | | |
106 | | - | |
| 106 | + | |
107 | 107 | | |
108 | | - | |
| 108 | + | |
109 | 109 | | |
110 | 110 | | |
111 | 111 | | |
| |||
0 commit comments