]> git.pond.sub.org Git - empserver/commitdiff
(prod_nat): Remove non-functional aging code for nat_contact.
authorRon Koenderink <rkoenderink@yahoo.ca>
Fri, 18 Nov 2005 23:23:04 +0000 (23:23 +0000)
committerRon Koenderink <rkoenderink@yahoo.ca>
Fri, 18 Nov 2005 23:23:04 +0000 (23:23 +0000)
Remove nat_contact debugging from server log.

(update_main, prod_nat): Move aging code for nat_contact
from update_main to prod_nat.

src/lib/update/main.c
src/lib/update/nat.c

index c1ebf886a7b3dc942edad329b71ca94383a8d7d0..6fb6957ffb11d1909a79a1cb0368695b9d95e289 100644 (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
        get done for MOB_ACCESS anyway during the update */
     if (!opt_MOB_ACCESS) {
index d213e5e0e3aa7c5b36c7181646da69a2d9e02953..2af5b8f811f3a72f031f55f6faf3c211e20c0304 100644 (file)
@@ -134,7 +134,8 @@ prod_nat(int etu)
     double res[MAXNOC];
     double newvalue;
     natid n;
-    int cn, cont;
+    int cn;
+    struct natstr *cnp;
 
     for (n = 0; NULL != (np = getnatp(n)); n++) {
        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",
           np->nat_money - money[n]);
        if (opt_LOSE_CONTACT) {
-           for (cn = 0; cn <= MAXNOC; cn++) {
-               cont = getcontact(np, cn);
-               if (cont > 0) {
-                   logerror("country %d at level %d with country %d.\n",
-                            n, cont, cn);
-                   setcont(n, cn, cont - 1);
-               }
+           for (cn = 1; cn < MAXNOC; cn++) {
+               if ((cnp = getnatp(cn)) != NULL)
+                   agecontact(cnp);
            }
        }
     }