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

[or-cvs] Normalize whitespace; add a "tell me about all the unnormal...



Update of /home/or/cvsroot/src/or
In directory moria.mit.edu:/tmp/cvs-serv28856/src/or

Modified Files:
	config.c connection.c connection_edge.c directory.c dirserv.c 
	hibernate.c main.c or.h relay.c rendclient.c rendcommon.c 
	rendmid.c rephist.c router.c routerlist.c routerparse.c test.c 
Log Message:
Normalize whitespace; add a "tell me about all the unnormalized whitespace" target; fix a braino in dirserv.c

Index: config.c
===================================================================
RCS file: /home/or/cvsroot/src/or/config.c,v
retrieving revision 1.237
retrieving revision 1.238
diff -u -d -r1.237 -r1.238
--- config.c	9 Nov 2004 18:22:16 -0000	1.237
+++ config.c	9 Nov 2004 20:04:00 -0000	1.238
@@ -765,7 +765,7 @@
   }
 }
 
-/** Set <b>options</b>-&gt;DirServers to contain the default directory 
+/** Set <b>options</b>-&gt;DirServers to contain the default directory
  * servers. */
 static void
 add_default_trusted_dirservers(or_options_t *options)
@@ -1317,7 +1317,6 @@
   return r;
 }
 
-
 /** Read a configuration file into <b>options</b>, finding the configuration
  * file location based on the command line.  After loading the options,
  * validate them for consistency, then take actions based on them.
@@ -1840,7 +1839,6 @@
   return r;
 }
 
-
 /** Adjust or the value of options->DataDirectory, or fill it in if it's
  * absent. Return 0 on success, -1 on failure. */
 static int
@@ -1894,7 +1892,6 @@
   return 0;
 }
 
-
 /*
   Local Variables:
   mode:c

Index: connection.c
===================================================================
RCS file: /home/or/cvsroot/src/or/connection.c,v
retrieving revision 1.284
retrieving revision 1.285
diff -u -d -r1.284 -r1.285
--- connection.c	7 Nov 2004 01:33:05 -0000	1.284
+++ connection.c	9 Nov 2004 20:04:00 -0000	1.285
@@ -405,7 +405,7 @@
       return 0;
     }
     /* else there was a real error. */
-    log_fn(LOG_WARN,"accept() failed: %s. Closing listener.", 
+    log_fn(LOG_WARN,"accept() failed: %s. Closing listener.",
            tor_socket_strerror(e));
     connection_mark_for_close(conn);
     return -1;
@@ -570,7 +570,7 @@
   }
 }
 
-/** 
+/**
  * Launch any configured listener connections of type <b>type</b>.  (A
  * listener is configured if <b>port_option</b> is non-zero.  If any
  * BindAddress configuration options are given in <b>cfg</b>, create a
@@ -578,7 +578,7 @@
  * connection binding to the address <b>default_addr</b>.)
  *
  * If <b>force</b> is true, close and re-open all listener connections.
- * Otherwise, only relaunch the listeners of this type if the number of 
+ * Otherwise, only relaunch the listeners of this type if the number of
  * existing connections is not as configured (e.g., because one died).
  */
 static int retry_listeners(int type, struct config_line_t *cfg,

Index: connection_edge.c
===================================================================
RCS file: /home/or/cvsroot/src/or/connection_edge.c,v
retrieving revision 1.227
retrieving revision 1.228
diff -u -d -r1.227 -r1.228
--- connection_edge.c	9 Nov 2004 18:22:16 -0000	1.227
+++ connection_edge.c	9 Nov 2004 20:04:00 -0000	1.228
@@ -203,7 +203,6 @@
   tor_assert(conn->type == CONN_TYPE_EXIT);
   tor_assert(conn->state == EXIT_CONN_STATE_CONNECTING);
 
-
   log_fn(LOG_INFO,"Exit connection to %s:%u established.",
          conn->address,conn->port);
 
@@ -858,7 +857,6 @@
   assert_circuit_ok(circ);
   relay_header_unpack(&rh, cell->payload);
 
-
   /* This 'dummy_conn' only exists to remember the stream ID
    * associated with the resolve request; and to make the
    * implementation of dns.c more uniform.  (We really only need to
@@ -880,7 +878,7 @@
   /* send it off to the gethostbyname farm */
   switch(dns_resolve(dummy_conn)) {
     case 1: /* The result was cached; a resolved cell was sent. */
-    case -1: 
+    case -1:
       circuit_detach_stream(circuit_get_by_conn(dummy_conn), dummy_conn);
       connection_free(dummy_conn);
       return 0;
@@ -1203,7 +1201,6 @@
   strmap_foreach(client_dns_map, (strmap_foreach_fn)_remove_if_expired, &now);
 }
 
-
 /** Make connection redirection follow the provided list of
  * exit_redirect_t */
 void

Index: directory.c
===================================================================
RCS file: /home/or/cvsroot/src/or/directory.c,v
retrieving revision 1.161
retrieving revision 1.162
diff -u -d -r1.161 -r1.162
--- directory.c	7 Nov 2004 01:33:06 -0000	1.161
+++ directory.c	9 Nov 2004 20:04:00 -0000	1.162
@@ -178,7 +178,6 @@
     log_fn(LOG_WARN,"No running dirservers known. Not trying. (purpose %d)", purpose);
 }
 
-
 /** Launch a new connection to the directory server <b>router</b> to upload or
  * download a service or rendezvous descriptor. <b>purpose</b> determines what
  * kind of directory connection we're launching, and must be one of
@@ -755,7 +754,7 @@
       return 0;
     }
 
-    log_fn(LOG_DEBUG,"Dumping %sdirectory to client.", 
+    log_fn(LOG_DEBUG,"Dumping %sdirectory to client.",
            deflated?"deflated ":"");
     format_rfc1123_time(date, time(NULL));
     tor_snprintf(tmp, sizeof(tmp), "HTTP/1.0 200 OK\r\nDate: %s\r\nContent-Length: %d\r\nContent-Type: text/plain\r\nContent-Encoding: %s\r\n\r\n",

Index: dirserv.c
===================================================================
RCS file: /home/or/cvsroot/src/or/dirserv.c,v
retrieving revision 1.117
retrieving revision 1.118
diff -u -d -r1.117 -r1.118
--- dirserv.c	9 Nov 2004 18:22:16 -0000	1.117
+++ dirserv.c	9 Nov 2004 20:04:00 -0000	1.118
@@ -119,7 +119,7 @@
              nickname, fingerprint);
       continue;
     }
-    if (0==strcasecmp(ent->nickname, DEFAULT_CLIENT_NICKNAME)) {
+    if (0==strcasecmp(nickname, DEFAULT_CLIENT_NICKNAME)) {
       /* If you approved an OR called "client", then clients who use
        * the default nickname could all be rejected.  That's no good. */
       log(LOG_WARN,
@@ -465,7 +465,7 @@
 /**
  * Allocate and return a description of the status of the server <b>desc</b>,
  * for use in a running-routers line (if <b>rr_format</b> is true), or in a
- * router-status line (if <b>rr_format</b> is false.  The server is listed 
+ * router-status line (if <b>rr_format</b> is false.  The server is listed
  * as running iff <b>is_live</b> is true.
  */
 static char *
@@ -617,14 +617,14 @@
     struct config_line_t *ln;
     versions = smartlist_create();
     for (ln = get_options()->RecommendedVersions; ln; ln = ln->next) {
-      smartlist_split_string(versions, ln->value, ",", 
+      smartlist_split_string(versions, ln->value, ",",
                              SPLIT_SKIP_SPACE|SPLIT_IGNORE_BLANK, 0);
     }
     recommended_versions = smartlist_join_strings(versions,",",0,NULL);
     SMARTLIST_FOREACH(versions,char *,s,tor_free(s));
     smartlist_free(versions);
   }
-  
+
   dirserv_remove_old_servers(ROUTER_MAX_AGE);
   published_on = time(NULL);
   format_iso_time(published, published_on);

Index: hibernate.c
===================================================================
RCS file: /home/or/cvsroot/src/or/hibernate.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- hibernate.c	9 Nov 2004 11:14:34 -0000	1.13
+++ hibernate.c	9 Nov 2004 20:04:00 -0000	1.14
@@ -146,7 +146,6 @@
   return tor_timegm(tm);
 }
 
-
 /** Return the start of the accounting period that comes after the one
  * containing the time <b>now</b>. */
 static time_t
@@ -161,7 +160,6 @@
   return tor_timegm(tm);
 }
 
-
 /** Initialize the accounting subsystem. */
 void
 configure_accounting(time_t now)

Index: main.c
===================================================================
RCS file: /home/or/cvsroot/src/or/main.c,v
retrieving revision 1.363
retrieving revision 1.364
diff -u -d -r1.363 -r1.364
--- main.c	9 Nov 2004 18:22:16 -0000	1.363
+++ main.c	9 Nov 2004 20:04:00 -0000	1.364
@@ -372,7 +372,6 @@
   }
 }
 
-
 /** Perform regular maintenance tasks for a single connection.  This
  * function gets run once per second per connection by run_housekeeping.
  */
@@ -595,7 +594,6 @@
    */
   connection_ap_expire_beginning();
 
-
   /** 3c. And expire connections that we've held open for too long.
    */
   connection_expire_held_open();
@@ -990,7 +988,6 @@
 #endif /* signal stuff */
 }
 
-
 /** Main entry point for the Tor command-line client.
  */
 static int tor_init(int argc, char *argv[]) {

Index: or.h
===================================================================
RCS file: /home/or/cvsroot/src/or/or.h,v
retrieving revision 1.472
retrieving revision 1.473
diff -u -d -r1.472 -r1.473
--- or.h	9 Nov 2004 18:22:16 -0000	1.472
+++ or.h	9 Nov 2004 20:04:00 -0000	1.473
@@ -97,7 +97,6 @@
 #include <time.h>
 #endif
 
-
 #ifdef MS_WINDOWS
 #if (_MSC_VER <= 1300)
 #include <winsock.h>
@@ -719,7 +718,6 @@
   int failure_count;
 } cpath_build_state_t;
 
-
 #define CIRCUIT_MAGIC 0x35315243u
 /** Struct for a path (circuit) through the onion routing network. */
 struct circuit_t {
@@ -1578,7 +1576,6 @@
 void add_trusted_dir_server(const char *addr, uint16_t port,const char *digest);
 void clear_trusted_dir_servers(void);
 
-
 /********************************* routerparse.c ************************/
 
 typedef struct tor_version_t {

Index: relay.c
===================================================================
RCS file: /home/or/cvsroot/src/or/relay.c,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -d -r1.18 -r1.19
--- relay.c	7 Nov 2004 01:33:06 -0000	1.18
+++ relay.c	9 Nov 2004 20:04:00 -0000	1.19
@@ -526,8 +526,8 @@
       if(connection_ap_can_use_exit(conn, exitrouter)) {
         log_fn(LOG_WARN,"Exitrouter %s seems to be more restrictive than its exit policy. Not using this router as exit for now,", exitrouter->nickname);
         exit_policy_free(exitrouter->exit_policy);
-        exitrouter->exit_policy = 
-          router_parse_exit_policy_from_string("reject *:*"); 
+        exitrouter->exit_policy =
+          router_parse_exit_policy_from_string("reject *:*");
       }
 
       conn->state = AP_CONN_STATE_CIRCUIT_WAIT;

Index: rendclient.c
===================================================================
RCS file: /home/or/cvsroot/src/or/rendclient.c,v
retrieving revision 1.61
retrieving revision 1.62
diff -u -d -r1.61 -r1.62
--- rendclient.c	7 Nov 2004 01:33:06 -0000	1.61
+++ rendclient.c	9 Nov 2004 20:04:00 -0000	1.62
@@ -235,7 +235,6 @@
   return 0;
 }
 
-
 /** If we are not currently fetching a rendezvous service descriptor
  * for the service ID <b>query</b>, start a directory connection to fetch a
  * new one.

Index: rendcommon.c
===================================================================
RCS file: /home/or/cvsroot/src/or/rendcommon.c,v
retrieving revision 1.39
retrieving revision 1.40
diff -u -d -r1.39 -r1.40
--- rendcommon.c	7 Nov 2004 01:33:06 -0000	1.39
+++ rendcommon.c	9 Nov 2004 20:04:00 -0000	1.40
@@ -10,7 +10,6 @@
 
 #include "or.h"
 
-
 /** Return 0 if one and two are the same service ids, else -1 or 1 */
 int rend_cmp_service_ids(const char *one, const char *two) {
   return strcasecmp(one,two);

Index: rendmid.c
===================================================================
RCS file: /home/or/cvsroot/src/or/rendmid.c,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -d -r1.30 -r1.31
--- rendmid.c	7 Nov 2004 01:33:06 -0000	1.30
+++ rendmid.c	9 Nov 2004 20:04:00 -0000	1.31
@@ -209,7 +209,6 @@
   circ->purpose = CIRCUIT_PURPOSE_REND_POINT_WAITING;
   memcpy(circ->rend_cookie, request, REND_COOKIE_LEN);
 
-
   base16_encode(hexid,9,request,4);
 
   log_fn(LOG_INFO, "Established rendezvous point on circuit %d for cookie %s",

Index: rephist.c
===================================================================
RCS file: /home/or/cvsroot/src/or/rephist.c,v
retrieving revision 1.38
retrieving revision 1.39
diff -u -d -r1.38 -r1.39
--- rephist.c	9 Nov 2004 18:22:16 -0000	1.38
+++ rephist.c	9 Nov 2004 20:04:00 -0000	1.39
@@ -280,7 +280,7 @@
           name2 = "(unknown)";
 
         link_history = (link_history_t*) link_history_p;
-        
+
         ret = tor_snprintf(buffer+len, 2048-len, "%s(%ld/%ld); ", name2,
                         link_history->n_extend_ok,
                         link_history->n_extend_ok+link_history->n_extend_fail);
@@ -556,7 +556,6 @@
   return buf;
 }
 
-
 /*
   Local Variables:
   mode:c

Index: router.c
===================================================================
RCS file: /home/or/cvsroot/src/or/router.c,v
retrieving revision 1.117
retrieving revision 1.118
diff -u -d -r1.117 -r1.118
--- router.c	9 Nov 2004 19:13:08 -0000	1.117
+++ router.c	9 Nov 2004 20:04:00 -0000	1.118
@@ -801,7 +801,6 @@
   return len == HEX_DIGEST_LEN+1 && strspn(s+1,HEX_CHARACTERS)==len-1;
 }
 
-
 /*
   Local Variables:
   mode:c

Index: routerlist.c
===================================================================
RCS file: /home/or/cvsroot/src/or/routerlist.c,v
retrieving revision 1.182
retrieving revision 1.183
diff -u -d -r1.182 -r1.183
--- routerlist.c	9 Nov 2004 19:13:08 -0000	1.182
+++ routerlist.c	9 Nov 2004 20:04:00 -0000	1.183
@@ -273,7 +273,6 @@
         });
     });
 
-
   for (cl = get_options()->NodeFamilies; cl; cl = cl->next) {
     if (router_nickname_is_in_list(router, cl->value)) {
       add_nickname_list_to_smartlist(sl, cl->value, 0);
@@ -835,7 +834,6 @@
  * Code to parse router descriptors and directories.
  */
 
-
 /** Add to the current routerlist each router stored in the
  * signed directory <b>s</b>.  If pkey is provided, check the signature against
  * pkey; else check against the pkey of the signing directory server. */
@@ -1044,7 +1042,7 @@
   all_routers = smartlist_create();
   if(me) /* learn if the dirservers think I'm verified */
     smartlist_add(all_routers, me);
-  
+
   smartlist_add_all(all_routers,list->routers);
   SMARTLIST_FOREACH(rr->running_routers, const char *, cp,
      routers_update_status_from_entry(all_routers, rr->published_on,
@@ -1060,10 +1058,10 @@
  *          (running-routers format)
  *     <li> !<b>nickname</b> -- router is not-running and verified.
  *          (running-routers format)
- *     <li> <b>nickname</b>=$<b>hexdigest</b> -- router is running and 
+ *     <li> <b>nickname</b>=$<b>hexdigest</b> -- router is running and
  *          verified. (router-status format)
  *          (router-status format)
- *     <li> !<b>nickname</b>=$<b>hexdigest</b> -- router is running and 
+ *     <li> !<b>nickname</b>=$<b>hexdigest</b> -- router is running and
  *          verified. (router-status format)
  *     <li> !<b>nickname</b> -- router is not-running and verified.
  *     <li> $<b>hexdigest</b> -- router is running and unverified.

Index: routerparse.c
===================================================================
RCS file: /home/or/cvsroot/src/or/routerparse.c,v
retrieving revision 1.75
retrieving revision 1.76
diff -u -d -r1.75 -r1.76
--- routerparse.c	9 Nov 2004 18:22:17 -0000	1.75
+++ routerparse.c	9 Nov 2004 20:04:00 -0000	1.76
@@ -422,7 +422,7 @@
    * router. */
   str = end;
   if (router_parse_list_from_string(&str, &new_dir,
-                                    good_nickname_list, 
+                                    good_nickname_list,
                                     tok->tp==K_RUNNING_ROUTERS,
                                     published_on)) {
     log_fn(LOG_WARN, "Error reading routers from directory");
@@ -736,7 +736,6 @@
   return 0;
 }
 
-
 /** Helper function: reads a single router entry from *<b>s</b> ...
  * *<b>end</b>.  Mallocs a new router and returns it if all goes well, else
  * returns NULL.
@@ -895,7 +894,6 @@
                       log_fn(LOG_WARN,"Error in exit policy"); goto err;}
                     );
 
-
   if ((tok = find_first_by_keyword(tokens, K_FAMILY)) && tok->n_args) {
     int i;
     router->declared_family = smartlist_create();
@@ -907,7 +905,7 @@
       smartlist_add(router->declared_family, tor_strdup(tok->args[i]));
     }
   }
-  
+
   if (!(tok = find_first_by_keyword(tokens, K_ROUTER_SIGNATURE))) {
     log_fn(LOG_WARN, "Missing router signature"); goto err;
   }
@@ -945,7 +943,6 @@
     router->or_port, router->socks_port, router->dir_port,
     (unsigned) router->bandwidthrate, (unsigned) router->bandwidthburst);
 
-
   goto done;
   return router;
 
@@ -1016,7 +1013,6 @@
   return 0;
 }
 
-
 static int router_add_exit_policy(routerinfo_t *router,directory_token_t *tok)
 {
   struct exit_policy_t *newe, **tmpe;
@@ -1056,7 +1052,6 @@
   if (parse_addr_and_port_range(arg, &newe->addr, &newe->msk,
                                 &newe->prt_min, &newe->prt_max))
     goto policy_read_failed;
-  
 
   in.s_addr = htonl(newe->addr);
   address = tor_strdup(inet_ntoa(in));
@@ -1302,7 +1297,6 @@
   fputs("\n",stdout);
 #endif
 
-
   return tok;
 #undef RET_ERR
 }

Index: test.c
===================================================================
RCS file: /home/or/cvsroot/src/or/test.c,v
retrieving revision 1.144
retrieving revision 1.145
diff -u -d -r1.144 -r1.145
--- test.c	9 Nov 2004 18:22:17 -0000	1.144
+++ test.c	9 Nov 2004 20:04:00 -0000	1.145
@@ -625,7 +625,6 @@
   test_eq(2, smartlist_len(sl));
   test_streq("efgh", smartlist_get(sl, 1));
 
-
   /* Test tor_strstrip() */
   strcpy(buf, "Testing 1 2 3");
   test_eq(0, tor_strstrip(buf, ",!"));
@@ -779,7 +778,7 @@
   tor_free(buf1);
 }
 
-static void * 
+static void *
 _squareAndRemoveK4(const char *key, void*val, void *data)
 {
   int *ip = (int*)data;
@@ -867,7 +866,7 @@
   strmap_free(map,NULL);
 }
 
-static void 
+static void
 test_onion(void)
 {
 #if 0
@@ -929,7 +928,6 @@
   crypto_free_pk_env(pk);
 }
 
-
 static void
 test_dir_format(void)
 {