Commit 174ca62a authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Also initialize the temp_rwl for labels

parent c9f721bb
......@@ -272,15 +272,6 @@ vcl_get(struct vcl **vcc, struct vcl *vcl)
Lck_Unlock(&vcl_mtx);
}
static void
vcl_get_active(struct vcl **vcc)
{
while (vcl_active == NULL)
(void)usleep(100000);
vcl_get(vcc, vcl_active);
}
void
VCL_Refresh(struct vcl **vcc)
{
......@@ -289,7 +280,11 @@ VCL_Refresh(struct vcl **vcc)
return;
if (*vcc != NULL)
VCL_Rel(vcc); /* XXX: optimize locking */
vcl_get_active(vcc);
while (vcl_active == NULL)
(void)usleep(100000);
vcl_get(vcc, vcl_active);
}
void
......@@ -915,6 +910,7 @@ vcl_cli_label(struct cli *cli, const char * const *av, void *priv)
bprintf(lbl->state, "%s", VCL_TEMP_LABEL);
lbl->temp = VCL_TEMP_WARM;
REPLACE(lbl->loaded_name, av[2]);
AZ(errno=pthread_rwlock_init(&vcl->temp_rwl, NULL));
VTAILQ_INSERT_TAIL(&vcl_head, lbl, list);
}
if (lbl->label != NULL)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment