Re: cvs commit: squid3/src/ICAP ICAPConfig.cc ICAPConfig.h ....

From: Tsantilas Christos <chtsanti@dont-contact.us>
Date: Fri, 18 May 2007 11:44:00 +0300

Hi Amos,
  The ICAP client does not build with last changes .

First of all add the operator
const char& SqString::operator [](unsigned int pos) const
for use with const strings.

More over there are 1-2 conflicts in ICAP/ICAPXaction.cc

I am attaching a patch. Please look on it.
I did not test if squid3+icap works OK.
Today at the evening ........

Regards,
      Christos

Index: SqString.cc
===================================================================
RCS file: /squid/squid3/src/SqString.cc,v
retrieving revision 1.1
diff -u -r1.1 SqString.cc
--- SqString.cc 18 May 2007 06:44:35 -0000 1.1
+++ SqString.cc 18 May 2007 08:35:43 -0000
@@ -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: SqString.h
===================================================================
RCS file: /squid/squid3/src/SqString.h,v
retrieving revision 1.1
diff -u -r1.1 SqString.h
--- SqString.h 18 May 2007 06:44:35 -0000 1.1
+++ SqString.h 18 May 2007 08:35:43 -0000
@@ -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: ICAP/ICAPXaction.cc
===================================================================
RCS file: /squid/squid3/src/ICAP/ICAPXaction.cc,v
retrieving revision 1.16
diff -u -r1.16 ICAPXaction.cc
--- ICAP/ICAPXaction.cc 18 May 2007 06:41:30 -0000 1.16
+++ ICAP/ICAPXaction.cc 18 May 2007 08:35:46 -0000
@@ -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,10 @@
 
     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
+ }
 
     if (connection < 0)
         dieOnConnectionFailure(); // throws
@@ -173,12 +169,7 @@
         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
Received on Fri May 18 2007 - 02:45:02 MDT

This archive was generated by hypermail pre-2.1.9 : Fri Jun 01 2007 - 12:00:08 MDT