From: Ian Jackson Date: Thu, 30 Dec 2021 02:23:14 +0000 (+0000) Subject: site: promote creation of st->scratch X-Git-Tag: v0.6.2~26 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=82212213f9c76ebd6e490b500d0cbe075c3583a2;p=secnet.git site: promote creation of st->scratch Without this, peer keyset loading does not work after restart! Signed-off-by: Ian Jackson --- diff --git a/site.c b/site.c index 22cffbd..8983796 100644 --- a/site.c +++ b/site.c @@ -2344,6 +2344,9 @@ static list_t *site_apply(closure_t *self, struct cloc loc, dict_t *context, st->peerkeys_tmpl.buffer=0; st->peerkeys_current=st->peerkeys_kex=0; + buffer_new(&st->scratch,SETUP_BUFFER_LEN); + BUF_ALLOC(&st->scratch,"site:scratch"); + /* First parameter must be a dict */ item=list_elem(args,0); if (!item || item->type!=t_dict) @@ -2508,9 +2511,6 @@ static list_t *site_apply(closure_t *self, struct cloc loc, dict_t *context, buffer_new(&st->buffer,SETUP_BUFFER_LEN); - buffer_new(&st->scratch,SETUP_BUFFER_LEN); - BUF_ALLOC(&st->scratch,"site:scratch"); - /* We are interested in poll(), but only for timeouts. We don't have any fds of our own. */ register_for_poll(st, site_beforepoll, site_afterpoll, "site");