(prod_nat): Remove non-functional aging code for nat_contact.

Remove nat_contact debugging from server log.

(update_main, prod_nat): Move aging code for nat_contact
from update_main to prod_nat.
This commit is contained in:
Ron Koenderink 2005-11-18 23:23:04 +00:00
parent 974af7130c
commit ac25058b50
2 changed files with 5 additions and 15 deletions

View file

@ -179,13 +179,6 @@ update_main(void *unused)
} }
} }
} }
/* Age contact */
if (opt_LOSE_CONTACT) {
for (cn = 1; cn < MAXNOC; cn++) {
if ((cnp = getnatp(cn)) != NULL)
agecontact(cnp);
}
}
/* Only update mobility for non-MOB_ACCESS here, since it doesn't /* Only update mobility for non-MOB_ACCESS here, since it doesn't
get done for MOB_ACCESS anyway during the update */ get done for MOB_ACCESS anyway during the update */
if (!opt_MOB_ACCESS) { if (!opt_MOB_ACCESS) {

View file

@ -134,7 +134,8 @@ prod_nat(int etu)
double res[MAXNOC]; double res[MAXNOC];
double newvalue; double newvalue;
natid n; natid n;
int cn, cont; int cn;
struct natstr *cnp;
for (n = 0; NULL != (np = getnatp(n)); n++) { for (n = 0; NULL != (np = getnatp(n)); n++) {
if ((np->nat_stat & STAT_NORM) == 0) if ((np->nat_stat & STAT_NORM) == 0)
@ -215,13 +216,9 @@ prod_nat(int etu)
wu((natid)0, n, "money delta was $%ld for this update\n", wu((natid)0, n, "money delta was $%ld for this update\n",
np->nat_money - money[n]); np->nat_money - money[n]);
if (opt_LOSE_CONTACT) { if (opt_LOSE_CONTACT) {
for (cn = 0; cn <= MAXNOC; cn++) { for (cn = 1; cn < MAXNOC; cn++) {
cont = getcontact(np, cn); if ((cnp = getnatp(cn)) != NULL)
if (cont > 0) { agecontact(cnp);
logerror("country %d at level %d with country %d.\n",
n, cont, cn);
setcont(n, cn, cont - 1);
}
} }
} }
} }