File 10806.patch of Package squid-beta

---------------------
PatchSet 10806 
Date: 2007/05/18 16:56:18
Author: amosjeffries
Branch: HEAD
Tag: (none) 
Log:
Author: Tsantilos Christos <chtsanti@users.sourceforge.net>
Fix compile errors slipped into ICAP on string API patch.

Members: 
	src/SqString.cc:1.1->1.2 
	src/SqString.h:1.1->1.2 
	src/ICAP/ICAPXaction.cc:1.16->1.17 

Index: squid3/src/SqString.cc
===================================================================
RCS file: /cvsroot/squid/squid3/src/SqString.cc,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- squid3/src/SqString.cc	18 May 2007 06:44:35 -0000	1.1
+++ squid3/src/SqString.cc	18 May 2007 16:56:18 -0000	1.2
@@ -1,6 +1,6 @@
 
 /*
- * $Id: SqString.cc,v 1.1 2007/05/18 06:44:35 amosjeffries Exp $
+ * $Id: SqString.cc,v 1.2 2007/05/18 16:56:18 amosjeffries Exp $
  *
  * DEBUG: section 67    String
  * AUTHOR: Duane Wessels
@@ -234,6 +234,14 @@
     append (old.c_str(), old.len_);
 }
 
+const char&
+SqString::operator [](unsigned int pos) const
+{
+    assert(pos < size_ );
+
+    return buf_[pos];
+}
+
 char&
 SqString::operator [](unsigned int pos)
 {
Index: squid3/src/SqString.h
===================================================================
RCS file: /cvsroot/squid/squid3/src/SqString.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- squid3/src/SqString.h	18 May 2007 06:44:35 -0000	1.1
+++ squid3/src/SqString.h	18 May 2007 16:56:18 -0000	1.2
@@ -1,6 +1,6 @@
 
 /*
- * $Id: SqString.h,v 1.1 2007/05/18 06:44:35 amosjeffries Exp $
+ * $Id: SqString.h,v 1.2 2007/05/18 16:56:18 amosjeffries Exp $
  *
  * DEBUG: section 67    String
  * AUTHOR: Duane Wessels
@@ -99,6 +99,7 @@
     _SQUID_INLINE_ int size() const;
     _SQUID_INLINE_ char const * c_str() const;
 
+    const char& operator [](unsigned int) const;
     char& operator [](unsigned int);
 
     void clear();
Index: squid3/src/ICAP/ICAPXaction.cc
===================================================================
RCS file: /cvsroot/squid/squid3/src/ICAP/ICAPXaction.cc,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- squid3/src/ICAP/ICAPXaction.cc	18 May 2007 06:41:30 -0000	1.16
+++ squid3/src/ICAP/ICAPXaction.cc	18 May 2007 16:56:18 -0000	1.17
@@ -103,7 +103,7 @@
     const ICAPServiceRep &s = service();
 
     // TODO: check whether NULL domain is appropriate here
-    connection = icapPconnPool->pop(s.host.buf(), s.port, NULL, NULL, isRetriable);
+    connection = icapPconnPool->pop(s.host.c_str(), s.port, NULL, NULL, isRetriable);
     if (connection >= 0) {
         debugs(93,3, HERE << "reused pconn FD " << connection);
         connector = &ICAPXaction_noteCommConnected; // make doneAll() false
@@ -118,14 +118,8 @@
 
     disableRetries(); // we only retry pconn failures
 
-<<<<<<< ICAPXaction.cc
-    if (connection < 0) {
-        connection = comm_open(SOCK_STREAM, 0, getOutgoingAddr(NULL), 0,
-                               COMM_NONBLOCKING, s.uri.c_str());
-=======
     connection = comm_open(SOCK_STREAM, 0, getOutgoingAddr(NULL), 0,
-        COMM_NONBLOCKING, s.uri.buf());
->>>>>>> 1.15
+                           COMM_NONBLOCKING, s.uri.c_str());
 
     if (connection < 0)
         dieOnConnectionFailure(); // throws
@@ -173,12 +167,8 @@
         if (reuseConnection) {
             debugs(93,3, HERE << "pushing pconn" << status());
             commSetTimeout(connection, -1, NULL, NULL);
-<<<<<<< ICAPXaction.cc
             icapPconnPool->push(connection, theService->host.c_str(), theService->port, NULL, NULL);
-=======
-            icapPconnPool->push(connection, theService->host.buf(), theService->port, NULL, NULL);
             disableRetries();
->>>>>>> 1.15
         } else {
             debugs(93,3, HERE << "closing pconn" << status());
             // comm_close will clear timeout