Opened 10 months ago

Closed 9 months ago

#32163 closed enhancement (fixed)

Stop using HAVE_MODULE_{DIRAUTH,RELAY} inside functions

Reported by: teor Owned by: teor
Priority: Medium Milestone: Tor: 0.4.3.x-final
Component: Core Tor/Tor Version:
Severity: Normal Keywords: network-team-roadmap-november
Cc: nickm Actual Points: 0.1
Parent ID: #31851 Points: 0.1
Reviewer: nickm Sponsor: Sponsor31-can

Description (last modified by teor)

In doc/HACKING/, we say that we don't use module macros inside functions. But HAVE_MODULE_DIRAUTH and HAVE_MODULE_RELAY are used inside a few functions.

We should stop using HAVE_MODULE_DIRAUTH and HAVE_MODULE_RELAY inside functions, or update the documentation to say "avoid using".

Child Tickets

Change History (5)

comment:1 Changed 9 months ago by teor

Description: modified (diff)
Summary: Stop using HAVE_MODULE_DIRAUTH inside functionsStop using HAVE_MODULE_{DIRAUTH,RELAY} inside functions

#32213 removes the config.c HAVE_MODULE_DIRAUTH in functions.

The remaining uses are:

  • routerlist.c
  • subsystem_list.c

#32162 will remove the HAVE_MODULE_RELAY in functions.

comment:2 Changed 9 months ago by teor

Actual Points: 0.1
Keywords: network-team-roadmap-november added; tor-design network-team-roadmap-october removed
Points: 0.1
Reviewer: nickm
Status: newneeds_review
Type: defectenhancement

See my PR:

#32162 will remove the HAVE_MODULE_RELAY in router.c, by making the whole file relay-only. (And it's actually outside a function.)

comment:3 Changed 9 months ago by nickm

Status: needs_reviewmerge_ready

Short and simple. LGTM.

comment:4 Changed 9 months ago by teor

Owner: set to teor
Status: merge_readyassigned

comment:5 Changed 9 months ago by teor

Resolution: fixed
Status: assignedclosed

Merged to master.

Note: See TracTickets for help on using tickets.