server/: Rename `TIMER' to `QUICKRAND'.
authorMark Wooding <mdw@distorted.org.uk>
Sat, 4 Jun 2016 15:31:10 +0000 (16:31 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Sat, 4 Jun 2016 15:31:10 +0000 (16:31 +0100)
The purpose of the `TIMER' is to feed the entropy a small quantity of
entropy on a regular basis.  Encoding the implementation in the name was
an error which this commit fixes.

server/admin.c
server/peer.c
server/tripe.h

index b25e511..3257c7d 100644 (file)
@@ -1013,7 +1013,7 @@ static void a_resolved(struct hostent *h, void *v)
   admin_resop *r = v;
 
   T( trace(T_ADMIN, "admin: resop %s resolved", BGTAG(r)); )
-  TIMER;
+  QUICKRAND;
   if (!h) {
     a_bgfail(&r->bg, "resolve-error", "%s", r->addr, A_END);
     r->func(r, ARES_FAIL);
@@ -2155,7 +2155,7 @@ static void a_line(char *p, size_t len, void *vp)
   char *av[16 + 1];
   size_t ac;
 
-  TIMER;
+  QUICKRAND;
   if (a->f & AF_DEAD)
     return;
   if (!p) {
index 06dd33d..57891e7 100644 (file)
@@ -313,7 +313,7 @@ static void p_read(int fd, unsigned mode, void *v)
 
   /* --- Read the data --- */
 
-  TIMER;
+  QUICKRAND;
   sz = sizeof(addr);
   n = recvfrom(fd, buf_i, sizeof(buf_i), 0, &a.sa, &sz);
   if (n < 0) {
@@ -658,7 +658,7 @@ void p_tun(peer *p, buf *b)
 {
   buf *bb = p_txstart(p, MSG_PACKET);
 
-  TIMER;
+  QUICKRAND;
   p_encrypt(p, MSG_PACKET, b, bb);
   if (BOK(bb) && BLEN(bb)) {
     p->st.n_ipout++;
index d419c28..9e298c8 100644 (file)
@@ -576,7 +576,7 @@ extern unsigned tr_flags;           /* Trace options flags */
 
 /*----- Other macros ------------------------------------------------------*/
 
-#define TIMER noise_timer(RAND_GLOBAL)
+#define QUICKRAND noise_timer(RAND_GLOBAL)
 
 /*----- Key management ----------------------------------------------------*/