projects
/
spider.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
add logging of PC92A ip addresses
[spider.git]
/
perl
/
AGWMsg.pm
diff --git
a/perl/AGWMsg.pm
b/perl/AGWMsg.pm
index c167d994a883eb7d0433495b512d03582679060d..fdd4bc18314fa3cd5caab58afc0674abec2043a6 100644
(file)
--- a/
perl/AGWMsg.pm
+++ b/
perl/AGWMsg.pm
@@
-46,13
+46,16
@@
$hpolltime = 300 unless defined $hpolltime;
%circuit = ();
$total_in = $total_out = 0;
$lastconnect = 0;
%circuit = ();
$total_in = $total_out = 0;
$lastconnect = 0;
-$connectinterval =
6
0;
+$connectinterval =
3
0;
sub init
{
return unless $enable;
sub init
{
return unless $enable;
- $rproc = shift;
+ # only set $rproc if there is something to set rproc from!
+ my $rp = shift;
+ $rproc = $rp if defined $rp;
+
finish();
dbg("AGW initialising and connecting to $addr/$port ...");
finish();
dbg("AGW initialising and connecting to $addr/$port ...");
@@
-125,6
+128,8
@@
sub _sendf
my $pid = shift || 0;
my $data = shift || '';
my $len = 0;
my $pid = shift || 0;
my $data = shift || '';
my $len = 0;
+
+ return unless $sock;
$len = length $data;
if ($sort eq 'y' || $sort eq 'H') {
$len = length $data;
if ($sort eq 'y' || $sort eq 'H') {