You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@trafficserver.apache.org by James Peach <jp...@apache.org> on 2014/08/01 17:40:50 UTC
Re: git commit: TS-2802: SNI support for origin servers - fix WCCP
compile errors.
Thanks Alan!
On Aug 1, 2014, at 7:20 AM, amc@apache.org wrote:
> Repository: trafficserver
> Updated Branches:
> refs/heads/master 4b2429b60 -> 426879358
>
>
> TS-2802: SNI support for origin servers - fix WCCP compile errors.
>
>
> Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
> Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/42687935
> Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/42687935
> Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/42687935
>
> Branch: refs/heads/master
> Commit: 426879358105f80785ceeb4ca375581b0c7cf79a
> Parents: 4b2429b
> Author: Alan M. Carroll <am...@network-geographics.com>
> Authored: Fri Aug 1 09:17:08 2014 -0500
> Committer: Alan M. Carroll <am...@network-geographics.com>
> Committed: Fri Aug 1 09:17:08 2014 -0500
>
> ----------------------------------------------------------------------
> lib/ts/TsBuffer.h | 26 +++++++++-----------------
> lib/tsconfig/TsValue.cc | 6 +++---
> lib/tsconfig/TsValue.h | 6 +++---
> lib/wccp/WccpLocal.h | 2 +-
> proxy/http/HttpTransact.cc | 1 -
> 5 files changed, 16 insertions(+), 25 deletions(-)
> ----------------------------------------------------------------------
>
>
> http://git-wip-us.apache.org/repos/asf/trafficserver/blob/42687935/lib/ts/TsBuffer.h
> ----------------------------------------------------------------------
> diff --git a/lib/ts/TsBuffer.h b/lib/ts/TsBuffer.h
> index 1abc6fe..4ed8ccc 100644
> --- a/lib/ts/TsBuffer.h
> +++ b/lib/ts/TsBuffer.h
> @@ -52,7 +52,7 @@ namespace ts {
> char * _ptr; ///< Pointer to base of memory chunk.
> size_t _size; ///< Size of memory chunk.
>
> - /// Default constructor.
> + /// Default constructor (empty buffer).
> Buffer();
>
> /** Construct from pointer and size.
> @@ -65,13 +65,11 @@ namespace ts {
> );
> /** Construct from two pointers.
> @note This presumes a half open range, (start, end]
> - @note Due to ambiguity issues do not invoke this with
> - @a start == 0.
> */
> Buffer(
> - char* start, ///< First valid character.
> - char* end ///< First invalid character.
> - );
> + char* start, ///< First valid character.
> + char* end ///< First invalid character.
> + );
>
> /** Equality.
> @return @c true if @a that refers to the same memory as @a this,
> @@ -129,10 +127,6 @@ namespace ts {
>
> /** A chunk of read only memory.
> A convenience class because we pass this kind of pair frequently.
> -
> - @note The default construct leaves the object
> - uninitialized. This is for performance reasons. To construct an
> - empty @c Buffer use @c Buffer(0).
> */
> struct ConstBuffer {
> typedef ConstBuffer self; ///< Self reference type.
> @@ -141,12 +135,10 @@ namespace ts {
> char const * _ptr; ///< Pointer to base of memory chunk.
> size_t _size; ///< Size of memory chunk.
>
> - /// Default constructor.
> + /// Default constructor (empty buffer).
> ConstBuffer();
>
> /** Construct from pointer and size.
> - @note Due to ambiguity issues do not call this with
> - two arguments if the first argument is 0.
> */
> ConstBuffer(
> char const * ptr, ///< Pointer to buffer.
> @@ -158,12 +150,12 @@ namespace ts {
> @a start == 0.
> */
> ConstBuffer(
> - char const* start, ///< First valid character.
> - char const* end ///< First invalid character.
> - );
> + char const* start, ///< First valid character.
> + char const* end ///< First invalid character.
> + );
> /// Construct from writable buffer.
> ConstBuffer(
> - Buffer const& buffer ///< Buffer to copy.
> + Buffer const& buffer ///< Buffer to copy.
> );
>
> /** Equality.
>
> http://git-wip-us.apache.org/repos/asf/trafficserver/blob/42687935/lib/tsconfig/TsValue.cc
> ----------------------------------------------------------------------
> diff --git a/lib/tsconfig/TsValue.cc b/lib/tsconfig/TsValue.cc
> index d7c1db1..06beaec 100644
> --- a/lib/tsconfig/TsValue.cc
> +++ b/lib/tsconfig/TsValue.cc
> @@ -37,8 +37,8 @@
> // ---------------------------------------------------------------------------
> namespace ts { namespace config {
> // ---------------------------------------------------------------------------
> -Buffer const detail::NULL_BUFFER(0);
> -ConstBuffer const detail::NULL_CONST_BUFFER(0);
> +Buffer const detail::NULL_BUFFER;
> +ConstBuffer const detail::NULL_CONST_BUFFER;
> detail::ValueItem detail::ValueTableImpl::NULL_ITEM(VoidValue);
> detail::PseudoBool::Type const detail::PseudoBool::FALSE = 0;
> detail::PseudoBool::Type const detail::PseudoBool::TRUE = &detail::PseudoBool::operator !;
> @@ -332,7 +332,7 @@ Configuration::getRoot() const {
> Rv<Configuration>
> Configuration::loadFromPath(char const* path) {
> Rv<Configuration> zret;
> - Buffer buffer(0);
> + Buffer buffer;
> FILE* in = fopen(path, "r");
>
> if (in) {
>
> http://git-wip-us.apache.org/repos/asf/trafficserver/blob/42687935/lib/tsconfig/TsValue.h
> ----------------------------------------------------------------------
> diff --git a/lib/tsconfig/TsValue.h b/lib/tsconfig/TsValue.h
> index 19c0f0c..3919ba3 100644
> --- a/lib/tsconfig/TsValue.h
> +++ b/lib/tsconfig/TsValue.h
> @@ -644,8 +644,8 @@ namespace detail {
> inline ValueItem const& ValueTable::operator [] (ValueIndex idx) const { return const_cast<self*>(this)->operator [] (idx); }
> inline ValueTable& ValueTable::reset() { _ptr = 0; return *this; }
>
> - inline ValueItem::ValueItem() : _type(VoidValue), _text(0), _name(0) {}
> - inline ValueItem::ValueItem(ValueType type) : _type(type), _text(0), _name(0) {}
> + inline ValueItem::ValueItem() : _type(VoidValue) {}
> + inline ValueItem::ValueItem(ValueType type) : _type(type) {}
> inline ValueType ValueItem::getType() const { return _type; }
> }
>
> @@ -722,7 +722,7 @@ inline Path& Path::append(size_t index) { this->instance()->_elements.push_back(
> inline size_t Path::count() const { return _ptr ? _ptr->_elements.size() : 0; }
> inline ConstBuffer const& Path::operator [] (size_t idx) const { return _ptr ? _ptr->_elements[idx] : detail::NULL_CONST_BUFFER; }
>
> -inline Path::Parser::Parser() : _input(0), _c(0) { }
> +inline Path::Parser::Parser() { }
> inline Path::Parser::Parser( ConstBuffer const& text ) : _input(text), _c(text._ptr) { }
> inline bool Path::Parser::hasInput() const { return _input._ptr && _input._ptr + _input._size > _c; }
>
>
> http://git-wip-us.apache.org/repos/asf/trafficserver/blob/42687935/lib/wccp/WccpLocal.h
> ----------------------------------------------------------------------
> diff --git a/lib/wccp/WccpLocal.h b/lib/wccp/WccpLocal.h
> index 3430ccf..d039bc0 100644
> --- a/lib/wccp/WccpLocal.h
> +++ b/lib/wccp/WccpLocal.h
> @@ -3231,7 +3231,7 @@ detail::Assignment::getMask() const {
> return *m_mask_assign;
> }
>
> -inline MsgBuffer::MsgBuffer() : super(0), _count(0) { }
> +inline MsgBuffer::MsgBuffer() : super(), _count(0) { }
> inline MsgBuffer::MsgBuffer(super const& that) : super(that), _count(0) { }
> inline MsgBuffer::MsgBuffer(void* p, size_t n)
> : super(static_cast<char*>(p),n)
>
> http://git-wip-us.apache.org/repos/asf/trafficserver/blob/42687935/proxy/http/HttpTransact.cc
> ----------------------------------------------------------------------
> diff --git a/proxy/http/HttpTransact.cc b/proxy/http/HttpTransact.cc
> index 0a8f93a..9a59b47 100644
> --- a/proxy/http/HttpTransact.cc
> +++ b/proxy/http/HttpTransact.cc
> @@ -46,7 +46,6 @@
> #include "StatPages.h"
> #include "HttpClientSession.h"
> #include "I_Machine.h"
> -#include "IPAllow.h"
>
> static char range_type[] = "multipart/byteranges; boundary=RANGE_SEPARATOR";
> #define RANGE_NUMBERS_LENGTH 60
>