# # # patch "ChangeLog" # from [dc0b8ff84fc1beb10311b52aa6be9db96f405f37] # to [c7c2c106a07e8b635030818630b41c1f12ddd8fb] # # patch "netsync.cc" # from [2fd9d1b3cbfb5500b18c8cae82f88a96cb9c50b8] # to [7e0431412cbfb350485a2e477164d1005647af08] # ============================================================ --- ChangeLog dc0b8ff84fc1beb10311b52aa6be9db96f405f37 +++ ChangeLog c7c2c106a07e8b635030818630b41c1f12ddd8fb @@ -1,5 +1,10 @@ 2006-05-12 Matt Johnston + * netsync.cc (process_hello_cmd): ask for passphrase before + doing merkle tree things. + +2006-05-12 Matt Johnston + * merkle_tree.cc (bitset_to_prefix): use strings directly rather than ostringstream for getting bitset blocks, ~10% cpu time improvement for empty pull. ============================================================ --- netsync.cc 2fd9d1b3cbfb5500b18c8cae82f88a96cb9c50b8 +++ netsync.cc 7e0431412cbfb350485a2e477164d1005647af08 @@ -1255,21 +1255,6 @@ this->remote_peer_key_hash = their_key_hash_decoded; } - // clients always include in the synchronization set, every branch that the - // user requested - vector branchnames; - set ok_branches; - get_branches(app, branchnames); - for (vector::const_iterator i = branchnames.begin(); - i != branchnames.end(); i++) - { - if (our_matcher(*i)) - ok_branches.insert(utf8(*i)); - } - rebuild_merkle_trees(app, ok_branches); - - setup_client_tickers(); - if (app.signing_key() != "") { // get our key pair @@ -1298,6 +1283,22 @@ queue_anonymous_cmd(this->role, our_include_pattern, our_exclude_pattern, mk_nonce(), their_key_encoded); } + + // clients always include in the synchronization set, every branch that the + // user requested + vector branchnames; + set ok_branches; + get_branches(app, branchnames); + for (vector::const_iterator i = branchnames.begin(); + i != branchnames.end(); i++) + { + if (our_matcher(*i)) + ok_branches.insert(utf8(*i)); + } + rebuild_merkle_trees(app, ok_branches); + + setup_client_tickers(); + return true; }