Commit 4fdd9426 authored by Dag Erling Smørgrav's avatar Dag Erling Smørgrav

r34127@cat (orig r1231): phk | 2007-01-02 14:41:08 +0100

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


git-svn-id: http://www.varnish-cache.org/svn/branches/1.0@1252 d4fa192b-c00b-0410-8231-f00ffab90ce4
parents 666bfff0 e2122d21
......@@ -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>
......
......@@ -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);
......@@ -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)
......
......@@ -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();
......
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