[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] r8820: More dirserver oops: actually set the digest for a given nam (in tor/trunk: . src/or)
- To: or-cvs@xxxxxxxxxxxxx
- Subject: [or-cvs] r8820: More dirserver oops: actually set the digest for a given nam (in tor/trunk: . src/or)
- From: nickm@xxxxxxxx
- Date: Tue, 24 Oct 2006 17:38:33 -0400 (EDT)
- Delivered-to: archiver@seul.org
- Delivered-to: or-cvs-outgoing@seul.org
- Delivered-to: or-cvs@seul.org
- Delivery-date: Tue, 24 Oct 2006 17:38:43 -0400
- Reply-to: or-talk@xxxxxxxxxxxxx
- Sender: owner-or-cvs@xxxxxxxxxxxxx
Author: nickm
Date: 2006-10-24 17:38:31 -0400 (Tue, 24 Oct 2006)
New Revision: 8820
Modified:
tor/trunk/
tor/trunk/src/or/dirserv.c
Log:
r9160@totoro: nickm | 2006-10-24 17:38:07 -0400
More dirserver oops: actually set the digest for a given name in the case when the name is not yet recognized.
Property changes on: tor/trunk
___________________________________________________________________
svk:merge ticket from /tor/trunk [r9160] on 96637b51-b116-0410-a10e-9941ebb49b64
Modified: tor/trunk/src/or/dirserv.c
===================================================================
--- tor/trunk/src/or/dirserv.c 2006-10-24 20:51:28 UTC (rev 8819)
+++ tor/trunk/src/or/dirserv.c 2006-10-24 21:38:31 UTC (rev 8820)
@@ -113,13 +113,11 @@
if (nickname[0] != '!') {
char *old_fp = strmap_get_lc(list->fp_by_name, nickname);
- if (old_fp) {
- if (!strcasecmp(fingerprint, old_fp)) {
- tor_free(fingerprint);
- } else {
- tor_free(old_fp);
- strmap_set_lc(list->fp_by_name, nickname, fingerprint);
- }
+ if (old_fp && !strcasecmp(fingerprint, old_fp)) {
+ tor_free(fingerprint);
+ } else {
+ tor_free(old_fp);
+ strmap_set_lc(list->fp_by_name, nickname, fingerprint);
}
status->status |= FP_NAMED;
strlcpy(status->nickname, nickname, sizeof(status->nickname));
@@ -320,7 +318,8 @@
base16_encode(fp, sizeof(fp), id_digest, DIGEST_LEN);
if (should_log)
- log_debug(LD_DIRSERV, "%d fingerprints known.",
+ log_debug(LD_DIRSERV, "%d fingerprints, %d digests known.",
+ strmap_size(fingerprint_list->fp_by_name),
digestmap_size(fingerprint_list->status_by_digest));
if ((fp_by_name =