[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[or-cvs] Actually set is_hibernating when parsing router descriptors.



Update of /home/or/cvsroot/tor/src/or
In directory moria:/tmp/cvs-serv2352/src/or

Modified Files:
	routerparse.c 
Log Message:
Actually set is_hibernating when parsing router descriptors.

Index: routerparse.c
===================================================================
RCS file: /home/or/cvsroot/tor/src/or/routerparse.c,v
retrieving revision 1.122
retrieving revision 1.123
diff -u -d -r1.122 -r1.123
--- routerparse.c	26 Aug 2005 15:34:53 -0000	1.122
+++ routerparse.c	30 Aug 2005 15:04:24 -0000	1.123
@@ -968,6 +968,15 @@
     }
   }
 
+  if ((tok = find_first_by_keyword(tokens, K_HIBERNATING))) {
+    if (tok->n_args < 1) {
+      log_fn(LOG_WARN, "Too few args on 'hibernating' keyword. Skipping.");
+    } else {
+      router->is_hibernating
+        = (tor_parse_long(tok->args[0],10,0,LONG_MAX,NULL,NULL) != 0);
+    }
+  }
+
   if (!(tok = find_first_by_keyword(tokens, K_PUBLISHED))) {
     log_fn(LOG_WARN, "Missing published time"); goto err;
   }