[tor-bugs] #8605 [Stem]: Autodetect response type in ControlMessage.from_str()

Tor Bug Tracker & Wiki blackhole at torproject.org
Thu Apr 18 05:44:52 UTC 2013


#8605: Autodetect response type in ControlMessage.from_str()
----------------------------+-----------------------------------------------
    Reporter:  atagar       |       Owner:  atagar         
        Type:  enhancement  |      Status:  reopened       
    Priority:  normal       |   Milestone:                 
   Component:  Stem         |     Version:                 
  Resolution:               |    Keywords:  controller easy
      Parent:               |      Points:                 
Actualpoints:               |  
----------------------------+-----------------------------------------------
Changes (by meejah):

  * status:  closed => reopened
  * resolution:  wontfix =>


Comment:

 For the "synchronous" (non-650) responses, you will have exactly one
 outstanding request -- could this be provided as a "hint" (defaulting to
 None)? Then for any 650 messages, you can autodetect, and for anything
 else if the hint is None it's an error (or not convert()-ed?) and
 otherwise the hint is used to determine the correct type?

 Then, callers simply provide the outstanding message as the hint (if they
 don't have one, they use None and it'll "just work").

-- 
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/8605#comment:4>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online


More information about the tor-bugs mailing list