reject: New enum rej_comm for REJ_TELE & friends

Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
This commit is contained in:
Markus Armbruster 2016-10-31 11:44:04 +01:00
parent 9d153f547c
commit 4628661b40
6 changed files with 28 additions and 19 deletions

View file

@ -132,15 +132,15 @@ setcont(natid us, natid them, int contact)
}
void
setrej(natid us, natid them, int how, int what)
setrej(natid us, natid them, int reject, enum rej_comm what)
{
struct natstr *np = getnatp(us);
if (CANT_HAPPEN(!np))
return;
if (how)
np->nat_rejects[them] |= what;
if (reject)
np->nat_rejects[them] |= bit(what);
else
np->nat_rejects[them] &= ~what;
np->nat_rejects[them] &= ~bit(what);
putnat(np);
}