rogue3: allow load and user count checks to be compiled out
This commit is contained in:
parent
3a3594dad7
commit
6188fd3be2
2 changed files with 7 additions and 2 deletions
|
|
@ -428,10 +428,14 @@ too_much()
|
|||
{
|
||||
double avec[3];
|
||||
|
||||
#ifdef MAXLOAD
|
||||
if (md_loadav(avec) == 0)
|
||||
return (avec[2] > (MAXLOAD / 10.0));
|
||||
else
|
||||
return (md_ucount() > MAXUSERS);
|
||||
#endif
|
||||
#ifdef MAXUSERS
|
||||
return (md_ucount() > MAXUSERS);
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue