X-Git-Url: http://dxcluster.net/gitweb/gitweb.cgi?a=blobdiff_plain;f=perl%2FDXProtHandle.pm;h=d4ef2c1d849b40fe46abbe03a3c5a9753ca658c5;hb=7bb8e1e37a19c197b2bc1f47a6ee07bccb368b74;hp=b5a8bcdcda89c0a085b9c21452cc012140f245d2;hpb=b58ca3b5845f03a444f401ba5fdc1d054f853492;p=spider.git diff --git a/perl/DXProtHandle.pm b/perl/DXProtHandle.pm index b5a8bcdc..d4ef2c1d 100644 --- a/perl/DXProtHandle.pm +++ b/perl/DXProtHandle.pm @@ -598,24 +598,32 @@ sub handle_18 my $parent = Route::Node::get($self->{call}); # record the type and version offered - if ($_[1] =~ /DXSpider Version: (\d+\.\d+) Build: (\d+(?:\.\d+)?)/) { - $self->{version} = 53 + $1; - $self->user->version(53 + $1); - $parent->version(0 + $1); - $self->{build} = 0 + $2; - $self->user->build(0 + $2); - $parent->build(0 + $2); + if (my ($version) = $_[1] =~ /DXSpider Version: (\d+\.\d+)/) { + $self->{version} = 53 + $version; + $self->user->version(53 + $version); + $parent->version(0 + $version); + my ($build) = $_[1] =~ /Build: (\d+(?:\.\d+)?)/; + $self->{build} = 0 + $build; + $self->user->build(0 + $build); + $parent->build(0 + $build); + dbg("DXSpider version $version build $build"); unless ($self->is_spider) { + dbg("Change U " . $self->user->sort . " C $self->{sort} -> S"); $self->user->sort('S'); $self->user->put; $self->sort('S'); } - $self->{handle_xml}++ if DXXml::available() && $_[1] =~ /\bxml/; +# $self->{handle_xml}++ if DXXml::available() && $_[1] =~ /\bxml/; if ($_[1] =~ /\bpc9x/) { - $self->{do_pc9x} = 1; - dbg("Do px9x set on $self->{call}"); + if ($self->{isolate}) { + dbg("pc9x recognised, but is isolated, using old protocol"); + } else { + $self->{do_pc9x} = 1; + dbg("Do px9x set on $self->{call}"); + } } } else { + dbg("Unknown software"); $self->version(50.0); $self->version($_[2] / 100) if $_[2] && $_[2] =~ /^\d+$/; $self->user->version($self->version); @@ -787,10 +795,8 @@ sub handle_20 my $origin = shift; if ($self->{do_pc9x} && $self->{state} ne 'init92') { - dbg("PCPROT: disconnecting because login call not sent in any pc92") if isdbg('chanerr'); - $self->send("**** You logged in with $self->{call} but that is NOT your \$mycall"); - $self->disconnect; - return; + $self->send("Reseting to oldstyle routing because login call not sent in any pc92"); + $self->{do_pc9x} = 0; } $self->send_local_config; $self->send(pc22()); @@ -878,10 +884,8 @@ sub handle_22 if ($self->{do_pc9x}) { if ($self->{state} ne 'init92') { - dbg("PCPROT: disconnecting because login call not sent in any pc92") if isdbg('chanerr'); - $self->send("**** You logged in with $self->{call} but that is NOT your \$mycall"); - $self->disconnect; - return; + $self->send("Reseting to oldstyle routing because login call not sent in any pc92"); + $self->{do_pc9x} = 0; } } $self->{lastping} = 0;