};
struct workreq {
- unsigned magic;
-#define WORKREQ_MAGIC 0x5ccb4eb2
TAILQ_ENTRY(workreq) list;
struct sess *sess;
};
void http_FilterHeader(struct worker *w, int fd, struct http *to, struct http *fm, unsigned how);
void http_PrintfHeader(struct worker *w, int fd, struct http *to, const char *fmt, ...);
void http_SetHeader(struct worker *w, int fd, struct http *to, const char *hdr);
-int http_IsHdr(struct http_hdr *hh, char *hdr);
void http_Setup(struct http *ht, void *space, unsigned len);
int http_GetHdr(struct http *hp, const char *hdr, char **ptr);
int http_GetHdrField(struct http *hp, const char *hdr, const char *field, char **ptr);
void WSLR(struct worker *w, enum shmlogtag tag, unsigned id, const char *b, const char *e);
void WSL(struct worker *w, enum shmlogtag tag, unsigned id, const char *fmt, ...);
void WSL_Flush(struct worker *w);
-#define HERE() VSL(SLT_Debug, 0, "HERE: %s(%d)", __func__, __LINE__)
#define INCOMPL() do { \
VSL(SLT_Debug, 0, "INCOMPLETE AT: %s(%d)", __func__, __LINE__); \
fprintf(stderr,"INCOMPLETE AT: %s(%d)\n", (const char *)__func__, __LINE__); \
static unsigned nki;
static void
-vca_kq_sess(struct sess *sp, int arm)
+vca_kq_sess(struct sess *sp, short arm)
{
CHECK_OBJ_NOTNULL(sp, SESS_MAGIC);
#include <unistd.h>
#include "shmlog.h"
-#include "heritage.h"
#include "vcl.h"
#include "cache.h"
return (logmtx[hp->logtag][t]);
}
-#define VSLH(ax, bx, cx, dx) \
- VSLR(T((cx), (ax)), (bx), (cx)->hd[(dx)].b, (cx)->hd[(dx)].e);
-
#define WSLH(wx, ax, bx, cx, dx) \
WSLR(wx, T((cx), (ax)), (bx), (cx)->hd[(dx)].b, (cx)->hd[(dx)].e);
/*--------------------------------------------------------------------*/
-int
+static int
http_IsHdr(struct http_hdr *hh, char *hdr)
{
unsigned l;
struct worker *w;
pthread_t tp;
struct wq *qp;
- static unsigned nq;
+ static unsigned nq = 0;
unsigned onq;
onq = nq + 1;
MTX mtx;
} *srchash;
-unsigned nsrchash;
+static unsigned nsrchash;
static MTX stat_mtx;
/*--------------------------------------------------------------------
#include <netinet/in.h>
-static unsigned ipv4mask[] = {
+static uint32_t ipv4mask[] = {
[0] = 0xffffffff,
-#define M(n) [n] = (0xffffffff << (32 - n))
+#define M(n) [n] = (uint32_t)((uint64_t)0xffffffff << (32 - n))
M( 1), M( 2), M( 3), M( 4), M( 5), M( 6), M( 7), M( 8), M( 9), M(10),
M(11), M(12), M(13), M(14), M(15), M(16), M(17), M(18), M(19), M(20),
M(21), M(22), M(23), M(24), M(25), M(26), M(27), M(28), M(29), M(30),
-passes=3
+libh mgt_event.h
++libh ../../config.h
-header(../../config.h)
-e786 // String concatenation within initializer
-emacro(740, TAILQ_PREV) // Unusual pointer cast (incompatible indirect types)
+-emacro(740, TAILQ_LAST) // Unusual pointer cast (incompatible indirect types)
-emacro((826), TAILQ_PREV) // Suspicious pointer-to-pointer conversion (area too small)
+-emacro((826), TAILQ_LAST) // Suspicious pointer-to-pointer conversion (area too small)
-esym(534, printf) // Ignoring return value of function
start_child(void)
{
int i;
+ unsigned u;
char *p;
struct ev *e;
AZ(close(heritage.fds[2]));
heritage.fds[2] = -1;
child_pid = i;
- if (mgt_push_vcls_and_start(&i, &p)) {
+ if (mgt_push_vcls_and_start(&u, &p)) {
fprintf(stderr, "Pushing vcls failed:\n%s\n", p);
free(p);
/* Pick up any stuff lingering on stdout/stderr */
#include "mgt.h"
#include "mgt_cli.h"
-#include "vsb.h"
#include "heritage.h"
struct parspec;
#define DELAYED_EFFECT \
"\nNB: This parameter will take some time to take effect.\n"
-#define SHOULD_RESTART \
- "\nNB: This parameter will not take full effect until the " \
- "child process has been restarted.\n"
-
#define MUST_RESTART \
"\nNB: This parameter will not take any effect until the " \
"child process has been restarted.\n"
va_start(ap, fmt);
- p = strchr(fmt, '%');
- if (p == NULL) {
+ if (strchr(fmt, '%') == NULL) {
VSLR(tag, id, fmt, NULL);
return;
}
va_start(ap, fmt);
- p = strchr(fmt, '%');
- if (p == NULL) {
+ if (strchr(fmt, '%') == NULL) {
WSLR(w, tag, id, fmt, NULL);
return;
}
setbuf(stderr, NULL);
memset(cli, 0, sizeof cli);
- cli->sb = vsb_new(NULL, NULL, 0, VSB_AUTOEXTEND);
- XXXAN(cli->sb);
- cli->result = CLIS_OK;
+ cli[0].sb = vsb_new(NULL, NULL, 0, VSB_AUTOEXTEND);
+ XXXAN(cli[0].sb);
+ cli[0].result = CLIS_OK;
heritage.socket = -1;
memset(¶m, 0, sizeof param);