Commit e8d224df authored by Nick Mathewson's avatar Nick Mathewson 🦀
Browse files

Merge remote-tracking branch 'tor-gitlab/mr/335' into maint-0.4.5

parents d382f269 f93ccb8d
Loading
Loading
Loading
Loading

changes/ticket40334

0 → 100644
+3 −0
Original line number Diff line number Diff line
  o Minor bugfixes (onion service):
    - Remove a harmless BUG() warning when reloading tor configured with onion
      services. Fixes bug 40334; bugfix on 0.4.5.1-alpha.
+5 −3
Original line number Diff line number Diff line
@@ -149,9 +149,11 @@ hs_metrics_service_init(hs_service_t *service)
{
  tor_assert(service);

  /* Calling this function twice on a service object is wrong. The caller must
   * free the metrics before if so. */
  if (BUG(service->metrics.store)) {
  /* This function is called when we register a service and so it could either
   * be a new service or a service that was just reloaded through a HUP signal
   * for instance. Thus, it is possible that the service has already an
   * initialized store. If so, just return. */
  if (service->metrics.store) {
    return;
  }

+3 −1
Original line number Diff line number Diff line
@@ -197,7 +197,9 @@ register_service(hs_service_ht *map, hs_service_t *service)
  if (map == hs_service_map) {
    hs_service_map_has_changed();
  }
  /* Setup metrics. */
  /* Setup metrics. This is done here because in order to initialize metrics,
   * we require tor to have fully initialized a service so the ports of the
   * service can be looked at for instance. */
  hs_metrics_service_init(service);

  return 0;