Changeset 4475
- Timestamp:
- 01/20/10 13:26:29 (6 months ago)
- Location:
- trunk/varnish-cache
- Files:
-
- 11 modified
-
bin/varnishd/cache.h (modified) (2 diffs)
-
bin/varnishd/cache_dir_random.c (modified) (1 diff)
-
bin/varnishd/cache_http.c (modified) (10 diffs)
-
bin/varnishd/flint.lnt (modified) (1 diff)
-
bin/varnishd/mgt_vcc.c (modified) (3 diffs)
-
bin/varnishd/stevedore.h (modified) (2 diffs)
-
bin/varnishd/stevedore_utils.c (modified) (3 diffs)
-
bin/varnishd/varnishd.c (modified) (2 diffs)
-
include/vbm.h (modified) (2 diffs)
-
lib/libvcl/vcc_compile.c (modified) (2 diffs)
-
lib/libvcl/vcc_compile.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/varnish-cache/bin/varnishd/cache.h
r4456 r4475 515 515 void http_ClrHeader(struct http *to); 516 516 unsigned http_Write(struct worker *w, const struct http *hp, int resp); 517 void http_CopyResp( struct http *to, const struct http *fm);518 void http_SetResp( struct http *to, const char *proto, const char *status,517 void http_CopyResp(const struct http *to, const struct http *fm); 518 void http_SetResp(const struct http *to, const char *proto, const char *status, 519 519 const char *response); 520 520 void http_FilterFields(struct worker *w, int fd, struct http *to, 521 521 const struct http *fm, unsigned how); 522 522 void http_FilterHeader(const struct sess *sp, unsigned how); 523 void http_PutProtocol(struct worker *w, int fd, struct http *to,523 void http_PutProtocol(struct worker *w, int fd, const struct http *to, 524 524 const char *protocol); 525 525 void http_PutStatus(struct worker *w, int fd, struct http *to, int status); 526 void http_PutResponse(struct worker *w, int fd, struct http *to,526 void http_PutResponse(struct worker *w, int fd, const struct http *to, 527 527 const char *response); 528 528 void http_PrintfHeader(struct worker *w, int fd, struct http *to, 529 529 const char *fmt, ...); 530 530 void http_SetHeader(struct worker *w, int fd, struct http *to, const char *hdr); 531 void http_SetH( struct http *to, unsigned n, const char *fm);532 void http_ForceGet( struct http *to);531 void http_SetH(const struct http *to, unsigned n, const char *fm); 532 void http_ForceGet(const struct http *to); 533 533 void http_Setup(struct http *ht, struct ws *ws); 534 534 int http_GetHdr(const struct http *hp, const char *hdr, char **ptr); … … 541 541 int http_DissectResponse(struct worker *w, const struct http_conn *htc, 542 542 struct http *sp); 543 const char *http_DoConnection( struct http *hp);544 void http_CopyHome(struct worker *w, int fd, struct http *hp);543 const char *http_DoConnection(const struct http *hp); 544 void http_CopyHome(struct worker *w, int fd, const struct http *hp); 545 545 void http_Unset(struct http *hp, const char *hdr); 546 546 -
trunk/varnish-cache/bin/varnishd/cache_dir_random.c
r4460 r4475 87 87 struct vdi_random *vs; 88 88 double r, s1; 89 unsigned u ;89 unsigned u = 0; 90 90 struct vbe_conn *vbe; 91 91 struct director *d2; -
trunk/varnish-cache/bin/varnishd/cache_http.c
r4467 r4475 285 285 286 286 const char * 287 http_DoConnection( struct http *hp)287 http_DoConnection(const struct http *hp) 288 288 { 289 289 char *p, *q; … … 589 589 590 590 void 591 http_SetH( struct http *to, unsigned n, const char *fm)591 http_SetH(const struct http *to, unsigned n, const char *fm) 592 592 { 593 593 … … 600 600 601 601 static void 602 http_copyh( struct http *to, const struct http *fm, unsigned n)602 http_copyh(const struct http *to, const struct http *fm, unsigned n) 603 603 { 604 604 … … 610 610 611 611 void 612 http_ForceGet( struct http *to)612 http_ForceGet(const struct http *to) 613 613 { 614 614 if (strcmp(http_GetReq(to), "GET")) … … 617 617 618 618 void 619 http_CopyResp( struct http *to, const struct http *fm)619 http_CopyResp(const struct http *to, const struct http *fm) 620 620 { 621 621 … … 631 631 632 632 void 633 http_SetResp( struct http *to, const char *proto, const char *status,633 http_SetResp(const struct http *to, const char *proto, const char *status, 634 634 const char *response) 635 635 { … … 743 743 744 744 void 745 http_CopyHome(struct worker *w, int fd, struct http *hp)745 http_CopyHome(struct worker *w, int fd, const struct http *hp) 746 746 { 747 747 unsigned u, l; … … 802 802 803 803 static void 804 http_PutField(struct worker *w, int fd, struct http *to, int field,804 http_PutField(struct worker *w, int fd, const struct http *to, int field, 805 805 const char *string) 806 806 { … … 825 825 826 826 void 827 http_PutProtocol(struct worker *w, int fd, struct http *to,827 http_PutProtocol(struct worker *w, int fd, const struct http *to, 828 828 const char *protocol) 829 829 { … … 844 844 845 845 void 846 http_PutResponse(struct worker *w, int fd, struct http *to,846 http_PutResponse(struct worker *w, int fd, const struct http *to, 847 847 const char *response) 848 848 { -
trunk/varnish-cache/bin/varnishd/flint.lnt
r4440 r4475 40 40 -esym(755, VTAILQ_*) 41 41 42 // XXX: I think this is a flexelint bug: 43 -esym(522, vbit_clr) 44 42 45 // Stuff used outside varnishd 43 46 -esym(759, BackSlash) -
trunk/varnish-cache/bin/varnishd/mgt_vcc.c
r4464 r4475 45 45 #include <unistd.h> 46 46 47 #include "compat/asprintf.h"48 47 #include "vsb.h" 49 48 … … 357 356 } 358 357 359 asprintf(&vcl,358 bprintf(buf, 360 359 "backend default {\n" 361 360 " .host = \"%s\";\n" … … 364 363 free(addr); 365 364 free(port); 365 vcl = strdup(buf); 366 366 AN(vcl); 367 367 bprintf(buf, "boot (-b %s)", b_arg); -
trunk/varnish-cache/bin/varnishd/stevedore.h
r4456 r4475 40 40 typedef struct storage *storage_alloc_f(struct stevedore *, size_t size, 41 41 struct objcore *); 42 typedef struct object *storage_alloc_obj_f(struct stevedore *, size_t size,43 double ttl);44 42 typedef void storage_trim_f(struct storage *, size_t size); 45 43 typedef void storage_free_f(struct storage *); … … 55 53 storage_open_f *open; /* called by cache process */ 56 54 storage_alloc_f *alloc; 57 storage_alloc_obj_f *allocobj;58 55 storage_trim_f *trim; 59 56 storage_free_f *free; -
trunk/varnish-cache/bin/varnishd/stevedore_utils.c
r4436 r4475 56 56 #endif 57 57 58 #include "compat/asprintf.h"59 58 #include "mgt.h" 60 59 #include "stevedore.h" … … 87 86 char *q; 88 87 int retval = 1; 88 char buf[FILENAME_MAX]; 89 89 90 90 AN(fn); … … 108 108 109 109 if (S_ISDIR(st.st_mode)) { 110 xxxassert(asprintf(&q, "%s/varnish.XXXXXX", fn) > 0); 111 XXXAN(q); 112 fd = mkstemp(q); 110 bprintf(buf, "%s/varnish.XXXXXX", fn); 111 fd = mkstemp(buf); 113 112 if (fd < 0) 114 113 ARGV_ERR("(%s) \"%s\" mkstemp(%s) failed (%s)\n", 115 114 ctx, fn, q, strerror(errno)); 116 *fnp = q; 115 *fnp = strdup(buf); 116 AN(*fnp); 117 117 retval = 2; 118 118 } else if (S_ISREG(st.st_mode)) { -
trunk/varnish-cache/bin/varnishd/varnishd.c
r4462 r4475 50 50 #include <unistd.h> 51 51 52 #include "compat/asprintf.h"53 52 #include "compat/daemon.h" 54 53 … … 439 438 uintptr_t a; 440 439 struct symbols *s; 441 int i; 442 443 p = NULL; 444 i = asprintf(&p, "nm -an %s 2>/dev/null", a0); 445 if (i < 0 || p == NULL) 446 return; 447 fi = popen(p, "r"); 448 free(p); 440 441 bprintf(buf, "nm -an %s 2>/dev/null", a0); 442 fi = popen(buf, "r"); 449 443 if (fi == NULL) 450 444 return; -
trunk/varnish-cache/include/vbm.h
r4446 r4475 86 86 87 87 static inline void 88 vbit_clr( struct vbitmap *vb, unsigned bit)88 vbit_clr(const struct vbitmap *vb, unsigned bit) 89 89 { 90 90 … … 94 94 95 95 static inline int 96 vbit_test( struct vbitmap *vb, unsigned bit)96 vbit_test(const struct vbitmap *vb, unsigned bit) 97 97 { 98 98 -
trunk/varnish-cache/lib/libvcl/vcc_compile.c
r4401 r4475 97 97 /*--------------------------------------------------------------------*/ 98 98 99 void100 Tl Free(struct tokenlist *tl, void *p)99 static void 100 TlDoFree(struct tokenlist *tl, void *p) 101 101 { 102 102 struct membit *mb; … … 116 116 p = calloc(len, 1); 117 117 assert(p != NULL); 118 Tl Free(tl, p);118 TlDoFree(tl, p); 119 119 return (p); 120 120 } -
trunk/varnish-cache/lib/libvcl/vcc_compile.h
r4405 r4475 177 177 void EncToken(struct vsb *sb, const struct token *t); 178 178 int IsMethod(const struct token *t); 179 void TlFree(struct tokenlist *tl, void *p);180 179 void *TlAlloc(struct tokenlist *tl, unsigned len); 181 180
