From: wessels <> Date: Fri, 13 Mar 1998 12:40:46 +0000 (+0000) Subject: use mem.c for HttpStateData X-Git-Tag: SQUID_3_0_PRE1~3852 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cb87dab690cbebea51c9a949a7c7d14b6cb416b7;p=thirdparty%2Fsquid.git use mem.c for HttpStateData --- diff --git a/src/enums.h b/src/enums.h index 16524fc7a2..1a5867ec58 100644 --- a/src/enums.h +++ b/src/enums.h @@ -485,7 +485,7 @@ typedef enum { MEM_HTTP_HDR_RANGE_SPEC, MEM_HTTP_HDR_RANGE, MEM_HTTP_HDR_CONTENT_RANGE, - MEM_HTTPSTATEDATA, + MEM_HTTP_STATE_DATA, MEM_ICPUDPDATA, MEM_CLIENTHTTPREQUEST, MEM_CONNSTATEDATA, diff --git a/src/http.cc b/src/http.cc index ad2543d64b..c188f61843 100644 --- a/src/http.cc +++ b/src/http.cc @@ -1,6 +1,6 @@ /* - * $Id: http.cc,v 1.250 1998/03/07 23:43:07 rousskov Exp $ + * $Id: http.cc,v 1.251 1998/03/13 05:40:46 wessels Exp $ * * DEBUG: section 11 Hypertext Transfer Protocol (HTTP) * AUTHOR: Harvest Derived @@ -802,10 +802,10 @@ httpSocketOpen(StoreEntry * entry, request_t * request) static HttpStateData * httpBuildState(int fd, StoreEntry * entry, request_t * orig_request, peer * e) { - HttpStateData *httpState = xcalloc(1, sizeof(HttpStateData)); + HttpStateData *httpState = memAllocate(MEM_HTTP_STATE_DATA); request_t *request; storeLockObject(entry); - cbdataAdd(httpState, MEM_NONE); + cbdataAdd(httpState, MEM_HTTP_STATE_DATA); httpState->entry = entry; httpState->fd = fd; if (e) { @@ -813,11 +813,7 @@ httpBuildState(int fd, StoreEntry * entry, request_t * orig_request, peer * e) request->method = orig_request->method; xstrncpy(request->host, e->host, SQUIDHOSTNAMELEN); request->port = e->http_port; -#if 0 - xstrncpy(request->urlpath, storeUrl(entry), MAX_URL); -#else stringReset(&request->urlpath, storeUrl(entry)); -#endif httpState->request = requestLink(request); httpState->peer = e; httpState->orig_request = requestLink(orig_request);