Use tor_addr_from_getsockname() in several places

I'm leaving the getsockname code in transproxy alone, since it is
comparatively isolated, rather platform-specific, and hard to test.

Implements 18105.
This commit is contained in:
Nick Mathewson
2018-01-26 11:59:01 -05:00
parent 2a7bfec364
commit 6ed384b827
4 changed files with 15 additions and 19 deletions
+4
View File
@@ -0,0 +1,4 @@
o Code simplification and refactoring:
- Introduce a function to call getsockname() and return
tor_addr_t, to save a little complexity throughout the codebase.
Closes ticket 18105.