[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [tor-bugs] #18402 [Core Tor/Tor]: Reduce duplicate code in parse_*_time functions
#18402: Reduce duplicate code in parse_*_time functions
-------------------------------------------------+-------------------------
Reporter: icanhasaccount | Owner:
Type: enhancement | Status:
| needs_revision
Priority: Low | Milestone: Tor:
| 0.2.???
Component: Core Tor/Tor | Version: Tor:
| unspecified
Severity: Minor | Resolution:
Keywords: TorCoreTeam-postponed-201604, | Actual Points:
nickm-deferred-20160905 |
Parent ID: | Points: 1
Reviewer: yawning | Sponsor:
-------------------------------------------------+-------------------------
Comment (by icanhasaccount):
Hey all - I've had another look at this and its more complicated than I
first thought.
Looking at the 3 parse_*_time functions in util.c:
parse_rfc1123_time: called from parse_http_response, or/directory.c
The result of parse_rfc1123_time isn't actually used anywhere in this
function - could this be removed?
parse_http_time: called from directory_handle_command_get, /or/directory.c
if_modified_since always appears to be zero, so unless logging the failure
result of parse_http_time is useful it seems this could be removed as
well?
parse_iso_time_: called from rend_parse_v2_service_descriptor,
or/routerparse.c and entry_guards_parse_state_for_guard_selection,
or/entrynodes.c , both functions use the result of parse_is_time_ so this
appears fine.
So before revising the diff I thought I'd check as a first step if
parse_rfc1123_time and parse_http_time could (or should) be removed?
Thanks in advance
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/18402#comment:9>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs