Commit e2122d21 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Polish as result of flexelint run and record a couple of thoughts.


git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@1231 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent 953d4ae0
...@@ -29,6 +29,9 @@ ...@@ -29,6 +29,9 @@
* $Id$ * $Id$
* *
* XXX: charge bytes to srcaddr * 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> #include <stdio.h>
......
...@@ -46,4 +46,3 @@ void TCP_myname(int sock, char *abuf, unsigned alen, char *pbuf, unsigned plen); ...@@ -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_parse(const char *str, char **addr, char **port);
int TCP_open(const char *addr, const char *port, int http); int TCP_open(const char *addr, const char *port, int http);
void TCP_check(struct cli *cli, const char *addr, const char *port); void TCP_check(struct cli *cli, const char *addr, const char *port);
...@@ -123,7 +123,7 @@ smf_calcsize(struct smf_sc *sc, const char *size, int newfile) ...@@ -123,7 +123,7 @@ smf_calcsize(struct smf_sc *sc, const char *size, int newfile)
off_t o; off_t o;
struct stat st; struct stat st;
AN(sc != NULL); AN(sc);
AZ(fstat(sc->fd, &st)); AZ(fstat(sc->fd, &st));
#if defined(HAVE_SYS_STATVFS_H) || defined(HAVE_SYS_VFS_H) #if defined(HAVE_SYS_STATVFS_H) || defined(HAVE_SYS_VFS_H)
......
...@@ -216,10 +216,12 @@ tackle_warg(const char *argv) ...@@ -216,10 +216,12 @@ tackle_warg(const char *argv)
switch (sscanf(argv, "%u,%u,%u", &ua, &ub, &uc)) { switch (sscanf(argv, "%u,%u,%u", &ua, &ub, &uc)) {
case 3: case 3:
params->wthread_timeout = uc; params->wthread_timeout = uc;
/* FALLTHROUGH */
case 2: case 2:
if (ub < ua) if (ub < ua)
usage(); usage();
params->wthread_max = ub; params->wthread_max = ub;
/* FALLTHROUGH */
case 1: case 1:
if (ua < 1) if (ua < 1)
usage(); usage();
...@@ -386,6 +388,21 @@ main(int argc, char *argv[]) ...@@ -386,6 +388,21 @@ main(int argc, char *argv[])
cli[0].result = CLIS_OK; cli[0].result = CLIS_OK;
heritage.socket = -1; 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); memset(&param, 0, sizeof param);
params = &param; params = &param;
mgt_vcc_init(); mgt_vcc_init();
......
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