---------------------
PatchSet 5218 
Date: 2002/10/04 13:36:29
Author: rbcollins
Branch: commloops
Tag: (none) 
Log:
minor fixups - assert after vars, NULL->0 for int assignment, and add a StoreIOBuffer to HttpStateData

Members: 
	configure.in:1.49.4.2->1.49.4.3 
	src/Makefile.am:1.16.10.2->1.16.10.3 
	src/cbdata.c:1.14.22.2->1.14.22.3 
	src/comm.c:1.21.4.16->1.21.4.17 
	src/enums.h:1.32.2.3->1.32.2.4 
	src/http.c:1.20.8.3->1.20.8.4 
	src/http.h:1.1->1.1.12.1 
	src/structs.h:1.51.4.3->1.51.4.4 

Index: squid/configure.in
===================================================================
RCS file: /cvsroot/squid-sf//squid/configure.in,v
retrieving revision 1.49.4.2
retrieving revision 1.49.4.3
diff -u -r1.49.4.2 -r1.49.4.3
--- squid/configure.in	26 Sep 2002 04:12:09 -0000	1.49.4.2
+++ squid/configure.in	4 Oct 2002 13:36:29 -0000	1.49.4.3
@@ -3,7 +3,7 @@
 dnl
 dnl  Duane Wessels, wessels@nlanr.net, February 1996 (autoconf v2.9)
 dnl
-dnl  $Id: configure.in,v 1.49.4.2 2002/09/26 04:12:09 adri Exp $
+dnl  $Id: configure.in,v 1.49.4.3 2002/10/04 13:36:29 rbcollins Exp $
 dnl
 dnl
 dnl
@@ -11,7 +11,7 @@
 AC_CONFIG_AUX_DIR(cfgaux)
 AM_INIT_AUTOMAKE(squid, 2.6-DEVEL)
 AM_CONFIG_HEADER(include/autoconf.h)
-AC_REVISION($Revision: 1.49.4.2 $)dnl
+AC_REVISION($Revision: 1.49.4.3 $)dnl
 AC_PREFIX_DEFAULT(/usr/local/squid)
 AM_MAINTAINER_MODE
 
@@ -2171,7 +2171,7 @@
 else
 	AC_MSG_RESULT("no")
 	echo "Will use our own inet_ntoa()."
-	LIBOBJS="$LIBOBJS inet_ntoa.o"
+	AC_LIBOBJ(inet_ntoa)
 #	echo "WARNING: This looks bad, and probably prevents Squid from working."
 #	echo "         If you're on IRIX and using GCC 2.8, you probably need"
 #	echo "         to use the IRIX C compiler instead."
Index: squid/src/Makefile.am
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/Makefile.am,v
retrieving revision 1.16.10.2
retrieving revision 1.16.10.3
diff -u -r1.16.10.2 -r1.16.10.3
--- squid/src/Makefile.am	26 Sep 2002 04:12:12 -0000	1.16.10.2
+++ squid/src/Makefile.am	4 Oct 2002 13:36:30 -0000	1.16.10.3
@@ -120,6 +120,7 @@
 	client_side_request.c \
 	clientStream.c \
 	comm.c \
+	comm.h \
 	comm_select.c \
 	comm_poll.c \
 	comm_kqueue.c \
@@ -143,6 +144,7 @@
 	helper.c \
 	$(HTCPSOURCE) \
 	http.c \
+	http.h \
 	HttpStatusLine.c \
 	HttpHdrCc.c \
 	HttpHdrRange.c \
Index: squid/src/cbdata.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/cbdata.c,v
retrieving revision 1.14.22.2
retrieving revision 1.14.22.3
diff -u -r1.14.22.2 -r1.14.22.3
--- squid/src/cbdata.c	26 Sep 2002 04:12:15 -0000	1.14.22.2
+++ squid/src/cbdata.c	4 Oct 2002 13:36:30 -0000	1.14.22.3
@@ -1,6 +1,6 @@
 
 /*
- * $Id: cbdata.c,v 1.14.22.2 2002/09/26 04:12:15 adri Exp $
+ * $Id: cbdata.c,v 1.14.22.3 2002/10/04 13:36:30 rbcollins Exp $
  *
  * DEBUG: section 45    Callback Data Registry
  * ORIGINAL AUTHOR: Duane Wessels
@@ -132,7 +132,6 @@
     CREATE_CBDATA(helper_server);
     CREATE_CBDATA(statefulhelper);
     CREATE_CBDATA(helper_stateful_server);
-    CREATE_CBDATA(HttpStateData);
     CREATE_CBDATA_FREE(peer, peerDestroy);
     CREATE_CBDATA(ps_state);
     CREATE_CBDATA(RemovalPolicy);
Index: squid/src/comm.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/comm.c,v
retrieving revision 1.21.4.16
retrieving revision 1.21.4.17
diff -u -r1.21.4.16 -r1.21.4.17
--- squid/src/comm.c	4 Oct 2002 12:43:21 -0000	1.21.4.16
+++ squid/src/comm.c	4 Oct 2002 13:36:30 -0000	1.21.4.17
@@ -1,6 +1,6 @@
 
 /*
- * $Id: comm.c,v 1.21.4.16 2002/10/04 12:43:21 adri Exp $
+ * $Id: comm.c,v 1.21.4.17 2002/10/04 13:36:30 rbcollins Exp $
  *
  * DEBUG: section 5     Socket Functions
  * AUTHOR: Harvest Derived
@@ -399,8 +399,9 @@
 static void
 comm_fill_read(int fd, char *buf, size_t len, comm_err_t flag, int xerrno, void *data)
 {
-    assert(fdc_table[fd].active == 1);
     StoreIOBuffer sb;
+    assert(fdc_table[fd].active == 1);
+
 
     sb = fdc_table[fd].fill.sb;
     if (flag != COMM_OK) {
@@ -573,7 +574,7 @@
     debug(5, 5) ("comm_open: FD %d is a new socket\n", new_socket);
     fd_open(new_socket, FD_SOCKET, note);
     fdd_table[new_socket].close_file = NULL;
-    fdd_table[new_socket].close_line = NULL;
+    fdd_table[new_socket].close_line = 0;
     assert(fdc_table[new_socket].active == 0);
     fdc_table[new_socket].active = 1;
     F = &fd_table[new_socket];
@@ -921,7 +922,7 @@
     /* fdstat update */
     fd_open(sock, FD_SOCKET, "HTTP Request");
     fdd_table[sock].close_file = NULL;
-    fdd_table[sock].close_line = NULL;
+    fdd_table[sock].close_line = 0;
     fdc_table[sock].active = 1;
     F = &fd_table[sock];
     xstrncpy(F->ipaddr, inet_ntoa(P.sin_addr), 16);
Index: squid/src/enums.h
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/enums.h,v
retrieving revision 1.32.2.3
retrieving revision 1.32.2.4
diff -u -r1.32.2.3 -r1.32.2.4
--- squid/src/enums.h	26 Sep 2002 04:12:19 -0000	1.32.2.3
+++ squid/src/enums.h	4 Oct 2002 13:36:31 -0000	1.32.2.4
@@ -1,6 +1,6 @@
 
 /*
- * $Id: enums.h,v 1.32.2.3 2002/09/26 04:12:19 adri Exp $
+ * $Id: enums.h,v 1.32.2.4 2002/10/04 13:36:31 rbcollins Exp $
  *
  *
  * SQUID Web Proxy Cache          http://www.squid-cache.org/
@@ -720,7 +720,6 @@
     CBDATA_helper_server,
     CBDATA_statefulhelper,
     CBDATA_helper_stateful_server,
-    CBDATA_HttpStateData,
     CBDATA_peer,
     CBDATA_ps_state,
     CBDATA_RemovalPolicy,
Index: squid/src/http.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/http.c,v
retrieving revision 1.20.8.3
retrieving revision 1.20.8.4
diff -u -r1.20.8.3 -r1.20.8.4
--- squid/src/http.c	26 Sep 2002 04:12:20 -0000	1.20.8.3
+++ squid/src/http.c	4 Oct 2002 13:36:31 -0000	1.20.8.4
@@ -1,6 +1,6 @@
 
 /*
- * $Id: http.c,v 1.20.8.3 2002/09/26 04:12:20 adri Exp $
+ * $Id: http.c,v 1.20.8.4 2002/10/04 13:36:31 rbcollins Exp $
  *
  * DEBUG: section 11    Hypertext Transfer Protocol (HTTP)
  * AUTHOR: Harvest Derived
@@ -39,6 +39,8 @@
  */
 
 #include "squid.h"
+#include "http.h"
+CBDATA_TYPE(HttpStateData);
 
 static const char *const crlf = "\r\n";
 
@@ -990,6 +992,7 @@
     debug(11, 3) ("httpStart: \"%s %s\"\n",
 	RequestMethodStr[orig_req->method],
 	storeUrl(fwd->entry));
+    CBDATA_INIT_TYPE(HttpStateData);
     httpState = cbdataAlloc(HttpStateData);
     storeLockObject(fwd->entry);
     httpState->fwd = fwd;
--- /dev/null	Wed Feb 14 01:05:20 2007
+++ squid/src/http.h	Wed Feb 14 01:07:19 2007
@@ -0,0 +1,55 @@
+
+/*
+ * $Id: http.h,v 1.1.12.1 2002/10/04 13:36:32 rbcollins Exp $
+ *
+ *
+ * SQUID Web Proxy Cache          http://www.squid-cache.org/
+ * ----------------------------------------------------------
+ *
+ *  Squid is the result of efforts by numerous individuals from
+ *  the Internet community; see the CONTRIBUTORS file for full
+ *  details.   Many organizations have provided support for Squid's
+ *  development; see the SPONSORS file for full details.  Squid is
+ *  Copyrighted (C) 2001 by the Regents of the University of
+ *  California; see the COPYRIGHT file for full details.  Squid
+ *  incorporates software developed and/or copyrighted by other
+ *  sources; see the CREDITS file for full details.
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *  
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *  
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA.
+ *
+ */
+
+#ifndef SQUID_HTTP_H
+#define SQUID_HTTP_H
+
+#include "StoreIOBuffer.h"
+
+struct _HttpStateData {
+    StoreEntry *entry;
+    request_t *request;
+    char *reply_hdr;
+    size_t reply_hdr_size;
+    int reply_hdr_state;
+    peer *_peer;                /* peer request made to */
+    int eof;                    /* reached end-of-object? */
+    request_t *orig_request;
+    int fd;
+    http_state_flags flags;
+    FwdState *fwd;
+    char buf[SQUID_TCP_SO_RCVBUF];
+    StoreIOBuffer recieveState;
+};  
+
+#endif /* SQUID_HTTP_H */
Index: squid/src/structs.h
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/structs.h,v
retrieving revision 1.51.4.3
retrieving revision 1.51.4.4
diff -u -r1.51.4.3 -r1.51.4.4
--- squid/src/structs.h	4 Oct 2002 12:43:23 -0000	1.51.4.3
+++ squid/src/structs.h	4 Oct 2002 13:36:32 -0000	1.51.4.4
@@ -1,6 +1,6 @@
 
 /*
- * $Id: structs.h,v 1.51.4.3 2002/10/04 12:43:23 adri Exp $
+ * $Id: structs.h,v 1.51.4.4 2002/10/04 13:36:32 rbcollins Exp $
  *
  *
  * SQUID Web Proxy Cache          http://www.squid-cache.org/
@@ -968,21 +968,6 @@
     unsigned int only_if_cached:1;
 };
 
-struct _HttpStateData {
-    StoreEntry *entry;
-    request_t *request;
-    char *reply_hdr;
-    size_t reply_hdr_size;
-    int reply_hdr_state;
-    peer *_peer;		/* peer request made to */
-    int eof;			/* reached end-of-object? */
-    request_t *orig_request;
-    int fd;
-    http_state_flags flags;
-    FwdState *fwd;
-    char buf[SQUID_TCP_SO_RCVBUF];
-};
-
 struct _icpUdpData {
     struct sockaddr_in address;
     void *msg;
