From: amosjeffries <> Date: Fri, 18 May 2007 22:56:18 +0000 (+0000) Subject: Author: Tsantilos Christos X-Git-Tag: SQUID_3_0_PRE7~262 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=73d4127266ac19e0da4ee1603032f2a1d72532b7;p=thirdparty%2Fsquid.git Author: Tsantilos Christos Fix compile errors slipped into ICAP on string API patch. --- diff --git a/src/ICAP/ICAPXaction.cc b/src/ICAP/ICAPXaction.cc index 37ca83d21e..0156d33d6c 100644 --- a/src/ICAP/ICAPXaction.cc +++ b/src/ICAP/ICAPXaction.cc @@ -103,7 +103,7 @@ void ICAPXaction::openConnection() 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 @@ void ICAPXaction::openConnection() 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 @@ void ICAPXaction::closeConnection() 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 diff --git a/src/SqString.cc b/src/SqString.cc index c824b0f4be..cf55a32c22 100644 --- a/src/SqString.cc +++ b/src/SqString.cc @@ -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 @@ SqString::append(SqString const &old) 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) { diff --git a/src/SqString.h b/src/SqString.h index e05bf25bc4..8362b0c117 100644 --- a/src/SqString.h +++ b/src/SqString.h @@ -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 @@ public: _SQUID_INLINE_ int size() const; _SQUID_INLINE_ char const * c_str() const; + const char& operator [](unsigned int) const; char& operator [](unsigned int); void clear();