Mailing List Archive

r1252 - in branches/1.0: . bin/varnishd
Author: des
Date: 2007-02-20 09:46:51 +0100 (Tue, 20 Feb 2007)
New Revision: 1252

Modified:
branches/1.0/
branches/1.0/bin/varnishd/cache_pass.c
branches/1.0/bin/varnishd/common.h
branches/1.0/bin/varnishd/storage_file.c
branches/1.0/bin/varnishd/varnishd.c
Log:
r34127 at cat (orig r1231): phk | 2007-01-02 14:41:08 +0100
Polish as result of flexelint run and record a couple of thoughts.




Property changes on: branches/1.0
___________________________________________________________________
Name: svk:merge
- d4fa192b-c00b-0410-8231-f00ffab90ce4:/trunk/varnish-cache:1230
+ d4fa192b-c00b-0410-8231-f00ffab90ce4:/trunk/varnish-cache:1231

Modified: branches/1.0/bin/varnishd/cache_pass.c
===================================================================
--- branches/1.0/bin/varnishd/cache_pass.c 2007-02-20 08:46:50 UTC (rev 1251)
+++ branches/1.0/bin/varnishd/cache_pass.c 2007-02-20 08:46:51 UTC (rev 1252)
@@ -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: branches/1.0/bin/varnishd/common.h
===================================================================
--- branches/1.0/bin/varnishd/common.h 2007-02-20 08:46:50 UTC (rev 1251)
+++ branches/1.0/bin/varnishd/common.h 2007-02-20 08:46:51 UTC (rev 1252)
@@ -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: branches/1.0/bin/varnishd/storage_file.c
===================================================================
--- branches/1.0/bin/varnishd/storage_file.c 2007-02-20 08:46:50 UTC (rev 1251)
+++ branches/1.0/bin/varnishd/storage_file.c 2007-02-20 08:46:51 UTC (rev 1252)
@@ -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: branches/1.0/bin/varnishd/varnishd.c
===================================================================
--- branches/1.0/bin/varnishd/varnishd.c 2007-02-20 08:46:50 UTC (rev 1251)
+++ branches/1.0/bin/varnishd/varnishd.c 2007-02-20 08:46:51 UTC (rev 1252)
@@ -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();