ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/lib/cf.pm
(Generate patch)

Comparing deliantra/server/lib/cf.pm (file contents):
Revision 1.200 by root, Mon Jan 29 17:57:22 2007 UTC vs.
Revision 1.202 by root, Mon Jan 29 20:16:28 2007 UTC

1079=cut 1079=cut
1080 1080
1081sub maps($) { 1081sub maps($) {
1082 my ($pl) = @_; 1082 my ($pl) = @_;
1083 1083
1084 $pl = ref $pl ? $pl->ob->name : $pl;
1085
1084 my $files = aio_readdir playerdir $pl 1086 my $files = aio_readdir playerdir $pl
1085 or return; 1087 or return;
1086 1088
1087 my @paths; 1089 my @paths;
1088 1090
1089 for (@$files) { 1091 for (@$files) {
1090 utf8::decode $_; 1092 utf8::decode $_;
1091 next if /\.(?:pl|pst)$/; 1093 next if /\.(?:pl|pst)$/;
1092 next unless /^$PATH_SEP/o; 1094 next unless /^$PATH_SEP/o;
1093 1095
1094 push @paths, cf::map::normalise "~" . $pl->ob->name . "/" . $_; 1096 push @paths, cf::map::normalise "~$pl/$_";
1095 } 1097 }
1096 1098
1097 \@paths 1099 \@paths
1098} 1100}
1099 1101
2001 # get handled first 2003 # get handled first
2002 my $queue = delete $ns->{query_queue} 2004 my $queue = delete $ns->{query_queue}
2003 or return; # be conservative, not sure how that can happen, but we saw a crash here 2005 or return; # be conservative, not sure how that can happen, but we saw a crash here
2004 2006
2005 (shift @$queue)->[1]->($msg); 2007 (shift @$queue)->[1]->($msg);
2008 return unless $ns->valid; # temporary(?) workaround for callback destroying socket
2006 2009
2007 push @{ $ns->{query_queue} }, @$queue; 2010 push @{ $ns->{query_queue} }, @$queue;
2008 2011
2009 if (@{ $ns->{query_queue} } == @$queue) { 2012 if (@{ $ns->{query_queue} } == @$queue) {
2010 if (@$queue) { 2013 if (@$queue) {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines