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

[tor-commits] [tor/master] Merge remote-tracking branch 'origin/maint-0.2.2'



commit 1f97e8322fe040066c630073a71a59ff0c161beb
Merge: 5b96773 970715d
Author: Nick Mathewson <nickm@xxxxxxxxxxxxxx>
Date:   Tue May 3 16:33:41 2011 -0400

    Merge remote-tracking branch 'origin/maint-0.2.2'
    
    Conflicts:
    	src/or/microdesc.c

 changes/bug2230_part1 |    7 +++++++
 changes/bug2230_part2 |    5 +++++
 src/or/microdesc.c    |    6 ++++--
 3 files changed, 16 insertions(+), 2 deletions(-)

diff --cc src/or/microdesc.c
index 469c2fc,0ceb134..521ee07
--- a/src/or/microdesc.c
+++ b/src/or/microdesc.c
@@@ -246,17 -207,12 +246,18 @@@ microdescs_add_list_to_cache(microdesc_
    {
      size_t old_content_len =
        cache->cache_content ? cache->cache_content->size : 0;
-     if ((cache->journal_len > 16384 + old_content_len &&
-          cache->journal_len > old_content_len / 2))
+     if (cache->journal_len > 16384 + old_content_len &&
+         cache->journal_len > old_content_len / 2) {
        microdesc_cache_rebuild(cache);
+     }
    }
  
 +  {
 +    networkstatus_t *ns = networkstatus_get_latest_consensus();
 +    if (ns && ns->flavor == FLAV_MICRODESC)
 +      SMARTLIST_FOREACH(added, microdesc_t *, md, nodelist_add_microdesc(md));
 +  }
 +
    return added;
  }
  
@@@ -305,9 -261,10 +306,10 @@@ microdesc_cache_reload(microdesc_cache_
    journal_content = read_file_to_str(cache->journal_fname,
                                       RFTS_IGNORE_MISSING, &st);
    if (journal_content) {
+     cache->journal_len = (size_t) st.st_size;
      added = microdescs_add_to_cache(cache, journal_content,
                                      journal_content+st.st_size,
 -                                    SAVED_IN_JOURNAL, 0);
 +                                    SAVED_IN_JOURNAL, 0, -1, NULL);
      if (added) {
        total += smartlist_len(added);
        smartlist_free(added);

_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits