Mailing List Archive

r1231 - trunk/varnish-cache/bin/varnishd
Author: phk
Date: 2007-01-02 14:41:08 +0100 (Tue, 02 Jan 2007)
New Revision: 1231

Modified:
trunk/varnish-cache/bin/varnishd/cache_pass.c
trunk/varnish-cache/bin/varnishd/common.h
trunk/varnish-cache/bin/varnishd/storage_file.c
trunk/varnish-cache/bin/varnishd/varnishd.c
Log:
Polish as result of flexelint run and record a couple of thoughts.


Modified: trunk/varnish-cache/bin/varnishd/cache_pass.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache_pass.c 2006-12-18 15:58:59 UTC (rev 1230)
+++ trunk/varnish-cache/bin/varnishd/cache_pass.c 2007-01-02 13:41:08 UTC (rev 1231)
@@ -29,6 +29,9 @@
* $Id$
*
* XXX: charge bytes to srcaddr
+ * XXX: buffer to relieve backed ASAP.
+ * XXX: Check if response has any body
+ * XXX: Don't pass chunked to HTTP/1.0 client
*/

#include <stdio.h>

Modified: trunk/varnish-cache/bin/varnishd/common.h
===================================================================
--- trunk/varnish-cache/bin/varnishd/common.h 2006-12-18 15:58:59 UTC (rev 1230)
+++ trunk/varnish-cache/bin/varnishd/common.h 2007-01-02 13:41:08 UTC (rev 1231)
@@ -46,4 +46,3 @@
int TCP_parse(const char *str, char **addr, char **port);
int TCP_open(const char *addr, const char *port, int http);
void TCP_check(struct cli *cli, const char *addr, const char *port);
-

Modified: trunk/varnish-cache/bin/varnishd/storage_file.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/storage_file.c 2006-12-18 15:58:59 UTC (rev 1230)
+++ trunk/varnish-cache/bin/varnishd/storage_file.c 2007-01-02 13:41:08 UTC (rev 1231)
@@ -123,7 +123,7 @@
off_t o;
struct stat st;

- AN(sc != NULL);
+ AN(sc);
AZ(fstat(sc->fd, &st));

#if defined(HAVE_SYS_STATVFS_H) || defined(HAVE_SYS_VFS_H)

Modified: trunk/varnish-cache/bin/varnishd/varnishd.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/varnishd.c 2006-12-18 15:58:59 UTC (rev 1230)
+++ trunk/varnish-cache/bin/varnishd/varnishd.c 2007-01-02 13:41:08 UTC (rev 1231)
@@ -216,10 +216,12 @@
switch (sscanf(argv, "%u,%u,%u", &ua, &ub, &uc)) {
case 3:
params->wthread_timeout = uc;
+ /* FALLTHROUGH */
case 2:
if (ub < ua)
usage();
params->wthread_max = ub;
+ /* FALLTHROUGH */
case 1:
if (ua < 1)
usage();
@@ -386,6 +388,21 @@
cli[0].result = CLIS_OK;

heritage.socket = -1;
+
+ /*
+ * Set up a temporary param block until VSL_MgtInit() can
+ * replace with shmem backed structure version.
+ *
+ * XXX: I wonder if it would be smarter to inform the child process
+ * XXX: about param changes via CLI rather than keeping the param
+ * XXX: block in shared memory. It would give us the advantage
+ * XXX: of having the CLI thread be able to take action on the
+ * XXX: change.
+ * XXX: For now live with the harmless flexelint warning this causes:
+ * XXX: varnishd.c 393 Info 789: Assigning address of auto variable
+ * XXX: 'param' to static
+ */
+
memset(&param, 0, sizeof param);
params = &param;
mgt_vcc_init();