[tor-bugs] #30007 [Core Tor/Tor]: refactor control.c output to be more abstract
Tor Bug Tracker & Wiki
blackhole at torproject.org
Thu Apr 11 22:51:05 UTC 2019
#30007: refactor control.c output to be more abstract
----------------------------+----------------------------------
Reporter: catalyst | Owner: catalyst
Type: task | Status: assigned
Priority: Medium | Milestone: Tor: unspecified
Component: Core Tor/Tor | Version:
Severity: Normal | Resolution:
Keywords: technical-debt | Actual Points:
Parent ID: #29210 | Points: 3
Reviewer: | Sponsor: Sponsor31-can
----------------------------+----------------------------------
Comment (by catalyst):
The WIP branch at https://github.com/tlyu/tor/tree/ticket30007 now has a
Coccinelle script that I ran to migrate existing code to using the new
abstractions. It's almost ready to review. Once Nick rebases the #30091
branch I based it on, I'll probably make a WIP pull request to check
Coveralls.
There are a few places that still explicitly use
`connection_write_str_to_buf()` and `connection_buf_add()` to send replies
to the control port, but they're somewhat more difficult to change. I'm
tempted to defer them to a later ticket.
In particular, these could benefit from additional refactoring that
includes helper functions that collect a list of strings (or key-value
pairs, etc.) to write and automatically takes care of the `250-some_text`
vs `250 some_text`, etc. distinction.
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/30007#comment:2>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
More information about the tor-bugs
mailing list