projects
/
spider.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Now (apparent) apparently working
[spider.git]
/
perl
/
DXUser.pm
diff --git
a/perl/DXUser.pm
b/perl/DXUser.pm
index 3bc4218ce289363e458be4f28fb6e1c14a472a56..3ea1282379eedfde361913de7e50291928bb21e4 100644
(file)
--- a/
perl/DXUser.pm
+++ b/
perl/DXUser.pm
@@
-89,6
+89,8
@@
$v3 = 0;
build => '1,Build',
believe => '1,Believable nodes,parray',
lastping => '1,Last Ping at,ptimelist',
build => '1,Build',
believe => '1,Believable nodes,parray',
lastping => '1,Last Ping at,ptimelist',
+ maxconnect => '1,Max Connections',
+ width => '0,Preferred Width',
);
#no strict;
);
#no strict;
@@
-246,14
+248,15
@@
sub get
# search for it
unless ($dbm->get($call, $data)) {
# search for it
unless ($dbm->get($call, $data)) {
- $ref =
decode($data)
;
+ $ref =
eval{decode($data)}
;
if ($ref) {
if ($ref) {
- if (
ref $ref ne 'DXUser'
) {
- dbg("DXUser::get: got strange answer from decode ". ref $ref. " ignoring");
+ if (
!UNIVERSAL::isa($ref, 'DXUser')
) {
+ dbg("DXUser::get: got strange answer from decode
of $call
". ref $ref. " ignoring");
return undef;
}
return undef;
}
+ # we have a reference and it *is* a DXUser
} else {
} else {
- dbg("DXUser::get: no reference returned from decode
$!
");
+ dbg("DXUser::get: no reference returned from decode
of $call $! $@
");
return undef;
}
$lru->put($call, $ref);
return undef;
}
$lru->put($call, $ref);
@@
-277,9
+280,9
@@
sub get_current
my $dxchan = DXChannel::get($call);
if ($dxchan) {
my $ref = $dxchan->user;
my $dxchan = DXChannel::get($call);
if ($dxchan) {
my $ref = $dxchan->user;
- return $ref if
ref $ref eq 'DXUser'
;
+ return $ref if
$ref && UNIVERSAL::isa($ref, 'DXUser')
;
- dbg("DXUser::get_current: got invalid user ref from dxchan $dxchan->{call} ". ref $ref. " ignoring");
+ dbg("DXUser::get_current: got invalid user ref f
or $call f
rom dxchan $dxchan->{call} ". ref $ref. " ignoring");
}
return get($call);
}
}
return get($call);
}