[patch] server status getinfos

Nick Mathewson nickm at freehaven.net
Sat Sep 15 18:37:21 UTC 2007


On Sat, Sep 08, 2007 at 07:32:35PM +0100, Robert Hogan wrote:
> 
> Adds getinfo:
> 
>     "status/good-server-descriptor"
>     "status/or-reachability-succeeded"
>     "status/dir-reachability-succeeded"

This part is good.

> and splits out the REACHABILITY_SUCCEEDED event into:
> 
> OR_REACHABILITY_SUCCEEDED
> DIR_REACHABILITY_SUCCEEDED

> 
> This makes sense because it maintains the one-to-one relationship between 
> getinfo requests and status-events, getinfo reachability-succeeded would be 
> too ambiguous to be useful, and makes writing controllers simpler because it 
> is easier to identify the meaning of a status event by the 'action' of *all* 
> status events rather than, in special cases, a combination of the action and 
> one or more of the arguments.

Yes, but we need to think about backward compatibility!  Any program
which previously worked by looking for REACHABILITY_SUCCEEDED (which
has been shipped in the stable 0.1.2.x series) would break if we split
it like this.  It is not okay to change events around to break old
programs, when we can avoid this.

There's a pretty easy fix.  How about if the events become:

     "status/reachability-succeeded/or"
         0 or 1.
     "status/reachability-succeeded/dir"
         0 or 1
     "status/reachability-succeeded"
         "OR=" ("0"/"1") SP "DIR=" ("0"/"1") ?

and the REACHABILITY_SUCCEEDED events remain as-is?  Unless you
object, I'll rewrite the patch to do this instead.

yrs,
-- 
Nick Mathewson
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 652 bytes
Desc: not available
URL: <http://lists.torproject.org/pipermail/tor-dev/attachments/20070915/c102044b/attachment.pgp>


More information about the tor-dev mailing list