Opened 7 years ago

Closed 5 years ago

#6456 closed defect (implemented)

Merge parse_client_transport_line() and parse_server_transport_line()

Reported by: asn Owned by: andrea
Priority: Very Low Milestone: Tor: 0.2.6.x-final
Component: Core Tor/Tor Version:
Severity: Keywords: pt refactor tor-bridge 026-triaged-1 026-deferrable
Cc: Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

There is too much code duplication between parse_client_transport_line() and parse_server_transport_line. We should probably merge them into one function during 0.2.4.x.

Child Tickets

Change History (13)

comment:1 Changed 7 years ago by asn

Either merge them or turn the shared code into functions, actually.

comment:2 Changed 7 years ago by nickm

Keywords: tor-bridge added

comment:3 Changed 7 years ago by nickm

Component: Tor BridgeTor

comment:4 Changed 7 years ago by nickm

Milestone: Tor: 0.2.4.x-finalTor: 0.2.5.x-final

comment:5 Changed 6 years ago by nickm

Milestone: Tor: 0.2.5.x-finalTor: 0.2.6.x-final

comment:6 Changed 5 years ago by nickm

Keywords: 026-triaged-1 026-deferrable added

comment:7 Changed 5 years ago by nickm

Priority: normaltrivial

comment:8 Changed 5 years ago by andrea

Owner: set to andrea
Status: newassigned

comment:9 Changed 5 years ago by andrea

Status: assignedneeds_review

See my ticket6456 branch, including unit test verified against old and new version. This still needs review and testing with real pluggable transports.

comment:10 Changed 5 years ago by nickm

09:44 < nickm> ok. quick suggestion before merge: The uhnit tests should make 
               sure that the arguments to the mock functions have the right 
               values, I think.
09:44 < nickm> else the functions could pass the tests without actually parsing 
               the transport lines correctly

comment:11 Changed 5 years ago by nickm

Status: needs_reviewneeds_revision

comment:12 Changed 5 years ago by asn

FWIW, I tested this branch and it worked fine. I managed to connect to an obfs3 bridge with it, and then I managed to setup a bridge with an obfs3 PT.

comment:13 Changed 5 years ago by nickm

Resolution: implemented
Status: needs_revisionclosed

Okay. I've merged, resolved conflicts, added a changes file, fixed warnings, and added some XXX comments to the tests about checking the arguments to the mock functions. Thanks!

Note: See TracTickets for help on using tickets.