aboutsummaryrefslogtreecommitdiff
path: root/src/feature/hs/hs_service.c
diff options
context:
space:
mode:
authorGeorge Kadianakis <desnacked@riseup.net>2020-03-30 23:24:33 +0300
committerGeorge Kadianakis <desnacked@riseup.net>2020-03-30 23:37:26 +0300
commit8fda94f944f00f6f436604038ce135ab70f4feb4 (patch)
tree6b51d59c8d229c7fdf05951b048bfb5f3be41470 /src/feature/hs/hs_service.c
parent0667a5af8df8f372f6482254ca24c66268ed02f8 (diff)
downloadtor-8fda94f944f00f6f436604038ce135ab70f4feb4.tar.gz
tor-8fda94f944f00f6f436604038ce135ab70f4feb4.zip
hs-v3: Move ob_subcreds to hs_service_state_t.
It's more natural there since it's runtime state.
Diffstat (limited to 'src/feature/hs/hs_service.c')
-rw-r--r--src/feature/hs/hs_service.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/feature/hs/hs_service.c b/src/feature/hs/hs_service.c
index 367f8ca2b3..ed4d1af145 100644
--- a/src/feature/hs/hs_service.c
+++ b/src/feature/hs/hs_service.c
@@ -896,11 +896,11 @@ move_hs_state(hs_service_t *src_service, hs_service_t *dst_service)
dst->next_rotation_time = src->next_rotation_time;
- if (src_service->ob_subcreds) {
- dst_service->ob_subcreds = src_service->ob_subcreds;
- dst_service->n_ob_subcreds = src_service->n_ob_subcreds;
+ if (src->ob_subcreds) {
+ dst->ob_subcreds = src->ob_subcreds;
+ dst->n_ob_subcreds = src->n_ob_subcreds;
- src_service->ob_subcreds = NULL; /* steal pointer reference */
+ src->ob_subcreds = NULL; /* steal pointer reference */
}
}
@@ -4162,8 +4162,8 @@ hs_service_free_(hs_service_t *service)
}
/* Free onionbalance subcredentials (if any) */
- if (service->ob_subcreds) {
- tor_free(service->ob_subcreds);
+ if (service->state.ob_subcreds) {
+ tor_free(service->state.ob_subcreds);
}
/* Wipe service keys. */