]> err.no Git - varnish/commitdiff
Polish as result of flexelint run and record a couple of thoughts.
authorphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Tue, 2 Jan 2007 13:41:08 +0000 (13:41 +0000)
committerphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Tue, 2 Jan 2007 13:41:08 +0000 (13:41 +0000)
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@1231 d4fa192b-c00b-0410-8231-f00ffab90ce4

varnish-cache/bin/varnishd/cache_pass.c
varnish-cache/bin/varnishd/common.h
varnish-cache/bin/varnishd/storage_file.c
varnish-cache/bin/varnishd/varnishd.c

index 3861c98acbbb570dcfba0dd5ea9b8a872a847300..a7293b7f6d24c7263ff68fa73c886e16c0250144 100644 (file)
@@ -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>
index a46f36b087c571c80bb9db2c4c0c57d4218a58ee..70719aa9074092dd784b678388ffd5f19cb470e9 100644 (file)
@@ -46,4 +46,3 @@ void TCP_myname(int sock, char *abuf, unsigned alen, char *pbuf, unsigned plen);
 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);
-
index 229cfe54b8620291a3120c905d91bf08ebb208a5..9fb728e32d939b8112b5722975df271e34d06eab 100644 (file)
@@ -123,7 +123,7 @@ smf_calcsize(struct smf_sc *sc, const char *size, int newfile)
        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)
index 90b88b50b05733f6211d306188509eb59941e6ce..0f21ed16510f1f7a2782d8f9ad81aee578dad801 100644 (file)
@@ -216,10 +216,12 @@ tackle_warg(const char *argv)
        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 @@ main(int argc, char *argv[])
        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();