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
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
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
/*
- * $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
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)
{
/*
- * $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
_SQUID_INLINE_ int size() const;
_SQUID_INLINE_ char const * c_str() const;
+ const char& operator [](unsigned int) const;
char& operator [](unsigned int);
void clear();