[master] 5a490f0 Fix the wrong test for user-configured Transient storage.

Poul-Henning Kamp phk at varnish-cache.org
Tue May 24 09:00:54 CEST 2011


commit 5a490f0503c8f5e9e9b0ad9d1d078a384dd90f9b
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Tue May 24 06:44:35 2011 +0000

    Fix the wrong test for user-configured Transient storage.
    
    Spotted by:	nav

diff --git a/bin/varnishd/stevedore.c b/bin/varnishd/stevedore.c
index 1a6cab1..03df098 100644
--- a/bin/varnishd/stevedore.c
+++ b/bin/varnishd/stevedore.c
@@ -509,13 +509,11 @@ STV_Config(const char *spec)
 void
 STV_Config_Transient(void)
 {
-	const struct stevedore *stv;
 
 	ASSERT_MGT();
-	VTAILQ_FOREACH(stv, &stevedores, list)
-		if (!strcmp(stv->ident, TRANSIENT_STORAGE))
-			return;
-	STV_Config(TRANSIENT_STORAGE "=malloc");
+
+	if (stv_transient == NULL)
+		STV_Config(TRANSIENT_STORAGE "=malloc");
 }
 
 /*--------------------------------------------------------------------*/
@@ -529,6 +527,8 @@ stv_cli_list(struct cli *cli, const char * const *av, void *priv)
 	(void)av;
 	(void)priv;
 	cli_out(cli, "Storage devices:\n");
+	stv = stv_transient;
+		cli_out(cli, "\tstorage.%s = %s\n", stv->ident, stv->name);
 	VTAILQ_FOREACH(stv, &stevedores, list)
 		cli_out(cli, "\tstorage.%s = %s\n", stv->ident, stv->name);
 }



More information about the varnish-commit mailing list