+use vars qw($VERSION $BRANCH);
+$VERSION = sprintf( "%d.%03d", q$Revision$ =~ /(\d+)\.(\d+)/ );
+$BRANCH = sprintf( "%d.%03d", q$Revision$ =~ /\d+\.\d+\.(\d+)\.(\d+)/ ) || 0;
+$main::build += $VERSION;
+$main::branch += $BRANCH;
+
$sock = IO::Socket::INET->new(PeerAddr => $addr, PeerPort => $port, Proto=>'tcp', Timeout=>15);
unless ($sock) {
$sock = IO::Socket::INET->new(PeerAddr => $addr, PeerPort => $port, Proto=>'tcp', Timeout=>15);
unless ($sock) {
}
push @outqueue, pack('C x3 a1 x1 C x1 a10 a10 V x4 a*', $port, $sort, $pid, $from, $to, $len, $data);
Msg::set_event_handler($sock, write=>\&_send);
}
push @outqueue, pack('C x3 a1 x1 C x1 a10 a10 V x4 a*', $port, $sort, $pid, $from, $to, $len, $data);
Msg::set_event_handler($sock, write=>\&_send);
Msg::set_event_handler($sock, read=>undef, write=>undef, error=>undef);
$sock = undef;
for (%circuit) {
Msg::set_event_handler($sock, read=>undef, write=>undef, error=>undef);
$sock = undef;
for (%circuit) {
my $conn = _find($from eq $main::mycall ? $to : $from);
if ($conn) {
if ($conn->{state} eq 'WC') {
if (exists $conn->{cmd}) {
if (@{$conn->{cmd}}) {
my $conn = _find($from eq $main::mycall ? $to : $from);
if ($conn) {
if ($conn->{state} eq 'WC') {
if (exists $conn->{cmd}) {
if (@{$conn->{cmd}}) {
}
} elsif ($sort eq 'I' || $sort eq 'S' || $sort eq 'U' || $sort eq 'M' || $sort eq 'T') {
my $d = unpack "Z*", $data;
}
} elsif ($sort eq 'I' || $sort eq 'S' || $sort eq 'U' || $sort eq 'M' || $sort eq 'T') {
my $d = unpack "Z*", $data;
my $conn = _find($from);
$conn->{oframes} = $frames if $conn;
} elsif ($sort eq 'Y') {
my ($frames) = unpack "V", $data;
my $conn = _find($from);
$conn->{oframes} = $frames if $conn;
} elsif ($sort eq 'Y') {
my ($frames) = unpack "V", $data;
my $conn = _find($from eq $main::mycall ? $to : $from);
$conn->{oframes} = $frames if $conn;
} elsif ($sort eq 'H') {
unless ($from =~ /^\s+$/) {
my $d = unpack "Z*", $data;
$d =~ s/\cM$//;
my $conn = _find($from eq $main::mycall ? $to : $from);
$conn->{oframes} = $frames if $conn;
} elsif ($sort eq 'H') {
unless ($from =~ /^\s+$/) {
my $d = unpack "Z*", $data;
$d =~ s/\cM$//;
}
} elsif ($sort eq 'X') {
my ($r) = unpack "C", $data;
$r = $r ? "Successful" : "Failed";
}
} elsif ($sort eq 'X') {
my ($r) = unpack "C", $data;
$r = $r ? "Successful" : "Failed";
} elsif ($sort eq 'G') {
my @ports = split /;/, $data;
$noports = shift @ports || '0';
} elsif ($sort eq 'G') {
my @ports = split /;/, $data;
$noports = shift @ports || '0';
}
for (my $i = 0; $i < $noports; $i++) {
_sendf('y', undef, undef, $i);
}
for (my $i = 0; $i < $noports; $i++) {
_sendf('y', undef, undef, $i);
# _sendf('Y', $main::mycall, $conn->{call}, $conn->{agwport}, $conn->{agwpid});
_sendf('D', $main::mycall, $conn->{agwcall}, $conn->{agwport}, $conn->{agwpid}, $msg . $conn->{lineend});
my $len = length($msg) + 1;
# _sendf('Y', $main::mycall, $conn->{call}, $conn->{agwport}, $conn->{agwpid});
_sendf('D', $main::mycall, $conn->{agwcall}, $conn->{agwport}, $conn->{agwpid}, $msg . $conn->{lineend});
my $len = length($msg) + 1;