Changeset f9b195


Ignore:
Timestamp:
2007-09-25 08:06:18 (7 years ago)
Author:
Poul-Henning Kamp <phk@…>
Branches:
master, 1.2, 3.0, 4.0, experimental-ims
Children:
515c8d
Parents:
8117262
git-author:
Poul-Henning Kamp <phk@…> (2007-09-25 08:06:18)
git-committer:
Poul-Henning Kamp <phk@…> (2007-09-25 08:06:18)
Message:

Const'ifcation

git-svn-id:  http://www.varnish-cache.org/svn/trunk/varnish-cache@2018 d4fa192b-c00b-0410-8231-f00ffab90ce4

Location:
bin/varnishd
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • bin/varnishd/cache.h

    r8117262 rf9b195  
    402402 
    403403/* convenience functions for backend methods */ 
    404 int VBE_TryConnect(struct sess *sp, struct addrinfo *ai); 
     404int VBE_TryConnect(const struct sess *sp, const struct addrinfo *ai); 
    405405int VBE_CheckFd(int fd); 
    406406 
     
    436436 
    437437/* cache_hash.c */ 
    438 void HSH_Prealloc(struct sess *sp); 
    439 int HSH_Compare(struct sess *sp, struct objhead *o); 
    440 void HSH_Copy(struct sess *sp, struct objhead *o); 
     438void HSH_Prealloc(const struct sess *sp); 
     439int HSH_Compare(const struct sess *sp, const struct objhead *o); 
     440void HSH_Copy(struct sess *sp, const struct objhead *o); 
    441441struct object *HSH_Lookup(struct sess *sp); 
    442442void HSH_Unbusy(struct object *o); 
     
    450450void http_ClrHeader(struct http *to); 
    451451unsigned http_Write(struct worker *w, struct http *hp, int resp); 
    452 void http_CopyResp(struct http *to, struct http *fm); 
     452void http_CopyResp(struct http *to, const struct http *fm); 
    453453void http_SetResp(struct http *to, const char *proto, const char *status, const char *response); 
    454 void http_FilterFields(struct worker *w, int fd, struct http *to, struct http *fm, unsigned how); 
     454void http_FilterFields(struct worker *w, int fd, struct http *to, const struct http *fm, unsigned how); 
    455455void http_FilterHeader(struct sess *sp, unsigned how); 
    456456void http_PutProtocol(struct worker *w, int fd, struct http *to, const char *protocol); 
     
    461461void http_SetH(struct http *to, unsigned n, const char *fm); 
    462462void http_Setup(struct http *ht, void *space, unsigned len); 
    463 int http_GetHdr(struct http *hp, const char *hdr, char **ptr); 
    464 int http_GetHdrField(struct http *hp, const char *hdr, const char *field, char **ptr); 
    465 int http_GetStatus(struct http *hp); 
    466 const char *http_GetReq(struct http *hp); 
    467 const char *http_GetProto(struct http *hp); 
     463int http_GetHdr(const struct http *hp, const char *hdr, char **ptr); 
     464int http_GetHdrField(const struct http *hp, const char *hdr, const char *field, char **ptr); 
     465int http_GetStatus(const struct http *hp); 
     466const char *http_GetReq(const struct http *hp); 
     467const char *http_GetProto(const struct http *hp); 
    468468int http_HdrIs(struct http *hp, const char *hdr, const char *val); 
    469469int http_GetTail(struct http *hp, unsigned len, char **b, char **e); 
  • bin/varnishd/cache_backend.c

    rfb6223 rf9b195  
    6363 
    6464int 
    65 VBE_TryConnect(struct sess *sp, struct addrinfo *ai) 
     65VBE_TryConnect(const struct sess *sp, const struct addrinfo *ai) 
    6666{ 
    6767        struct sockaddr_storage ss; 
     
    338338 
    339339static void 
    340 VBE_AddBackendMethod(struct backend_method *bem) 
     340VBE_AddBackendMethod(const struct backend_method *bem) 
    341341{ 
    342342 
  • bin/varnishd/cache_fetch.c

    r17662d rf9b195  
    5050 
    5151static int 
    52 fetch_straight(struct sess *sp, int fd, struct http *hp, char *b) 
     52fetch_straight(struct sess *sp, int fd, struct http *hp, const char *b) 
    5353{ 
    5454        int i; 
  • bin/varnishd/cache_hash.c

    r17662d rf9b195  
    6868/* Precreate an objhead and object for later use */ 
    6969void 
    70 HSH_Prealloc(struct sess *sp) 
     70HSH_Prealloc(const struct sess *sp) 
    7171{ 
    7272        struct worker *w; 
     
    111111 
    112112int 
    113 HSH_Compare(struct sess *sp, struct objhead *obj) 
     113HSH_Compare(const struct sess *sp, const struct objhead *obj) 
    114114{ 
    115115        int i; 
     
    139139 
    140140void 
    141 HSH_Copy(struct sess *sp, struct objhead *obj) 
     141HSH_Copy(struct sess *sp, const struct objhead *obj) 
    142142{ 
    143143        unsigned u, v; 
  • bin/varnishd/cache_http.c

    rfdedf4 rf9b195  
    8080 
    8181static enum shmlogtag 
    82 http2shmlog(struct http *hp, enum httptag t) 
     82http2shmlog(const struct http *hp, enum httptag t) 
    8383{ 
    8484 
     
    9090 
    9191static void 
    92 WSLH(struct worker *w, enum httptag t, unsigned fd, struct http *hp, int hdr) 
     92WSLH(struct worker *w, enum httptag t, unsigned fd, const struct http *hp, int hdr) 
    9393{ 
    9494 
     
    175175 
    176176static int 
    177 http_IsHdr(struct http_hdr *hh, const char *hdr) 
     177http_IsHdr(const struct http_hdr *hh, const char *hdr) 
    178178{ 
    179179        unsigned l; 
     
    192192 
    193193static unsigned 
    194 http_findhdr(struct http *hp, unsigned l, const char *hdr) 
     194http_findhdr(const struct http *hp, unsigned l, const char *hdr) 
    195195{ 
    196196        unsigned u; 
     
    211211 
    212212int 
    213 http_GetHdr(struct http *hp, const char *hdr, char **ptr) 
     213http_GetHdr(const struct http *hp, const char *hdr, char **ptr) 
    214214{ 
    215215        unsigned u, l; 
     
    235235 
    236236int 
    237 http_GetHdrField(struct http *hp, const char *hdr, const char *field, char **ptr) 
     237http_GetHdrField(const struct http *hp, const char *hdr, const char *field, char **ptr) 
    238238{ 
    239239        char *h; 
     
    374374 
    375375int 
    376 http_GetStatus(struct http *hp) 
     376http_GetStatus(const struct http *hp) 
    377377{ 
    378378 
     
    383383 
    384384const char * 
    385 http_GetProto(struct http *hp) 
     385http_GetProto(const struct http *hp) 
    386386{ 
    387387        AN(hp->hd[HTTP_HDR_PROTO].b); 
     
    390390 
    391391const char * 
    392 http_GetReq(struct http *hp) 
     392http_GetReq(const struct http *hp) 
    393393{ 
    394394        AN(hp->hd[HTTP_HDR_REQ].b); 
     
    705705 
    706706static void 
    707 http_copyh(struct http *to, struct http *fm, unsigned n) 
     707http_copyh(struct http *to, const struct http *fm, unsigned n) 
    708708{ 
    709709 
     
    716716 
    717717static void 
    718 http_copyreq(struct http *to, struct http *fm, int transparent) 
     718http_copyreq(struct http *to, const struct http *fm, int transparent) 
    719719{ 
    720720 
     
    733733 
    734734void 
    735 http_CopyResp(struct http *to, struct http *fm) 
     735http_CopyResp(struct http *to, const struct http *fm) 
    736736{ 
    737737 
     
    757757 
    758758static void 
    759 http_copyheader(struct worker *w, int fd, struct http *to, struct http *fm, unsigned n) 
     759http_copyheader(struct worker *w, int fd, struct http *to, const struct http *fm, unsigned n) 
    760760{ 
    761761 
     
    777777 
    778778void 
    779 http_FilterFields(struct worker *w, int fd, struct http *to, struct http *fm, unsigned how) 
     779http_FilterFields(struct worker *w, int fd, struct http *to, const struct http *fm, unsigned how) 
    780780{ 
    781781        unsigned u; 
  • bin/varnishd/cache_vrt.c

    re0c4fe rf9b195  
    7676 
    7777static struct http * 
    78 vrt_selecthttp(struct sess *sp, enum gethdr_e where) 
     78vrt_selecthttp(const struct sess *sp, enum gethdr_e where) 
    7979{ 
    8080        struct http *hp; 
  • bin/varnishd/rfc2616.c

    rc6bcb4 rf9b195  
    100100 
    101101static double 
    102 RFC2616_Ttl(struct sess *sp, struct http *hp, struct object *obj) 
     102RFC2616_Ttl(const struct sess *sp, struct http *hp, struct object *obj) 
    103103{ 
    104104        int retirement_age; 
  • bin/varnishd/stevedore.c

    r17662d rf9b195  
    9393 
    9494static int 
    95 cmp_storage(struct stevedore *s, const char *p, const char *q) 
     95cmp_storage(const struct stevedore *s, const const char *p, const char *q) 
    9696{ 
    9797        if (strlen(s->name) != q - p) 
Note: See TracChangeset for help on using the changeset viewer.