From e691b65ce3c82cf3781e8d02e92a4a2af07c5b20 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Frings-F=C3=BCrst?= Date: Sat, 12 Jan 2019 13:19:59 +0100 Subject: New upstream version 2.0.3 --- lib/icap/Makefile.am | 2 +- lib/icap/header.cpp | 9 +++------ 2 files changed, 4 insertions(+), 7 deletions(-) (limited to 'lib') diff --git a/lib/icap/Makefile.am b/lib/icap/Makefile.am index f73a8f6..a5608db 100644 --- a/lib/icap/Makefile.am +++ b/lib/icap/Makefile.am @@ -1,5 +1,5 @@ ## [icap-library] lib/icap/ -AM_CPPFLAGS = -I$(top_srcdir)/lib ${psocksxx_CFLAGS} +AM_CPPFLAGS = -std=c++11 -I$(top_srcdir)/lib ${psocksxx_CFLAGS} libicapincludedir = $(includedir)/icap lib_LTLIBRARIES = libicap.la diff --git a/lib/icap/header.cpp b/lib/icap/header.cpp index 493e659..ca72bc8 100644 --- a/lib/icap/header.cpp +++ b/lib/icap/header.cpp @@ -140,20 +140,17 @@ namespace icap { * OPTIONS response encapsulated_list: optbody */ - Header::encapsulated_header_index_t idx; std::string encaps_header = ""; - // FIXME: chances are that we will always get the correct order - // but should consider sorting - for ( idx = _encapsulated.begin(); idx != _encapsulated.end(); idx++ ) { + for ( auto& idx : sort_encapsulated_header() ) { - if ( idx->second > 0 ) { + if ( idx.second >= 0 ) { if ( encaps_header != "" ) { encaps_header.append( ", " ); } - encaps_header.append( idx->first ).append( "=" ).append( util::itoa( idx->second ) ); + encaps_header.append( idx.first ).append( "=" ).append( util::itoa( idx.second ) ); } -- cgit v1.2.3