projects
/
spider.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
add better new user logging in PC92/PC19
[spider.git]
/
cmd
/
show
/
db0sdx.pl
diff --git
a/cmd/show/db0sdx.pl
b/cmd/show/db0sdx.pl
index 5132b2f9fd3a8c1c0e97f522497a2b71180473d0..64c6f3bfdf585534d552a6ffbdb0717c6eabfa30 100644
(file)
--- a/
cmd/show/db0sdx.pl
+++ b/
cmd/show/db0sdx.pl
@@
-13,21
+13,23
@@
sub on_disc
my $conn = shift;
my $dxchan = shift;
my @out;
my $conn = shift;
my $dxchan = shift;
my @out;
+
+# $DB::single = 1;
- $conn->{sdxin} .= $conn->{msg}; # because there will be stuff left in the rx buffer because it isn't \n terminated
dbg("db0sdx in: $conn->{sdxin}") if isdbg('db0sdx');
my ($info) = $conn->{sdxin} =~ m|<qslinfoResult>([^<]*)</qslinfoResult>|;
dbg("db0sdx in: $conn->{sdxin}") if isdbg('db0sdx');
my ($info) = $conn->{sdxin} =~ m|<qslinfoResult>([^<]*)</qslinfoResult>|;
- dbg("info: $info");
+# dbg("db0sdx info: $info");
+ my $prefix = $conn->{prefix} || '';
my @in = split /[\r\n]/, $info if $info;
if (@in && $in[0]) {
my @in = split /[\r\n]/, $info if $info;
if (@in && $in[0]) {
-
dbg("
in qsl");
- push @out, @in;
+
# dbg("db0sdx:
in qsl");
+ push @out,
map {"$prefix$_"}
@in;
} else {
} else {
-
dbg("
in fault");
+
# dbg("db0sdx:
in fault");
($info) = $conn->{sdxin} =~ m|<faultstring>([^<]*)</faultstring>|;
($info) = $conn->{sdxin} =~ m|<faultstring>([^<]*)</faultstring>|;
- push @out,
$info
if $info;
+ push @out,
"$prefix$info"
if $info;
push @out, $dxchan->msg('e3', 'DB0SDX', $conn->{sdxline}) unless @out;
}
$dxchan->send(@out);
push @out, $dxchan->msg('e3', 'DB0SDX', $conn->{sdxline}) unless @out;
}
$dxchan->send(@out);
@@
-38,6
+40,8
@@
sub process
my $conn = shift;
my $msg = shift;
my $conn = shift;
my $msg = shift;
+# $DB::single = 1;
+
$conn->{sdxin} .= "$msg\n";
dbg("db0sdx in: $conn->{sdxin}") if isdbg('db0sdx');
$conn->{sdxin} .= "$msg\n";
dbg("db0sdx in: $conn->{sdxin}") if isdbg('db0sdx');
@@
-68,10
+72,11
@@
sub handle
</qslinfo>
</soap:Body>
</soap:Envelope>);
</qslinfo>
</soap:Body>
</soap:Envelope>);
- my $lth = length($s)+1;
+# $s .= "\n";
+ my $lth = length($s);
Log('call', "$call: show/db0sdx $line");
Log('call', "$call: show/db0sdx $line");
- my $conn = AsyncMsg->post($self, $target,
$port,
"$path$suffix", prefix => 'sdx> ', filter => \&process,
+ my $conn = AsyncMsg->post($self, $target, "$path$suffix", prefix => 'sdx> ', filter => \&process,
'Content-Type' => 'text/xml; charset=utf-8',
'Content-Length' => $lth,
Connection => 'Close',
'Content-Type' => 'text/xml; charset=utf-8',
'Content-Length' => $lth,
Connection => 'Close',
@@
-80,7
+85,7
@@
sub handle
on_disc => \&on_disc);
if ($conn) {
on_disc => \&on_disc);
if ($conn) {
- $conn->{sdx
call
} = $line;
+ $conn->{sdx
line
} = $line;
push @out, $self->msg('m21', "show/db0sdx");
} else {
push @out, $self->msg('e18', 'DB0SDX Database server');
push @out, $self->msg('m21', "show/db0sdx");
} else {
push @out, $self->msg('e18', 'DB0SDX Database server');