tor/changes/refactor_reached_eof
Nick Mathewson db86b9194d Break connection_dir_client_reached_eof() into smaller functions
This was a >630-line function, which doesn't make anybody happy.  It
was also mostly composed of a bunch of if-statements that handled
different directory responses differently depending on the original
purpose of the directory connection.  The logical refactoring here
is to move the body of each switch statement into a separate handler
function, and to invoke those functions from a separate switch
statement.

This commit leaves whitespace mostly untouched, for ease of review.
I'll reindent in the next commit.
2017-05-02 13:06:25 -04:00

6 lines
245 B
Plaintext

o Code simplification and refactoring:
- Break up the 630-line function connection_dir_client_reached_eof() into
a dozen smaller functions. This change should help maintainability and
readability of the client directory code.