[trafficserver] branch master updated: Remove unused IpMap include. (#9532)

2023-03-18 Thread amc
This is an automated email from the ASF dual-hosted git repository.

amc pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git


The following commit(s) were added to refs/heads/master by this push:
 new 5e482e70d Remove unused IpMap include. (#9532)
5e482e70d is described below

commit 5e482e70dc2159e562b75b5f882b6de50e0b77c7
Author: Alan M. Carroll 
AuthorDate: Sat Mar 18 09:28:26 2023 -0500

Remove unused IpMap include. (#9532)
---
 iocore/net/I_NetVConnection.h | 1 -
 1 file changed, 1 deletion(-)

diff --git a/iocore/net/I_NetVConnection.h b/iocore/net/I_NetVConnection.h
index 9eafde48c..6935099ed 100644
--- a/iocore/net/I_NetVConnection.h
+++ b/iocore/net/I_NetVConnection.h
@@ -39,7 +39,6 @@
 #include "ts/apidefs.h"
 #include "YamlSNIConfig.h"
 #include "tscpp/util/TextView.h"
-#include "tscore/IpMap.h"
 
 #define CONNECT_SUCCESS 1
 #define CONNECT_FAILURE 0



[trafficserver] branch master updated: libswoc: Update to 1.4.6 (#9530)

2023-03-18 Thread amc
This is an automated email from the ASF dual-hosted git repository.

amc pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git


The following commit(s) were added to refs/heads/master by this push:
 new 7433988c8 libswoc: Update to 1.4.6 (#9530)
7433988c8 is described below

commit 7433988c86a100093535bb913fb223cb689c9d72
Author: Alan M. Carroll 
AuthorDate: Sat Mar 18 09:23:31 2023 -0500

libswoc: Update to 1.4.6 (#9530)
---
 lib/swoc/CMakeLists.txt   |   2 +-
 lib/swoc/Makefile.am  |   2 +-
 lib/swoc/include/swoc/DiscreteRange.h |   9 ++
 lib/swoc/include/swoc/Errata.h| 128 ++--
 lib/swoc/include/swoc/IPAddr.h|   2 +
 lib/swoc/include/swoc/IPRange.h   | 273 +++---
 lib/swoc/include/swoc/swoc_version.h  |   4 +-
 lib/swoc/src/Errata.cc|  32 +++-
 lib/swoc/src/bw_format.cc |  12 +-
 lib/swoc/src/swoc_ip.cc   |   6 +-
 10 files changed, 414 insertions(+), 56 deletions(-)

diff --git a/lib/swoc/CMakeLists.txt b/lib/swoc/CMakeLists.txt
index 420da122e..f0a7755f5 100644
--- a/lib/swoc/CMakeLists.txt
+++ b/lib/swoc/CMakeLists.txt
@@ -1,7 +1,7 @@
 cmake_minimum_required(VERSION 3.11)
 
 project(Lib-SWOC CXX)
-set(LIBSWOC_VERSION "1.4.5")
+set(LIBSWOC_VERSION "1.4.6")
 set(CMAKE_CXX_STANDARD 17)
 cmake_policy(SET CMP0087 NEW)
 # override "lib64" to be "lib" unless the user explicitly sets it.
diff --git a/lib/swoc/Makefile.am b/lib/swoc/Makefile.am
index bd1c51dea..210d7c6b4 100644
--- a/lib/swoc/Makefile.am
+++ b/lib/swoc/Makefile.am
@@ -22,7 +22,7 @@ library_includedir=$(includedir)/swoc
 
 AM_CPPFLAGS += @SWOC_INCLUDES@
 
-libtsswoc_la_LDFLAGS = @AM_LDFLAGS@ -no-undefined -release 1.4.5
+libtsswoc_la_LDFLAGS = @AM_LDFLAGS@ -no-undefined -release 1.4.6
 libtsswoc_la_SOURCES = \
src/ArenaWriter.cc  src/bw_format.cc  src/bw_ip_format.cc  
src/Errata.cc  src/MemArena.cc  src/RBTree.cc  src/swoc_file.cc  src/swoc_ip.cc 
 src/TextView.cc src/string_view_util.cc
 
diff --git a/lib/swoc/include/swoc/DiscreteRange.h 
b/lib/swoc/include/swoc/DiscreteRange.h
index cfefbf510..a04a3e7d2 100644
--- a/lib/swoc/include/swoc/DiscreteRange.h
+++ b/lib/swoc/include/swoc/DiscreteRange.h
@@ -850,6 +850,9 @@ public:
   /// @return The number of distinct ranges.
   size_t count() const;
 
+  /// @return @c true if there are no ranges in the container, @c false 
otherwise.
+  bool empty() const;
+
   /// @return Iterator for the first range.
   iterator begin() { return _list.begin(); }
   /// @return Iterator past the last node.
@@ -977,6 +980,12 @@ DiscreteSpace::count() const {
   return _list.count();
 }
 
+template 
+bool
+DiscreteSpace::empty() const {
+  return _list.empty();
+}
+
 template 
 auto
 DiscreteSpace::head() -> Node * {
diff --git a/lib/swoc/include/swoc/Errata.h b/lib/swoc/include/swoc/Errata.h
index 94c9b9a2c..3995e279c 100644
--- a/lib/swoc/include/swoc/Errata.h
+++ b/lib/swoc/include/swoc/Errata.h
@@ -76,7 +76,7 @@ public:
 
   /// Code used if not specified.
   static inline const code_type DEFAULT_CODE;
-  /// Severity used if not specified.
+  /// Severity reported if severity not set.
   static Severity DEFAULT_SEVERITY;
   /// Severity level at which the instance is a failure of some sort.
   static Severity FAILURE_SEVERITY;
@@ -189,7 +189,13 @@ protected:
 /// Allocate from the arena.
 swoc::MemSpan alloc(size_t n);
 
-Severity _severity{Errata::DEFAULT_SEVERITY}; ///< Severity.
+TextView _annotation_glue_text = DEFAULT_ANNOTATION_GLUE_TEXT;
+TextView _annotation_severity_glue_text = DEFAULT_SEVERITY_GLUE_TEXT;
+TextView _severity_glue_text = DEFAULT_SEVERITY_GLUE_TEXT;
+TextView _indent_text = DEFAULT_INDENT_TEXT;
+bool _glue_final_p = true; ///< Add glue after the last annotation?
+
+std::optional _severity; ///< Severity.
 code_type _code{Errata::DEFAULT_CODE};///< Message code / ID
 Container _notes; ///< The message stack.
 swoc::MemArena _arena;///< Annotation text storage.
@@ -360,7 +366,11 @@ public:
   friend std::ostream <<(std::ostream &, self_type const &);
 
   /// Default glue value (a newline) for text rendering.
-  static std::string_view DEFAULT_GLUE;
+  static inline TextView DEFAULT_ANNOTATION_GLUE_TEXT = "\n";
+  /// Default glue text for use after the severity name.
+  static inline TextView DEFAULT_SEVERITY_GLUE_TEXT = ": ";
+  // Text used for each level of indent.
+  static inline TextView DEFAULT_INDENT_TEXT = "  ";
 
   /** Test status.
 
@@ -391,6 +401,8 @@ public:
*/
   bool is_ok() const;
 
+  bool has_severity() const { return _data && _data->_severity.has_value(); }
+
   /** Get the maximum severity of the messages in the erratum.
*
* @return Max severity for all messages.
@@ -442,12 +454,65 @@ public:
   //! Reference one past bottom item on the stack.