# # patch "ChangeLog" # from [acceceef8e7ff7a6e2bba16e87913717b97c6bb1] # to [1922f0f586ad5eee0e79c1955441b9df3d0f6ded] # # patch "contrib/usher.cc" # from [5b222d1e4750f78fceaf30e5f0b583bf362b6507] # to [c67d693036174bc4a591c02202c65e6b8521fc59] # # patch "netsync.cc" # from [22170953bd69c90b712288d9a3a8bf93e9de7026] # to [3b956db0420ef07f1020e8faa8d3f872abb740d9] # ======================================================================== --- ChangeLog acceceef8e7ff7a6e2bba16e87913717b97c6bb1 +++ ChangeLog 1922f0f586ad5eee0e79c1955441b9df3d0f6ded @@ -1,5 +1,11 @@ 2005-10-18 Timothy Brownawell + * netsync.cc (session::process_usher_cmd): reply with who we connected + to (hostname or hostname:port), not what pattern we asked for. + * contrib/usher.cc: Update comment. + +2005-10-18 Timothy Brownawell + * contrib/usher.cc: support dynamic local servers These are started when a client attempts to connect, and killed at a set time interval after the last client has disconnected. ======================================================================== --- contrib/usher.cc 5b222d1e4750f78fceaf30e5f0b583bf362b6507 +++ contrib/usher.cc c67d693036174bc4a591c02202c65e6b8521fc59 @@ -15,20 +15,23 @@ // is the address to listen on // is the local port to listen on // is a file containing lines of -// stem remote ip-address port-number -// stem local +// hostname remote ip-address port-number +// hostname local // // Example server-file: -// localhost.personal-project local -d /usr/local/src/project.db * -// net.venge.monotone remote 66.96.28.3 5253 +// localhost local -d /usr/local/src/project.db * +// venge.net remote 66.96.28.3 5253 +// company.com:5200 remote 192.168.4.5 5200 // -// A request for a pattern starting with "stem" will be directed to the +// A request to server "hostname" will be directed to the // server at :, if that stem is marked as remote, // and to a local server managed by the usher, started with the given // arguments ("monotone serve --bind=something "), // if it is marked as local. -// No stem should have any other stem as an initial substring - having both -// "foo" and "foo-bar" as stems will not work properly. +// Note that "hostname" has to be an initial substring of who the client asked +// to connect to, but does not have to match exactly. This means that you don't +// have to know in advance whether clients will be asking for +// or : . #include #include @@ -528,6 +531,7 @@ std::cerr<<"no server found for "<stem<<" for "<srv; } ======================================================================== --- netsync.cc 22170953bd69c90b712288d9a3a8bf93e9de7026 +++ netsync.cc 3b956db0420ef07f1020e8faa8d3f872abb740d9 @@ -2748,7 +2748,7 @@ L(F("Received greeting from usher: %s") % msg().substr(1)); } netcmd cmdout; - cmdout.write_usher_reply_cmd(our_include_pattern); + cmdout.write_usher_reply_cmd(peer_id); write_netcmd_and_try_flush(cmdout); L(F("Sent reply.")); return true;