[tor-commits] [sbws/maint-1.1] fix:scanner: Move as_entry/as_exit into one function