+10Jan02=======================================================================
+1. set SO_LINGER = 0 to try to prevent the system sending data on a closing
+socket. This MAY help some of the hanging problems.
08Jan02=======================================================================
1. altered sh/qrz to point to the new server
2. alter the character set handling a bit to make it better for spanish
* write a parallel event driven system for helper routines
* handle distros in announces
* check set/homenode et al input for proper callsigns
+* filter names and stuff so that it doesn't cause bad syntax in user_asc
New Protocol Stuff
------------------
delete $conn->{cmd};
$conn->{timeout}->del if $conn->{timeout};
delete $conn->{timeout};
+ $conn->nolinger;
&{$conn->{rproc}}($conn, "$dir$call|$sort");
$conn->_send_file("$main::data/connected") unless $conn->{outgoing};
}
if ($sock) {
my $conn = $server_conn->new($server_conn->{rproc});
$conn->{sock} = $sock;
+ $conn->nolinger;
Msg::blocking($sock, 0);
$conn->{blocking} = 0;
eval {$conn->{peerhost} = $sock->peerhost};
$call ||= 'unallocated';
dbg("Connection $conn->{cnum} $call disconnected") if isdbg('connll');
- unless ($main::is_win) {
- kill 'TERM', $conn->{pid} if exists $conn->{pid};
- }
-
# get rid of any references
for (keys %$conn) {
if (ref($conn->{$_})) {
}
}
- return unless defined($sock);
- set_event_handler ($sock, read => undef, write => undef, error => undef);
- shutdown($sock, 3);
- close($sock);
+ if (defined($sock)) {
+ set_event_handler ($sock, read => undef, write => undef, error => undef);
+ shutdown($sock, 3);
+ close($sock);
+ }
+
+ unless ($main::is_win) {
+ kill 'TERM', $conn->{pid} if exists $conn->{pid};
+ }
+
}
sub send_now {
return $self;
}
+sub nolinger
+{
+ my $conn = shift;
+ setsockopt($conn->{sock}, SOL_SOCKET, SO_LINGER, pack("ll", 0, 0)) or confess "setsockopt: $!";
+}
+
sub dequeue
{
my $conn = shift;
my $conn = $server_conn->new($server_conn->{rproc});
$conn->{sock} = $sock;
blocking($sock, 0);
+ $conn->nolinger;
$conn->{blocking} = 0;
my ($rproc, $eproc) = &{$server_conn->{rproc}} ($conn, $conn->{peerhost} = $sock->peerhost(), $conn->{peerport} = $sock->peerport());
$conn->{sort} = 'Incoming';