[or-cvs] tabs
Roger Dingledine
arma at seul.org
Sat Apr 3 02:14:22 UTC 2004
Update of /home/or/cvsroot/src/or
In directory moria.mit.edu:/home2/arma/work/onion/cvs/src/or
Modified Files:
main.c rendcommon.c rendservice.c rephist.c
Log Message:
tabs
Index: main.c
===================================================================
RCS file: /home/or/cvsroot/src/or/main.c,v
retrieving revision 1.222
retrieving revision 1.223
diff -u -d -r1.222 -r1.223
--- main.c 2 Apr 2004 22:23:15 -0000 1.222
+++ main.c 3 Apr 2004 02:14:20 -0000 1.223
@@ -282,8 +282,8 @@
log_fn(LOG_INFO, "We now have a directory.");
/* just for testing */
- directory_initiate_command(router_pick_directory_server(),
- DIR_PURPOSE_FETCH_RENDDESC, "foo", 3);
+// directory_initiate_command(router_pick_directory_server(),
+// DIR_PURPOSE_FETCH_RENDDESC, "foo", 3);
rend_services_init(); /* get bob to initialize all his hidden services */
Index: rendcommon.c
===================================================================
RCS file: /home/or/cvsroot/src/or/rendcommon.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- rendcommon.c 3 Apr 2004 01:59:53 -0000 1.10
+++ rendcommon.c 3 Apr 2004 02:14:20 -0000 1.11
@@ -62,7 +62,7 @@
}
rend_service_descriptor_t *rend_parse_service_descriptor(
- const char *str, int len)
+ const char *str, int len)
{
rend_service_descriptor_t *result = NULL;
int keylen, asn1len, i;
@@ -95,9 +95,9 @@
keylen = crypto_pk_keysize(result->pk);
if (end-cp != keylen) goto truncated;
if (crypto_pk_public_checksig_digest(result->pk,
- (char*)str,cp-str, /* data */
- (char*)cp,end-cp /* signature*/
- )<0) {
+ (char*)str,cp-str, /* data */
+ (char*)cp,end-cp /* signature*/
+ )<0) {
log_fn(LOG_WARN, "Bad signature on service descriptor");
goto error;
}
Index: rendservice.c
===================================================================
RCS file: /home/or/cvsroot/src/or/rendservice.c,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -d -r1.15 -r1.16
--- rendservice.c 3 Apr 2004 00:58:54 -0000 1.15
+++ rendservice.c 3 Apr 2004 02:14:20 -0000 1.16
@@ -89,7 +89,7 @@
p = smartlist_get(service->ports, i);
addr.s_addr = htonl(p->real_address);
log_fn(LOG_INFO,"Service maps port %d to %s:%d",
- p->virtual_port, inet_ntoa(addr), p->real_port);
+ p->virtual_port, inet_ntoa(addr), p->real_port);
}
}
}
@@ -126,13 +126,13 @@
r = tor_inet_aton(addrstring, &addr);
tor_free(addrstring);
if (!r) {
- log_fn(LOG_WARN,"Unparseable address in hidden service port configuration");
- return NULL;
+ log_fn(LOG_WARN,"Unparseable address in hidden service port configuration");
+ return NULL;
}
realport = strtol(colon+1, &endptr, 10);
if (*endptr) {
- log_fn(LOG_WARN,"Unparseable or missing port in hidden service port configuration.");
- return NULL;
+ log_fn(LOG_WARN,"Unparseable or missing port in hidden service port configuration.");
+ return NULL;
}
} else if (strchr(string, '.') && tor_inet_aton(string, &addr)) {
/* We have addr; use deafult port. */
@@ -141,8 +141,8 @@
/* No addr:port, no addr -- must be port. */
realport = strtol(string, &endptr, 10);
if (*endptr) {
- log_fn(LOG_WARN, "Unparseable of missing port in hidden service port configuration.");
- return NULL;
+ log_fn(LOG_WARN, "Unparseable of missing port in hidden service port configuration.");
+ return NULL;
}
addr.s_addr = htonl(0x7F000001u); /* Default to 127.0.0.1 */
}
@@ -173,7 +173,7 @@
for (line = options->RendConfigLines; line; line = line->next) {
if (!strcasecmp(line->key, "HiddenServiceDir")) {
if (service)
- add_service(service);
+ add_service(service);
service = tor_malloc_zero(sizeof(rend_service_t));
service->directory = tor_strdup(line->value);
service->ports = smartlist_create();
@@ -188,8 +188,8 @@
if (!strcasecmp(line->key, "HiddenServicePort")) {
portcfg = parse_port_config(line->value);
if (!portcfg) {
- rend_service_free(service);
- return -1;
+ rend_service_free(service);
+ return -1;
}
smartlist_add(service->ports, portcfg);
} else if (!strcasecmp(line->key, "HiddenServiceNodes")) {
@@ -257,7 +257,7 @@
/* Load key */
if (strlcpy(fname,s->directory,512) >= 512 ||
- strlcat(fname,"/private_key",512) >= 512) {
+ strlcat(fname,"/private_key",512) >= 512) {
log_fn(LOG_WARN, "Directory name too long: '%s'", s->directory);
return -1;
}
@@ -275,7 +275,7 @@
return -1;
}
if (strlcpy(fname,s->directory,512) >= 512 ||
- strlcat(fname,"/hostname",512) >= 512) {
+ strlcat(fname,"/hostname",512) >= 512) {
log_fn(LOG_WARN, "Directory name too long: '%s'", s->directory);
return -1;
}
Index: rephist.c
===================================================================
RCS file: /home/or/cvsroot/src/or/rephist.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- rephist.c 29 Mar 2004 06:18:04 -0000 1.4
+++ rephist.c 3 Apr 2004 02:14:20 -0000 1.5
@@ -42,7 +42,7 @@
* the second, creating it if necessary.
*/
static link_history_t *get_link_history(const char *from_name,
- const char *to_name)
+ const char *to_name)
{
or_history_t *orhist;
link_history_t *lhist;
@@ -152,7 +152,7 @@
* the OR 'to_name'.
*/
void rep_hist_note_extend_succeeded(const char *from_name,
- const char *to_name)
+ const char *to_name)
{
link_history_t *hist;
/* log_fn(LOG_WARN, "EXTEND SUCCEEDED: %s->%s",from_name,to_name); */
@@ -204,23 +204,23 @@
}
log(severity,
"OR %s: %ld/%ld good connections; uptime %ld/%ld sec (%.2f%%)",
- name1,
- or_history->n_conn_ok, or_history->n_conn_fail+or_history->n_conn_ok,
+ name1,
+ or_history->n_conn_ok, or_history->n_conn_fail+or_history->n_conn_ok,
upt, upt+downt, uptime*100.0);
strcpy(buffer, " Good extend attempts: ");
len = strlen(buffer);
for (lhist_it = strmap_iter_init(or_history->link_history_map);
- !strmap_iter_done(lhist_it);
- lhist_it = strmap_iter_next(or_history->link_history_map, lhist_it)) {
+ !strmap_iter_done(lhist_it);
+ lhist_it = strmap_iter_next(or_history->link_history_map, lhist_it)) {
strmap_iter_get(lhist_it, &name2, &link_history_p);
link_history = (link_history_t*) link_history_p;
len += snprintf(buffer+len, 2048-len, "%s(%ld/%ld); ", name2,
- link_history->n_extend_ok,
- link_history->n_extend_ok+link_history->n_extend_fail);
+ link_history->n_extend_ok,
+ link_history->n_extend_ok+link_history->n_extend_fail);
if (len >= 2048) {
- buffer[2047]='\0';
- break;
+ buffer[2047]='\0';
+ break;
}
}
log(severity, buffer);
More information about the tor-commits
mailing list