Incommunique

Powered by a whole foods plant based diet, a well dressed penguin and an over-active imagination

VNC Server patch

A quick and dirty patch I wrote for the vncserver because it wasn’t telling me why it was failing.

$ diff -c vncserver /usr/local/bin/vncserver
*** vncserver Tue Jul 5 14:41:27 2005
— /usr/local/bin/vncserver Tue Jul 5 14:39:15 2005
************
264,271 *
socket(S, $AF_INET, $SOCK_STREAM, 0) || die “$prog: socket failed: $!\n”;
eval ‘setsockopt(S, &SOL_SOCKET, &SO_REUSEADDR, pack(“l”, 1))‘;
if (!bind(S, pack(’S n x12’, $AF_INET, 6000 + $n))) {
- my $port = 6000 + $n;
- warn “Could not setsockopt on port $port\n”;
close(S);
return 0;
}
— 264,269 —-
*********
274,281 ****
socket(S, $AF_INET, $SOCK_STREAM, 0) || die “$prog: socket failed: $!\n”;
eval ‘setsockopt(S, &SOL_SOCKET, &SO_REUSEADDR, pack(“l”, 1))‘;
if (!bind(S, pack(’S n x12’, $AF_INET, 5900 + $n))) {
- my $port = 5900 + $n;
- warn “Could not setsockopt on port $port\n”;
close(S);
return 0;
}
— 272,277 —-


Share