X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~yarrgweb/git?p=ypp-sc-tools.db-live.git;a=blobdiff_plain;f=yarrg%2Fweb%2Fquery_routesearch;h=b6d543fae1c7c122c72485a36c5bf30146f4505b;hp=587a2b6dc9df0a47c1e8f55192a8f2d96123bb43;hb=757318e3924059c13338aada3b29d668c20f6c36;hpb=01422903688c153437cf6368a58fde42b3125efd diff --git a/yarrg/web/query_routesearch b/yarrg/web/query_routesearch index 587a2b6..b6d543f 100644 --- a/yarrg/web/query_routesearch +++ b/yarrg/web/query_routesearch @@ -52,11 +52,13 @@ my $emsg; my @warningfs; my @islandids; +my $maxmaxdist=35; +my $maxcpu=90; + my $qa= \%ARGS; my $routeparams= { EmsgRef => \$emsg, SayRequiredCapacity => 1 }; my $maxdist; my $maxcountea=10; -my $maxcpu=10; @@ -95,8 +97,8 @@ This feature is not available from the "drop down menus" interface. <%perl> -if (!$emsg && $maxdist > 30) { - $emsg= "Searching for routes of more than 30 leagues is not". +if (!$emsg && $maxdist > $maxmaxdist) { + $emsg= "Searching for routes of more than $maxmaxdist leagues is not". " supported, sorry."; } @@ -152,7 +154,7 @@ my $child= $fh->open("-|"); defined $child or die $!; if (!$child) { my $cpu= BSD::Resource::RLIMIT_CPU; my ($soft,$hard)= getrlimit($cpu); - setrlimit($cpu,$maxcpu,$hard) or die $! if $soft>$maxcpu; + setrlimit($cpu,$maxcpu,$hard) or die $! if $hard<=$maxcpu; exec @rsargs; die $!; }