Preparations for the ICM nodelist flag (FSP-1033)

This commit is contained in:
Michiel Broek 2004-06-06 18:52:23 +00:00
parent 0c5338827d
commit 6821fd7c44
3 changed files with 22 additions and 5 deletions

View File

@ -2,6 +2,10 @@ $Id$
v0.61.0 06-Jun-2004. v0.61.0 06-Jun-2004.
libnodelist.a:
Prepared for ICM flag (FSP-1033).
mbmsg: mbmsg:
With te post command, the right number of commandline options With te post command, the right number of commandline options
is checked, if this is wrong the help message is displayed. is checked, if this is wrong the help message is displayed.
@ -10,6 +14,13 @@ v0.61.0 06-Jun-2004.
Added checks in the mbmsg post command if the To parameter has Added checks in the mbmsg post command if the To parameter has
the correct syntax for netmail and all other areas. the correct syntax for netmail and all other areas.
mbout:
Prepared for ICM flag (FSP-1033).
mbcico:
Prepared for ICM flag (FSP-1033).
v0.60.0 09-Feb-2004 - 04-Jun-2004 v0.60.0 09-Feb-2004 - 04-Jun-2004

View File

@ -1097,7 +1097,7 @@ node *getnlent(faddr *addr)
// moflags(nodebuf.mflags); // moflags(nodebuf.mflags);
// diflags(nodebuf.dflags); // diflags(nodebuf.dflags);
// ipflags(nodebuf.iflags); // ipflags(nodebuf.iflags);
// olflags(nodebuf.oflags); olflags(nodebuf.oflags);
// rqflags(nodebuf.xflags); // rqflags(nodebuf.xflags);
free(mydomain); free(mydomain);
@ -1229,14 +1229,20 @@ void ipflags(unsigned long flags)
unsigned long getCMmask(void) unsigned long getCMmask(void)
{ {
nodelist_flag **tmpm; nodelist_flag **tmpm;
static unsigned long mask = 0L;
for (tmpm = &nl_online; *tmpm; tmpm=&((*tmpm)->next)) { for (tmpm = &nl_online; *tmpm; tmpm=&((*tmpm)->next)) {
if (strcmp("CM", (*tmpm)->name) == 0) { if (strcmp("CM", (*tmpm)->name) == 0) {
return (*tmpm)->value; mask &= (*tmpm)->value;
}
if (strcmp("ICM", (*tmpm)->name) == 0) {
mask &= (*tmpm)->value;
} }
} }
if (mask)
return mask;
WriteError("CM mask not found in %s/etc/nodelist.conf", getenv("MBSE_ROOT")); WriteError("CM and ICM mask not found in %s/etc/nodelist.conf", getenv("MBSE_ROOT"));
return 0; return 0;
} }

View File

@ -512,7 +512,7 @@ int pollnode(faddr *addr, int stop)
} else { } else {
fclose(fp); fclose(fp);
cmmask = getCMmask(); cmmask = getCMmask();
Syslog('s', "oflags %08x cmmask %08x", nlent->oflags, cmmask); Syslog('s', "oflags %08x (i)cmmask %08x", nlent->oflags, cmmask);
if (((nlent->oflags & cmmask) == 0) && (!IsZMH())) { if (((nlent->oflags & cmmask) == 0) && (!IsZMH())) {
Syslog('+', "Created poll for %s, non-CM node outside ZMH", ascfnode(addr, 0x1f)); Syslog('+', "Created poll for %s, non-CM node outside ZMH", ascfnode(addr, 0x1f));
if (!do_quiet) if (!do_quiet)