X-Git-Url: http://dxcluster.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=perl%2FDXProtout.pm;h=ec9abaa0b0f2c41e945fd205bb24c6dc7dc883e5;hb=2c50f9b4b2b3f29b000d77623a9d7c3748933aef;hp=c024724f44ee51f8ac48d5f092c6a85dbdae41d2;hpb=3065f0dd2c80cd59b7a2b17d397a343b6521b1f4;p=spider.git diff --git a/perl/DXProtout.pm b/perl/DXProtout.pm index c024724f..ec9abaa0 100644 --- a/perl/DXProtout.pm +++ b/perl/DXProtout.pm @@ -19,7 +19,7 @@ use DXDebug; use strict; -use vars qw($sentencelth); +use vars qw($sentencelth $pc19_version); $sentencelth = 180; @@ -137,6 +137,8 @@ sub pc19 my $here = $ref->here; my $conf = $ref->conf; my $version = $ref->version; + $version = $pc19_version unless $version =~ /^\d\d\d\d$/; + my $str = "^$here^$call^$conf^$version"; if (length($s) + length($str) > $sentencelth) { push @out, "PC19" . $s . sprintf "^%s^", get_hops(19); @@ -378,6 +380,7 @@ sub _gen_pc92 my $s = "PC92^$main::mycall^" . gen_pc9x_t() . "^$sort"; for (@_) { $s .= "^" . _encode_pc92_call($_, $ext); + $ext = 0; # only the first slot has an ext. } return $s . '^H99^'; } @@ -413,6 +416,12 @@ sub pc92c return _gen_pc92('C', 1, @_); } +# send a keep alive +sub pc92k +{ + return _gen_pc92('K', 1, @_); +} + # send a 'find' message sub pc92f {