[or-cvs] r10692: removed some whitespace to make check-spaces happy (in tor/branches/114-dist-storage/src: common or)
kloesing at seul.org
kloesing at seul.org
Thu Jun 28 10:46:31 UTC 2007
Author: kloesing
Date: 2007-06-28 06:46:30 -0400 (Thu, 28 Jun 2007)
New Revision: 10692
Modified:
tor/branches/114-dist-storage/src/common/crypto.c
tor/branches/114-dist-storage/src/or/rendclient.c
tor/branches/114-dist-storage/src/or/rendcommon.c
tor/branches/114-dist-storage/src/or/rendservice.c
tor/branches/114-dist-storage/src/or/routerparse.c
Log:
removed some whitespace to make check-spaces happy
Modified: tor/branches/114-dist-storage/src/common/crypto.c
===================================================================
--- tor/branches/114-dist-storage/src/common/crypto.c 2007-06-28 10:04:13 UTC (rev 10691)
+++ tor/branches/114-dist-storage/src/common/crypto.c 2007-06-28 10:46:30 UTC (rev 10692)
@@ -1157,7 +1157,7 @@
EVP_CIPHER_CTX ctx; /* cipher context */
unsigned char iv[16]; /* initialization vector */
- int outlen, tmplen; /* lengths of encrypted strings (w/ and wo/ final data) */
+ int outlen, tmplen; /* length of encrypted strings (w/ and wo/ final data) */
tor_assert(key);
tor_assert(to);
@@ -1211,7 +1211,7 @@
{
EVP_CIPHER_CTX ctx; /* cipher context */
unsigned char iv[16]; /* initialization vector */
- int outlen, tmplen; /* lengths of decrypted strings (w/ and wo/ final data) */
+ int outlen, tmplen; /* length of decrypted strings (w/ and wo/ final data) */
tor_assert(key);
tor_assert(to);
Modified: tor/branches/114-dist-storage/src/or/rendclient.c
===================================================================
--- tor/branches/114-dist-storage/src/or/rendclient.c 2007-06-28 10:04:13 UTC (rev 10691)
+++ tor/branches/114-dist-storage/src/or/rendclient.c 2007-06-28 10:46:30 UTC (rev 10692)
@@ -267,7 +267,7 @@
/* extract service id */
base32_decode(service_id, 10, address, 16);
-
+
/* extract cookie */
base32_decode(secret_cookie, 15, address+17, 24);
Modified: tor/branches/114-dist-storage/src/or/rendcommon.c
===================================================================
--- tor/branches/114-dist-storage/src/or/rendcommon.c 2007-06-28 10:04:13 UTC (rev 10691)
+++ tor/branches/114-dist-storage/src/or/rendcommon.c 2007-06-28 10:46:30 UTC (rev 10692)
@@ -44,7 +44,7 @@
}
#define TIME_PERIOD_LENGTH 600
-
+
/* Fill the fields of <b>desc</b> so that it a valid v2 descriptor can be
* encoded from it. Use the current time <b>now</b> and the
* <b>secret_cookie</b>. Returns 0 on success, -1 otherwise. */
@@ -158,8 +158,8 @@
return 0;
}
-/* Encodes the current (<b>current_desc</b>) and next descriptor (<b>next_desc</b>) from
- * <b>desc</b>. Returns 0 on success, -1 otherwise. */
+/* Encodes the current (<b>current_desc</b>) and next descriptor
+ * (<b>next_desc</b>) from <b>desc</b>. Returns 0 on success, -1 otherwise. */
int
rend_encode_v2_descriptor(char *current_desc, char *next_desc,
rend_service_descriptor_t *desc, time_t now,
@@ -219,14 +219,14 @@
log_warn(LD_DIR, "write onion key failed");
continue;
}
-
+
/* encode service key; TODO replace Bob's public key by newly generated
* service key */
if (crypto_pk_write_public_key_to_string(desc->pk, &skey, &skeylen) < 0) {
log_warn(LD_DIR, "write service key failed");
continue;
}
-
+
/* assemble everything for this introduction point */
res = tor_snprintf(ipos+ipowritten, iposlen-ipowritten,
"introduction-point %s\n"
@@ -246,11 +246,11 @@
log_warn(LD_BUG, "not enough space for writing ipo");
return -1;
}
-
+
/* update total number of written bytes for unencrypted intro points */
ipowritten += res;
}
-
+
/* finalize unencrypted introduction points */
ipos[ipowritten++] = '\n';
ipos[ipowritten++] = 0;
@@ -298,7 +298,7 @@
return -1;
}
written = result;
-
+
/* add signature */
strlcpy(buf + written, "signature\n", 4000 - written);
written += strlen(buf + written);
@@ -321,7 +321,7 @@
buf[written++] = 0;
}
-
+
/* free memory */
tor_free(pkey);
Modified: tor/branches/114-dist-storage/src/or/rendservice.c
===================================================================
--- tor/branches/114-dist-storage/src/or/rendservice.c 2007-06-28 10:04:13 UTC (rev 10691)
+++ tor/branches/114-dist-storage/src/or/rendservice.c 2007-06-28 10:46:30 UTC (rev 10692)
@@ -335,7 +335,7 @@
/* base32-encode cookie */
base32_encode(cookie_base32, 24+1, service->secret_cookie, 15);
- /* assemlbe onion address */
+ /* assemble onion address */
if (tor_snprintf(hostname2, 50, "%s.%s.onion\n", permanent_id_base32,
cookie_base32) < 0) {
log_warn(LD_BUG, "could not encode hostname");
@@ -1162,14 +1162,14 @@
if (service->desc->seconds_valid < 6) n = 2;
for (i = 0; i < 2; i++) {
-
- /* base32-encode descriptor id */
+
+ /* base32-encode descriptor id */
base32_encode(descriptor_id_base32, 32+1, service->desc->desc_id[i], 20);
-
+
/* determine file name */
tor_snprintf(fname, flen, "%s"PATH_SEPARATOR"%s.rsd",
get_options()->DataDirectory, descriptor_id_base32);
-
+
/* write string to file */
write_str_to_file(fname,(i == 0 ? current_desc : next_desc),0);
}
Modified: tor/branches/114-dist-storage/src/or/routerparse.c
===================================================================
--- tor/branches/114-dist-storage/src/or/routerparse.c 2007-06-28 10:04:13 UTC (rev 10691)
+++ tor/branches/114-dist-storage/src/or/routerparse.c 2007-06-28 10:46:30 UTC (rev 10692)
@@ -2842,7 +2842,6 @@
smartlist_uniq(versions, _compare_tor_version_str_ptr, NULL);
}
-
/* Parse encoded descriptor; TODO add possibility to parse multiple descs from
* one string for replication purposes! */
int
@@ -2994,7 +2993,7 @@
s2 = (const char **)&ipos_decrypted;
while (!strcmpstart(*s2, "introduction-point ")) {
- const char *eos; /* end position of string */
+ const char *eos; /* end position of string */
directory_token_t *tok; /* single token */
extend_info_t *info; /* extend info to write parsed result to */
struct in_addr in; /* IP address */
@@ -3006,7 +3005,7 @@
else
eos = eos+1;
- /* free old tokens, if available, and clear token list */
+ /* free old tokens, if available, and clear token list */
SMARTLIST_FOREACH(tokens, directory_token_t *, t, token_free(t));
smartlist_clear(tokens);
@@ -3015,13 +3014,13 @@
log_warn(LD_DIR, "Error tokenizing introduction point");
goto err;
}
-
+
/* check minimum allowed length of introduction point */
if (smartlist_len(tokens) < 5) {
log_warn(LD_DIR, "Impossibly short introduction point");
goto err;
}
-
+
/* allocate new extend info */
info = tor_malloc_zero(sizeof(extend_info_t));
More information about the tor-commits
mailing list