TS-3419 Fix some enum's such that clang-format can handle it the way we want.
Basically this means having a trailing , on short enum's.
TS-3419 Run clang-format over most of the source
Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/65477944
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/65477944
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/65477944
Branch: refs/heads/master
Commit: 65477944357bdb8bef778dda91ff1319271d9172
Parents: 3535b30
Author: Leif Hedstrom <[email protected]>
Authored: Sat Mar 21 14:51:04 2015 -0600
Committer: Leif Hedstrom <[email protected]>
Committed: Sun Mar 22 19:16:11 2015 -0600
----------------------------------------------------------------------
cmd/traffic_cop/traffic_cop.cc | 183 +-
cmd/traffic_crashlog/procinfo.cc | 90 +-
cmd/traffic_crashlog/traffic_crashlog.cc | 41 +-
cmd/traffic_crashlog/traffic_crashlog.h | 35 +-
cmd/traffic_ctl/alarm.cc | 34 +-
cmd/traffic_ctl/config.cc | 115 +-
cmd/traffic_ctl/metric.cc | 29 +-
cmd/traffic_ctl/server.cc | 36 +-
cmd/traffic_ctl/storage.cc | 13 +-
cmd/traffic_ctl/traffic_ctl.cc | 45 +-
cmd/traffic_ctl/traffic_ctl.h | 163 +-
cmd/traffic_layout/traffic_layout.cc | 10 +-
cmd/traffic_line/traffic_line.cc | 28 +-
cmd/traffic_manager/StatProcessor.cc | 80 +-
cmd/traffic_manager/StatProcessor.h | 7 +-
cmd/traffic_manager/StatType.cc | 245 +-
cmd/traffic_manager/StatType.h | 56 +-
cmd/traffic_manager/StatXML.cc | 4 -
cmd/traffic_manager/StatXML.h | 7 +-
cmd/traffic_manager/traffic_manager.cc | 147 +-
cmd/traffic_top/stats.h | 118 +-
cmd/traffic_top/traffic_top.cc | 95 +-
cmd/traffic_via/traffic_via.cc | 293 +-
cmd/traffic_wccp/wccp_client.cc | 66 +-
example/add-header/add-header.c | 3 +-
example/append-transform/append-transform.c | 40 +-
example/basic-auth/basic-auth.c | 17 +-
example/blacklist-0/blacklist-0.c | 10 +-
example/blacklist-1/blacklist-1.c | 35 +-
example/bnull-transform/bnull-transform.c | 47 +-
example/cache-scan/cache-scan.cc | 129 +-
example/file-1/file-1.c | 1 -
example/intercept/intercept.cc | 183 +-
example/lifecycle-plugin/lifecycle-plugin.c | 14 +-
example/null-transform/null-transform.c | 46 +-
example/output-header/output-header.c | 5 +-
example/prefetch/prefetch-plugin-eg1.c | 13 +-
example/prefetch/test-hns-plugin.c | 27 +-
example/protocol/Protocol.c | 4 +-
example/protocol/Protocol.h | 5 +-
example/protocol/TxnSM.c | 128 +-
example/protocol/TxnSM.h | 9 +-
example/query-remap/query-remap.c | 40 +-
example/redirect-1/redirect-1.c | 32 +-
example/remap/remap.cc | 78 +-
example/remap_header_add/remap_header_add.cc | 42 +-
example/replace-header/replace-header.c | 2 +-
example/response-header-1/response-header-1.c | 49 +-
example/secure-link/secure-link.c | 42 +-
example/server-transform/server-transform.c | 65 +-
example/session-1/session-1.c | 4 +-
example/ssl-preaccept/ats-util.h | 19 +-
example/ssl-preaccept/ssl-preaccept.cc | 58 +-
example/ssl-sni-whitelist/ssl-sni-whitelist.cc | 50 +-
example/ssl-sni/ssl-sni.cc | 50 +-
example/thread-1/thread-1.c | 10 +-
example/thread-pool/include/gen.c | 1 -
example/thread-pool/psi.c | 53 +-
example/thread-pool/test/SDKTest/psi_server.c | 46 +-
example/thread-pool/thread.c | 22 +-
example/thread-pool/thread.h | 30 +-
example/version/version.c | 6 +-
iocore/aio/AIO.cc | 119 +-
iocore/aio/I_AIO.h | 79 +-
iocore/aio/P_AIO.h | 57 +-
iocore/aio/test_AIO.cc | 181 +-
iocore/cache/Cache.cc | 1094 ++--
iocore/cache/CacheDir.cc | 242 +-
iocore/cache/CacheDisk.cc | 25 +-
iocore/cache/CacheHosting.cc | 356 +-
iocore/cache/CacheHttp.cc | 59 +-
iocore/cache/CacheLink.cc | 53 +-
iocore/cache/CachePages.cc | 476 +-
iocore/cache/CachePagesInternal.cc | 144 +-
iocore/cache/CacheRead.cc | 318 +-
iocore/cache/CacheTest.cc | 405 +-
iocore/cache/CacheVol.cc | 67 +-
iocore/cache/CacheWrite.cc | 394 +-
iocore/cache/I_Cache.h | 91 +-
iocore/cache/I_CacheDefs.h | 65 +-
iocore/cache/I_Store.h | 139 +-
iocore/cache/Inline.cc | 2 -
iocore/cache/P_CacheArray.h | 68 +-
iocore/cache/P_CacheBC.h | 208 +-
iocore/cache/P_CacheDir.h | 310 +-
iocore/cache/P_CacheDisk.h | 82 +-
iocore/cache/P_CacheHosting.h | 107 +-
iocore/cache/P_CacheHttp.h | 34 +-
iocore/cache/P_CacheInternal.h | 426 +-
iocore/cache/P_CacheTest.h | 58 +-
iocore/cache/P_CacheVol.h | 413 +-
iocore/cache/P_RamCache.h | 5 +-
iocore/cache/RamCacheCLFUS.cc | 225 +-
iocore/cache/RamCacheLRU.cc | 42 +-
iocore/cache/Store.cc | 145 +-
iocore/cluster/ClusterAPI.cc | 177 +-
iocore/cluster/ClusterCache.cc | 1908 ++++---
iocore/cluster/ClusterConfig.cc | 155 +-
iocore/cluster/ClusterHandler.cc | 599 +--
iocore/cluster/ClusterHandlerBase.cc | 722 ++-
iocore/cluster/ClusterHash.cc | 10 +-
iocore/cluster/ClusterLib.cc | 76 +-
iocore/cluster/ClusterLoadMonitor.cc | 80 +-
iocore/cluster/ClusterMachine.cc | 68 +-
iocore/cluster/ClusterProcessor.cc | 439 +-
iocore/cluster/ClusterRPC.cc | 114 +-
iocore/cluster/ClusterVConnection.cc | 157 +-
iocore/cluster/P_Cluster.h | 39 +-
iocore/cluster/P_ClusterCache.h | 739 +--
iocore/cluster/P_ClusterCacheInternal.h | 438 +-
iocore/cluster/P_ClusterHandler.h | 313 +-
iocore/cluster/P_ClusterInline.h | 164 +-
iocore/cluster/P_ClusterInternal.h | 358 +-
iocore/cluster/P_ClusterLib.h | 7 +-
iocore/cluster/P_ClusterLoadMonitor.h | 17 +-
iocore/cluster/P_ClusterMachine.h | 31 +-
iocore/cluster/P_TimeTrace.h | 21 +-
iocore/cluster/test_I_Cluster.cc | 19 +-
iocore/cluster/test_P_Cluster.cc | 19 +-
iocore/dns/DNS.cc | 565 +--
iocore/dns/DNSConnection.cc | 32 +-
iocore/dns/I_DNSProcessor.h | 71 +-
iocore/dns/I_SplitDNS.h | 6 +-
iocore/dns/I_SplitDNSProcessor.h | 6 +-
iocore/dns/Inline.cc | 2 -
iocore/dns/P_DNS.h | 2 +-
iocore/dns/P_DNSConnection.h | 83 +-
iocore/dns/P_DNSProcessor.h | 154 +-
iocore/dns/P_SplitDNS.h | 8 +-
iocore/dns/P_SplitDNSProcessor.h | 53 +-
iocore/dns/SRV.h | 26 +-
iocore/dns/SplitDNS.cc | 71 +-
iocore/dns/test_I_DNS.cc | 17 +-
iocore/dns/test_P_DNS.cc | 13 +-
iocore/eventsystem/IOBuffer.cc | 38 +-
iocore/eventsystem/I_Action.h | 32 +-
iocore/eventsystem/I_Continuation.h | 43 +-
iocore/eventsystem/I_EThread.h | 34 +-
iocore/eventsystem/I_Event.h | 150 +-
iocore/eventsystem/I_EventProcessor.h | 48 +-
iocore/eventsystem/I_EventSystem.h | 6 +-
iocore/eventsystem/I_IOBuffer.h | 359 +-
iocore/eventsystem/I_Lock.h | 221 +-
iocore/eventsystem/I_PriorityEventQueue.h | 28 +-
iocore/eventsystem/I_Processor.h | 20 +-
iocore/eventsystem/I_ProtectedQueue.h | 11 +-
iocore/eventsystem/I_ProxyAllocator.h | 75 +-
iocore/eventsystem/I_SocketManager.h | 24 +-
iocore/eventsystem/I_Tasks.h | 8 +-
iocore/eventsystem/I_Thread.h | 22 +-
iocore/eventsystem/I_VConnection.h | 127 +-
iocore/eventsystem/I_VIO.h | 36 +-
iocore/eventsystem/Inline.cc | 1 -
iocore/eventsystem/Lock.cc | 38 +-
iocore/eventsystem/PQ-List.cc | 4 +-
iocore/eventsystem/P_EventSystem.h | 8 +-
iocore/eventsystem/P_Freer.h | 91 +-
iocore/eventsystem/P_IOBuffer.h | 126 +-
iocore/eventsystem/P_ProtectedQueue.h | 6 +-
iocore/eventsystem/P_Thread.h | 11 +-
iocore/eventsystem/P_UnixEThread.h | 38 +-
iocore/eventsystem/P_UnixEvent.h | 14 +-
iocore/eventsystem/P_UnixEventProcessor.h | 22 +-
iocore/eventsystem/P_UnixSocketManager.h | 100 +-
iocore/eventsystem/P_VConnection.h | 16 +-
iocore/eventsystem/P_VIO.h | 34 +-
iocore/eventsystem/Processor.cc | 6 +-
iocore/eventsystem/ProtectedQueue.cc | 18 +-
iocore/eventsystem/ProxyAllocator.cc | 16 +-
iocore/eventsystem/SocketManager.cc | 7 +-
iocore/eventsystem/Thread.cc | 31 +-
iocore/eventsystem/UnixEThread.cc | 272 +-
iocore/eventsystem/UnixEventProcessor.cc | 58 +-
iocore/eventsystem/test_Buffer.cc | 21 +-
iocore/eventsystem/test_Event.cc | 43 +-
iocore/hostdb/HostDB.cc | 714 ++-
iocore/hostdb/I_HostDB.h | 5 +-
iocore/hostdb/I_HostDBProcessor.h | 272 +-
iocore/hostdb/Inline.cc | 2 -
iocore/hostdb/MultiCache.cc | 328 +-
iocore/hostdb/P_HostDB.h | 13 +-
iocore/hostdb/P_HostDBProcessor.h | 253 +-
iocore/hostdb/P_MultiCache.h | 298 +-
iocore/hostdb/include/Machine.h | 27 +-
iocore/hostdb/test_I_HostDB.cc | 19 +-
iocore/hostdb/test_P_HostDB.cc | 13 +-
iocore/net/Connection.cc | 46 +-
iocore/net/I_Net.h | 40 +-
iocore/net/I_NetProcessor.h | 60 +-
iocore/net/I_NetVConnection.h | 86 +-
iocore/net/I_SessionAccept.h | 11 +-
iocore/net/I_Socks.h | 40 +-
iocore/net/I_UDPConnection.h | 16 +-
iocore/net/I_UDPNet.h | 24 +-
iocore/net/I_UDPPacket.h | 24 +-
iocore/net/Inline.cc | 1 -
iocore/net/Net.cc | 86 +-
iocore/net/NetTest-http-server.c | 58 +-
iocore/net/NetVCTest.cc | 116 +-
iocore/net/NetVConnection.cc | 1 -
iocore/net/OCSPStapling.cc | 58 +-
iocore/net/P_CompletionUtil.h | 24 +-
iocore/net/P_Connection.h | 96 +-
iocore/net/P_InkBulkIO.h | 69 +-
iocore/net/P_LibBulkIO.h | 58 +-
iocore/net/P_Net.h | 49 +-
iocore/net/P_NetAccept.h | 34 +-
iocore/net/P_NetVCTest.h | 26 +-
iocore/net/P_NetVConnection.h | 24 +-
iocore/net/P_OCSPStapling.h | 8 +-
iocore/net/P_SSLCertLookup.h | 46 +-
iocore/net/P_SSLConfig.h | 78 +-
iocore/net/P_SSLNetAccept.h | 14 +-
iocore/net/P_SSLNetProcessor.h | 16 +-
iocore/net/P_SSLNetVConnection.h | 93 +-
iocore/net/P_SSLNextProtocolAccept.h | 20 +-
iocore/net/P_SSLNextProtocolSet.h | 19 +-
iocore/net/P_SSLUtils.h | 99 +-
iocore/net/P_Socks.h | 50 +-
iocore/net/P_UDPConnection.h | 35 +-
iocore/net/P_UDPIOEvent.h | 48 +-
iocore/net/P_UDPNet.h | 102 +-
iocore/net/P_UDPPacket.h | 52 +-
iocore/net/P_UnixCompletionUtil.h | 46 +-
iocore/net/P_UnixNet.h | 204 +-
iocore/net/P_UnixNetProcessor.h | 37 +-
iocore/net/P_UnixNetState.h | 5 +-
iocore/net/P_UnixNetVConnection.h | 97 +-
iocore/net/P_UnixPollDescriptor.h | 57 +-
iocore/net/P_UnixUDPConnection.h | 25 +-
iocore/net/SSLCertLookup.cc | 150 +-
iocore/net/SSLConfig.cc | 48 +-
iocore/net/SSLNetAccept.cc | 6 +-
iocore/net/SSLNetProcessor.cc | 27 +-
iocore/net/SSLNetVConnection.cc | 342 +-
iocore/net/SSLNextProtocolAccept.cc | 43 +-
iocore/net/SSLNextProtocolSet.cc | 35 +-
iocore/net/SSLSessionCache.cc | 109 +-
iocore/net/SSLSessionCache.h | 68 +-
iocore/net/SSLUtils.cc | 806 ++-
iocore/net/Socks.cc | 180 +-
iocore/net/UnixConnection.cc | 167 +-
iocore/net/UnixNet.cc | 201 +-
iocore/net/UnixNetAccept.cc | 131 +-
iocore/net/UnixNetPages.cc | 122 +-
iocore/net/UnixNetProcessor.cc | 124 +-
iocore/net/UnixNetVConnection.cc | 96 +-
iocore/net/UnixUDPConnection.cc | 25 +-
iocore/net/UnixUDPNet.cc | 178 +-
iocore/net/test_I_Net.cc | 23 +-
iocore/net/test_I_UDPNet.cc | 49 +-
iocore/net/test_P_Net.cc | 31 +-
iocore/net/test_P_UDPNet.cc | 49 +-
iocore/net/test_certlookup.cc | 61 +-
iocore/utils/I_Machine.h | 27 +-
iocore/utils/I_OneWayMultiTunnel.h | 22 +-
iocore/utils/I_OneWayTunnel.h | 43 +-
iocore/utils/Machine.cc | 123 +-
iocore/utils/OneWayMultiTunnel.cc | 73 +-
iocore/utils/OneWayTunnel.cc | 74 +-
.../examples/async_http_fetch/AsyncHttpFetch.cc | 99 +-
.../AsyncHttpFetchStreaming.cc | 65 +-
.../examples/async_timer/AsyncTimer.cc | 31 +-
lib/atscppapi/examples/boom/boom.cc | 162 +-
.../examples/clientredirect/ClientRedirect.cc | 32 +-
.../examples/clientrequest/ClientRequest.cc | 35 +-
.../examples/customresponse/CustomResponse.cc | 31 +-
.../examples/globalhook/GlobalHookPlugin.cc | 17 +-
.../GzipTransformationPlugin.cc | 79 +-
.../examples/helloworld/HelloWorldPlugin.cc | 13 +-
lib/atscppapi/examples/intercept/intercept.cc | 32 +-
.../InternalTransactionHandling.cc | 30 +-
.../examples/logger_example/LoggerExample.cc | 44 +-
.../MultipleTransactionHookPlugins.cc | 61 +-
.../NullTransformationPlugin.cc | 51 +-
.../examples/post_buffer/PostBuffer.cc | 31 +-
.../examples/remap_plugin/RemapPlugin.cc | 14 +-
.../examples/serverresponse/ServerResponse.cc | 44 +-
.../examples/stat_example/StatExample.cc | 18 +-
.../timeout_example/TimeoutExamplePlugin.cc | 18 +-
.../transactionhook/TransactionHookPlugin.cc | 29 +-
lib/atscppapi/src/AsyncHttpFetch.cc | 108 +-
lib/atscppapi/src/AsyncTimer.cc | 44 +-
.../src/CaseInsensitiveStringComparator.cc | 14 +-
lib/atscppapi/src/ClientRequest.cc | 23 +-
lib/atscppapi/src/GlobalPlugin.cc | 25 +-
lib/atscppapi/src/GzipDeflateTransformation.cc | 41 +-
lib/atscppapi/src/GzipInflateTransformation.cc | 44 +-
lib/atscppapi/src/Headers.cc | 390 +-
lib/atscppapi/src/HttpMethod.cc | 17 +-
lib/atscppapi/src/HttpVersion.cc | 7 +-
lib/atscppapi/src/InterceptPlugin.cc | 111 +-
lib/atscppapi/src/Logger.cc | 104 +-
lib/atscppapi/src/Plugin.cc | 17 +-
lib/atscppapi/src/RemapPlugin.cc | 16 +-
lib/atscppapi/src/Request.cc | 71 +-
lib/atscppapi/src/Response.cc | 70 +-
lib/atscppapi/src/Stat.cc | 40 +-
lib/atscppapi/src/Transaction.cc | 227 +-
lib/atscppapi/src/TransactionPlugin.cc | 34 +-
lib/atscppapi/src/TransformationPlugin.cc | 150 +-
lib/atscppapi/src/Url.cc | 78 +-
lib/atscppapi/src/include/atscppapi/Async.h | 96 +-
.../src/include/atscppapi/AsyncHttpFetch.h | 31 +-
.../src/include/atscppapi/AsyncTimer.h | 13 +-
.../atscppapi/CaseInsensitiveStringComparator.h | 8 +-
.../src/include/atscppapi/ClientRequest.h | 9 +-
.../src/include/atscppapi/GlobalPlugin.h | 9 +-
.../atscppapi/GzipDeflateTransformation.h | 100 +-
.../atscppapi/GzipInflateTransformation.h | 98 +-
lib/atscppapi/src/include/atscppapi/Headers.h | 335 +-
.../src/include/atscppapi/HttpMethod.h | 5 +-
.../src/include/atscppapi/HttpStatus.h | 8 +-
.../src/include/atscppapi/HttpVersion.h | 5 +-
.../src/include/atscppapi/InterceptPlugin.h | 17 +-
lib/atscppapi/src/include/atscppapi/Logger.h | 66 +-
lib/atscppapi/src/include/atscppapi/Mutex.h | 112 +-
lib/atscppapi/src/include/atscppapi/Plugin.h | 84 +-
.../src/include/atscppapi/PluginInit.h | 6 +-
.../src/include/atscppapi/RemapPlugin.h | 25 +-
lib/atscppapi/src/include/atscppapi/Request.h | 9 +-
lib/atscppapi/src/include/atscppapi/Response.h | 14 +-
lib/atscppapi/src/include/atscppapi/Stat.h | 14 +-
.../src/include/atscppapi/Transaction.h | 29 +-
.../src/include/atscppapi/TransactionPlugin.h | 14 +-
.../include/atscppapi/TransformationPlugin.h | 11 +-
lib/atscppapi/src/include/atscppapi/Url.h | 9 +-
.../src/include/atscppapi/noncopyable.h | 9 +-
.../src/include/atscppapi/shared_ptr.h | 12 +-
lib/atscppapi/src/include/atscppapi/utils.h | 52 +-
lib/atscppapi/src/include/logging_internal.h | 4 +-
lib/atscppapi/src/include/utils_internal.h | 122 +-
lib/atscppapi/src/utils.cc | 22 +-
lib/atscppapi/src/utils_internal.cc | 96 +-
lib/records/I_RecAlarms.h | 40 +-
lib/records/I_RecCore.h | 237 +-
lib/records/I_RecDefs.h | 122 +-
lib/records/I_RecEvents.h | 26 +-
lib/records/I_RecHttp.h | 270 +-
lib/records/I_RecLocal.h | 2 +-
lib/records/I_RecMutex.h | 11 +-
lib/records/I_RecProcess.h | 68 +-
lib/records/I_RecSignals.h | 36 +-
lib/records/P_RecCore.cc | 154 +-
lib/records/P_RecCore.h | 25 +-
lib/records/P_RecDefs.h | 83 +-
lib/records/P_RecMessage.h | 12 +-
lib/records/P_RecProcess.h | 2 +-
lib/records/P_RecUtils.h | 23 +-
lib/records/RecConfigParse.cc | 36 +-
lib/records/RecCore.cc | 140 +-
lib/records/RecDebug.cc | 2 +-
lib/records/RecFile.cc | 27 +-
lib/records/RecHttp.cc | 419 +-
lib/records/RecLocal.cc | 26 +-
lib/records/RecMessage.cc | 59 +-
lib/records/RecMutex.cc | 10 +-
lib/records/RecProcess.cc | 104 +-
lib/records/RecUtils.cc | 56 +-
lib/records/test_I_RecLocal.cc | 34 +-
lib/records/test_RecordsConfig.cc | 11 +-
lib/ts/Allocator.h | 54 +-
lib/ts/Arena.cc | 22 +-
lib/ts/Arena.h | 27 +-
lib/ts/Bitops.cc | 44 +-
lib/ts/Bitops.h | 13 +-
lib/ts/CompileParseRules.cc | 8 +-
lib/ts/ConsistentHash.cc | 7 +-
lib/ts/ConsistentHash.h | 12 +-
lib/ts/CryptoHash.h | 193 +-
lib/ts/Diags.cc | 53 +-
lib/ts/Diags.h | 201 +-
lib/ts/DynArray.h | 80 +-
lib/ts/EventNotify.cc | 7 +-
lib/ts/Hash.cc | 12 +-
lib/ts/Hash.h | 16 +-
lib/ts/HashFNV.h | 36 +-
lib/ts/HashMD5.cc | 63 +-
lib/ts/HashMD5.h | 22 +-
lib/ts/HashSip.cc | 38 +-
lib/ts/HashSip.h | 7 +-
lib/ts/HostLookup.cc | 222 +-
lib/ts/HostLookup.h | 86 +-
lib/ts/INK_MD5.h | 10 +-
lib/ts/I_Layout.h | 5 +-
lib/ts/I_Version.h | 40 +-
lib/ts/InkErrno.h | 64 +-
lib/ts/InkPool.h | 31 +-
lib/ts/IntrusiveDList.h | 230 +-
lib/ts/IntrusivePtrTest.cc | 45 +-
lib/ts/IpMap.cc | 1800 +++----
lib/ts/IpMap.h | 302 +-
lib/ts/IpMapConf.cc | 45 +-
lib/ts/IpMapConf.h | 4 +-
lib/ts/IpMapTest.cc | 110 +-
lib/ts/Layout.cc | 29 +-
lib/ts/List.h | 552 ++-
lib/ts/MMH.cc | 305 +-
lib/ts/MMH.h | 20 +-
lib/ts/Map.h | 980 ++--
lib/ts/MatcherUtils.cc | 73 +-
lib/ts/MatcherUtils.h | 100 +-
lib/ts/MimeTable.cc | 210 +-
lib/ts/MimeTable.h | 30 +-
lib/ts/ParseRules.cc | 29 +-
lib/ts/ParseRules.h | 247 +-
lib/ts/Ptr.h | 222 +-
lib/ts/RawHashTable.cc | 1 -
lib/ts/RawHashTable.h | 128 +-
lib/ts/RbTree.cc | 529 +-
lib/ts/RbTree.h | 363 +-
lib/ts/Regex.cc | 49 +-
lib/ts/Regex.h | 15 +-
lib/ts/Regression.cc | 35 +-
lib/ts/Regression.h | 47 +-
lib/ts/SimpleTokenizer.h | 81 +-
lib/ts/TestBox.h | 73 +-
lib/ts/TestHttpHeader.cc | 23 +-
lib/ts/TextBuffer.cc | 13 +-
lib/ts/TextBuffer.h | 30 +-
lib/ts/Tokenizer.cc | 63 +-
lib/ts/Tokenizer.h | 36 +-
lib/ts/Trie.h | 69 +-
lib/ts/TsBuffer.h | 823 +--
lib/ts/Vec.cc | 101 +-
lib/ts/Vec.h | 671 ++-
lib/ts/Version.cc | 57 +-
lib/ts/defalloc.h | 19 +-
lib/ts/fastlz.c | 367 +-
lib/ts/fastlz.h | 16 +-
lib/ts/ink_aiocb.h | 25 +-
lib/ts/ink_align.h | 17 +-
lib/ts/ink_apidefs.h | 10 +-
lib/ts/ink_args.cc | 112 +-
lib/ts/ink_args.h | 53 +-
lib/ts/ink_assert.h | 17 +-
lib/ts/ink_atomic.h | 68 +-
lib/ts/ink_auth_api.cc | 19 +-
lib/ts/ink_auth_api.h | 141 +-
lib/ts/ink_base64.cc | 26 +-
lib/ts/ink_cap.cc | 134 +-
lib/ts/ink_cap.h | 26 +-
lib/ts/ink_code.cc | 29 +-
lib/ts/ink_code.h | 12 +-
lib/ts/ink_defs.cc | 2 +-
lib/ts/ink_defs.h | 58 +-
lib/ts/ink_error.cc | 14 +-
lib/ts/ink_error.h | 2 +-
lib/ts/ink_exception.h | 20 +-
lib/ts/ink_file.cc | 106 +-
lib/ts/ink_file.h | 41 +-
lib/ts/ink_hash_table.cc | 143 +-
lib/ts/ink_hash_table.h | 114 +-
lib/ts/ink_hrtime.cc | 19 +-
lib/ts/ink_hrtime.h | 76 +-
lib/ts/ink_inet.cc | 350 +-
lib/ts/ink_inet.h | 1057 ++--
lib/ts/ink_inout.h | 70 +-
lib/ts/ink_llqueue.h | 22 +-
lib/ts/ink_lockfile.h | 30 +-
lib/ts/ink_memory.cc | 45 +-
lib/ts/ink_memory.h | 273 +-
lib/ts/ink_mutex.h | 21 +-
lib/ts/ink_platform.h | 66 +-
lib/ts/ink_queue.cc | 174 +-
lib/ts/ink_queue.h | 185 +-
lib/ts/ink_queue_ext.cc | 100 +-
lib/ts/ink_queue_ext.h | 178 +-
lib/ts/ink_queue_utils.cc | 10 +-
lib/ts/ink_rand.cc | 41 +-
lib/ts/ink_rand.h | 7 +-
lib/ts/ink_res_init.cc | 131 +-
lib/ts/ink_res_mkquery.cc | 701 +--
lib/ts/ink_resolver.h | 287 +-
lib/ts/ink_resource.cc | 28 +-
lib/ts/ink_resource.h | 17 +-
lib/ts/ink_rwlock.cc | 19 +-
lib/ts/ink_rwlock.h | 25 +-
lib/ts/ink_sock.cc | 25 +-
lib/ts/ink_sock.h | 6 +-
lib/ts/ink_sprintf.cc | 52 +-
lib/ts/ink_sprintf.h | 9 +-
lib/ts/ink_stack_trace.cc | 8 +-
lib/ts/ink_stack_trace.h | 9 +-
lib/ts/ink_string++.cc | 25 +-
lib/ts/ink_string++.h | 76 +-
lib/ts/ink_string.cc | 20 +-
lib/ts/ink_string.h | 32 +-
lib/ts/ink_sys_control.cc | 6 +-
lib/ts/ink_sys_control.h | 2 +-
lib/ts/ink_syslog.cc | 43 +-
lib/ts/ink_thread.cc | 18 +-
lib/ts/ink_thread.h | 47 +-
lib/ts/ink_time.cc | 35 +-
lib/ts/ink_time.h | 10 +-
lib/ts/libts.h | 4 +-
lib/ts/llqueue.cc | 35 +-
lib/ts/load_http_hdr.cc | 133 +-
lib/ts/lockfile.cc | 42 +-
lib/ts/mkdfa.c | 49 +-
lib/ts/signals.cc | 11 +-
lib/ts/signals.h | 2 +-
lib/ts/test_List.cc | 55 +-
lib/ts/test_Map.cc | 81 +-
lib/ts/test_Regex.cc | 16 +-
lib/ts/test_Vec.cc | 25 +-
lib/ts/test_arena.cc | 4 +-
lib/ts/test_atomic.cc | 47 +-
lib/ts/test_freelist.cc | 11 +-
lib/ts/test_geometry.cc | 3 +-
lib/ts/test_memchr.cc | 28 +-
lib/ts/test_strings.cc | 152 +-
lib/wccp/Wccp.h | 334 +-
lib/wccp/WccpConfig.cc | 489 +-
lib/wccp/WccpEndPoint.cc | 757 ++-
lib/wccp/WccpLocal.h | 2761 ++++++-----
lib/wccp/WccpMeta.h | 159 +-
lib/wccp/WccpMsg.cc | 1095 ++--
lib/wccp/WccpStatic.cc | 113 +-
lib/wccp/WccpUtil.h | 200 +-
lib/wccp/wccp-test-router.cc | 64 +-
mgmt/Alarms.cc | 130 +-
mgmt/Alarms.h | 66 +-
mgmt/BaseManager.cc | 35 +-
mgmt/BaseManager.h | 74 +-
mgmt/FileManager.cc | 163 +-
mgmt/FileManager.h | 63 +-
mgmt/LocalManager.cc | 251 +-
mgmt/LocalManager.h | 33 +-
mgmt/MgmtDefs.h | 22 +-
mgmt/MultiFile.cc | 32 +-
mgmt/MultiFile.h | 21 +-
mgmt/ProcessManager.cc | 77 +-
mgmt/ProcessManager.h | 21 +-
mgmt/ProxyConfig.cc | 108 +-
mgmt/ProxyConfig.h | 68 +-
mgmt/RecordsConfig.cc | 3 +-
mgmt/RecordsConfig.h | 28 +-
mgmt/RecordsConfigUtils.cc | 28 +-
mgmt/Rollback.cc | 134 +-
mgmt/Rollback.h | 64 +-
mgmt/WebMgmtUtils.cc | 229 +-
mgmt/WebMgmtUtils.h | 10 +-
mgmt/api/APITestCliRemote.cc | 225 +-
mgmt/api/CfgContextDefs.h | 19 +-
mgmt/api/CfgContextImpl.cc | 287 +-
mgmt/api/CfgContextImpl.h | 325 +-
mgmt/api/CfgContextManager.cc | 137 +-
mgmt/api/CfgContextManager.h | 28 +-
mgmt/api/CfgContextUtils.cc | 563 +--
mgmt/api/CfgContextUtils.h | 86 +-
mgmt/api/CoreAPI.cc | 128 +-
mgmt/api/CoreAPI.h | 59 +-
mgmt/api/CoreAPIRemote.cc | 104 +-
mgmt/api/CoreAPIShared.cc | 13 +-
mgmt/api/CoreAPIShared.h | 48 +-
mgmt/api/EventCallback.cc | 47 +-
mgmt/api/EventCallback.h | 20 +-
mgmt/api/EventControlMain.cc | 150 +-
mgmt/api/EventControlMain.h | 15 +-
mgmt/api/GenericParser.cc | 159 +-
mgmt/api/GenericParser.h | 102 +-
mgmt/api/INKMgmtAPI.cc | 408 +-
mgmt/api/NetworkMessage.cc | 189 +-
mgmt/api/NetworkMessage.h | 24 +-
mgmt/api/NetworkUtilsLocal.cc | 2 +-
mgmt/api/NetworkUtilsLocal.h | 2 +-
mgmt/api/NetworkUtilsRemote.cc | 96 +-
mgmt/api/NetworkUtilsRemote.h | 9 +-
mgmt/api/TSControlMain.cc | 291 +-
mgmt/api/TSControlMain.h | 3 +-
mgmt/api/include/mgmtapi.h | 1505 +++---
mgmt/cluster/ClusterCom.cc | 581 ++-
mgmt/cluster/ClusterCom.h | 62 +-
mgmt/cluster/VMap.cc | 207 +-
mgmt/cluster/VMap.h | 23 +-
mgmt/utils/ExpandingArray.cc | 9 +-
mgmt/utils/ExpandingArray.h | 13 +-
mgmt/utils/MgmtHashTable.h | 68 +-
mgmt/utils/MgmtMarshall.cc | 65 +-
mgmt/utils/MgmtMarshall.h | 30 +-
mgmt/utils/MgmtSocket.cc | 42 +-
mgmt/utils/MgmtSocket.h | 6 +-
mgmt/utils/MgmtUtils.cc | 75 +-
mgmt/utils/MgmtUtils.h | 12 +-
mgmt/utils/test_marshall.cc | 144 +-
mgmt/web2/WebCompatibility.cc | 25 +-
mgmt/web2/WebCompatibility.h | 12 +-
mgmt/web2/WebGlobals.h | 54 +-
mgmt/web2/WebHttp.cc | 63 +-
mgmt/web2/WebHttp.h | 6 +-
mgmt/web2/WebHttpContext.cc | 16 +-
mgmt/web2/WebHttpContext.h | 21 +-
mgmt/web2/WebHttpMessage.cc | 113 +-
mgmt/web2/WebHttpMessage.h | 94 +-
mgmt/web2/WebIntrMain.cc | 85 +-
mgmt/web2/WebOverview.cc | 88 +-
mgmt/web2/WebOverview.h | 52 +-
mgmt/web2/WebUtils.cc | 5 +-
mgmt/web2/WebUtils.h | 3 +-
plugins/cacheurl/cacheurl.cc | 108 +-
plugins/conf_remap/conf_remap.cc | 70 +-
.../ats_pagespeed/ats_base_fetch.cc | 75 +-
.../experimental/ats_pagespeed/ats_base_fetch.h | 54 +-
.../ats_pagespeed/ats_beacon_intercept.cc | 93 +-
.../experimental/ats_pagespeed/ats_config.cc | 79 +-
plugins/experimental/ats_pagespeed/ats_config.h | 66 +-
.../ats_pagespeed/ats_header_utils.cc | 35 +-
.../ats_pagespeed/ats_header_utils.h | 10 +-
.../ats_pagespeed/ats_log_message_handler.cc | 48 +-
.../ats_pagespeed/ats_log_message_handler.h | 15 +-
.../ats_pagespeed/ats_message_handler.cc | 50 +-
.../ats_pagespeed/ats_message_handler.h | 60 +-
.../experimental/ats_pagespeed/ats_pagespeed.cc | 448 +-
.../experimental/ats_pagespeed/ats_pagespeed.h | 65 +-
.../ats_pagespeed/ats_process_context.cc | 46 +-
.../ats_pagespeed/ats_process_context.h | 40 +-
.../ats_pagespeed/ats_resource_intercept.cc | 240 +-
.../ats_pagespeed/ats_resource_intercept.h | 24 +-
.../ats_pagespeed/ats_rewrite_driver_factory.cc | 234 +-
.../ats_pagespeed/ats_rewrite_driver_factory.h | 106 +-
.../ats_pagespeed/ats_rewrite_options.cc | 111 +-
.../ats_pagespeed/ats_rewrite_options.h | 74 +-
.../ats_pagespeed/ats_server_context.cc | 20 +-
.../ats_pagespeed/ats_server_context.h | 25 +-
.../ats_pagespeed/ats_thread_system.h | 15 +-
.../ats_pagespeed/gzip/configuration.cc | 403 +-
.../ats_pagespeed/gzip/configuration.h | 131 +-
.../ats_pagespeed/gzip/debug_macros.h | 43 +-
plugins/experimental/ats_pagespeed/gzip/gzip.cc | 271 +-
plugins/experimental/ats_pagespeed/gzip/misc.cc | 32 +-
plugins/experimental/ats_pagespeed/gzip/misc.h | 32 +-
plugins/experimental/authproxy/authproxy.cc | 258 +-
plugins/experimental/authproxy/utils.cc | 55 +-
plugins/experimental/authproxy/utils.h | 39 +-
.../background_fetch/background_fetch.cc | 193 +-
plugins/experimental/balancer/balancer.cc | 33 +-
plugins/experimental/balancer/balancer.h | 22 +-
plugins/experimental/balancer/hash.cc | 73 +-
plugins/experimental/balancer/roundrobin.cc | 25 +-
.../experimental/buffer_upload/buffer_upload.cc | 378 +-
.../experimental/channel_stats/channel_stats.cc | 266 +-
.../experimental/channel_stats/debug_macros.h | 72 +-
.../collapsed_connection/MurmurHash3.cc | 227 +-
.../collapsed_connection/MurmurHash3.h | 4 +-
.../P_collapsed_connection.h | 33 +-
.../collapsed_connection.cc | 141 +-
.../custom_redirect/custom_redirect.cc | 217 +-
plugins/experimental/epic/epic.cc | 401 +-
plugins/experimental/escalate/escalate.cc | 41 +-
plugins/experimental/esi/combo_handler.cc | 233 +-
plugins/experimental/esi/esi.cc | 571 +--
.../esi/fetcher/FetchedDataProcessor.h | 13 +-
.../experimental/esi/fetcher/HttpDataFetcher.h | 35 +-
.../esi/fetcher/HttpDataFetcherImpl.cc | 73 +-
.../esi/fetcher/HttpDataFetcherImpl.h | 45 +-
plugins/experimental/esi/lib/Attribute.h | 7 +-
plugins/experimental/esi/lib/ComponentBase.h | 17 +-
plugins/experimental/esi/lib/DocNode.cc | 48 +-
plugins/experimental/esi/lib/DocNode.h | 27 +-
plugins/experimental/esi/lib/EsiGunzip.cc | 35 +-
plugins/experimental/esi/lib/EsiGunzip.h | 12 +-
plugins/experimental/esi/lib/EsiGzip.cc | 65 +-
plugins/experimental/esi/lib/EsiGzip.h | 15 +-
plugins/experimental/esi/lib/EsiParser.cc | 283 +-
plugins/experimental/esi/lib/EsiParser.h | 70 +-
plugins/experimental/esi/lib/EsiProcessor.cc | 593 ++-
plugins/experimental/esi/lib/EsiProcessor.h | 54 +-
plugins/experimental/esi/lib/Expression.cc | 83 +-
plugins/experimental/esi/lib/Expression.h | 51 +-
plugins/experimental/esi/lib/FailureInfo.cc | 124 +-
plugins/experimental/esi/lib/FailureInfo.h | 114 +-
plugins/experimental/esi/lib/HandlerManager.cc | 31 +-
plugins/experimental/esi/lib/HandlerManager.h | 21 +-
plugins/experimental/esi/lib/HttpHeader.h | 7 +-
.../esi/lib/IncludeHandlerFactory.h | 16 +-
.../esi/lib/SpecialIncludeHandler.h | 28 +-
plugins/experimental/esi/lib/Stats.cc | 69 +-
plugins/experimental/esi/lib/Stats.h | 51 +-
plugins/experimental/esi/lib/StringHash.h | 13 +-
plugins/experimental/esi/lib/Utils.cc | 41 +-
plugins/experimental/esi/lib/Utils.h | 48 +-
plugins/experimental/esi/lib/Variables.cc | 209 +-
plugins/experimental/esi/lib/Variables.h | 56 +-
plugins/experimental/esi/lib/gzip.cc | 34 +-
plugins/experimental/esi/lib/gzip.h | 13 +-
plugins/experimental/esi/serverIntercept.cc | 75 +-
.../experimental/esi/test/StubIncludeHandler.cc | 17 +-
.../experimental/esi/test/StubIncludeHandler.h | 14 +-
.../experimental/esi/test/TestHandlerManager.cc | 10 +-
.../experimental/esi/test/TestHttpDataFetcher.h | 35 +-
plugins/experimental/esi/test/docnode_test.cc | 16 +-
plugins/experimental/esi/test/parser_test.cc | 93 +-
plugins/experimental/esi/test/print_funcs.cc | 8 +-
plugins/experimental/esi/test/processor_test.cc | 349 +-
plugins/experimental/esi/test/sampleProb.cc | 274 +-
plugins/experimental/esi/test/utils_test.cc | 31 +-
plugins/experimental/esi/test/vars_test.cc | 47 +-
plugins/experimental/generator/generator.cc | 234 +-
plugins/experimental/geoip_acl/acl.cc | 57 +-
plugins/experimental/geoip_acl/acl.h | 83 +-
plugins/experimental/geoip_acl/geoip_acl.cc | 24 +-
plugins/experimental/geoip_acl/lulu.h | 3 +-
.../header_normalize/header_normalize.cc | 34 +-
.../experimental/healthchecks/healthchecks.c | 109 +-
plugins/experimental/hipes/gen_escape.c | 14 +-
plugins/experimental/hipes/hipes.cc | 114 +-
.../memcached_remap/memcached_remap.cc | 364 +-
plugins/experimental/metalink/metalink.cc | 92 +-
plugins/experimental/mysql_remap/default.h | 2 +-
.../experimental/mysql_remap/lib/dictionary.c | 457 +-
.../experimental/mysql_remap/lib/dictionary.h | 40 +-
.../experimental/mysql_remap/lib/iniparser.c | 630 +--
.../experimental/mysql_remap/lib/iniparser.h | 38 +-
plugins/experimental/mysql_remap/mysql_remap.cc | 154 +-
.../regex_revalidate/regex_revalidate.c | 805 ++-
plugins/experimental/remap_stats/remap_stats.c | 58 +-
plugins/experimental/s3_auth/s3_auth.cc | 158 +-
plugins/experimental/spdy/http.cc | 385 +-
plugins/experimental/spdy/http.h | 76 +-
plugins/experimental/spdy/io.cc | 66 +-
plugins/experimental/spdy/io.h | 241 +-
plugins/experimental/spdy/lib/base/atomic.h | 39 +-
plugins/experimental/spdy/lib/base/inet.h | 76 +-
plugins/experimental/spdy/lib/base/logging.cc | 38 +-
plugins/experimental/spdy/lib/base/logging.h | 54 +-
plugins/experimental/spdy/lib/spdy/message.cc | 681 ++-
plugins/experimental/spdy/lib/spdy/spdy.h | 521 +-
plugins/experimental/spdy/lib/spdy/zstream.cc | 140 +-
plugins/experimental/spdy/lib/spdy/zstream.h | 148 +-
plugins/experimental/spdy/protocol.cc | 244 +-
plugins/experimental/spdy/protocol.h | 24 +-
plugins/experimental/spdy/spdy.cc | 500 +-
plugins/experimental/spdy/stream.cc | 454 +-
plugins/experimental/spdy/strings.cc | 150 +-
plugins/experimental/spdy/tests/stubs.cc | 16 +-
plugins/experimental/spdy/tests/zstream_test.cc | 303 +-
plugins/experimental/ssl_cert_loader/ats-util.h | 10 +-
.../experimental/ssl_cert_loader/domain-tree.cc | 24 +-
.../experimental/ssl_cert_loader/domain-tree.h | 29 +-
.../ssl_cert_loader/ssl-cert-loader.cc | 92 +-
plugins/experimental/sslheaders/expand.cc | 56 +-
plugins/experimental/sslheaders/sslheaders.cc | 49 +-
plugins/experimental/sslheaders/sslheaders.h | 55 +-
.../experimental/sslheaders/test_sslheaders.cc | 118 +-
plugins/experimental/sslheaders/util.cc | 27 +-
.../stale_while_revalidate.c | 1136 ++---
plugins/experimental/ts_lua/ts_lua.c | 29 +-
.../ts_lua/ts_lua_cached_response.c | 87 +-
.../ts_lua/ts_lua_cached_response.h | 2 +-
.../experimental/ts_lua/ts_lua_client_request.c | 218 +-
.../experimental/ts_lua/ts_lua_client_request.h | 2 +-
.../ts_lua/ts_lua_client_response.c | 102 +-
.../ts_lua/ts_lua_client_response.h | 2 +-
plugins/experimental/ts_lua/ts_lua_common.h | 134 +-
plugins/experimental/ts_lua/ts_lua_context.c | 26 +-
plugins/experimental/ts_lua/ts_lua_context.h | 4 +-
plugins/experimental/ts_lua/ts_lua_crypto.c | 83 +-
plugins/experimental/ts_lua/ts_lua_crypto.h | 2 +-
plugins/experimental/ts_lua/ts_lua_hook.c | 65 +-
plugins/experimental/ts_lua/ts_lua_hook.h | 2 +-
plugins/experimental/ts_lua/ts_lua_http.c | 76 +-
plugins/experimental/ts_lua/ts_lua_http.h | 2 +-
plugins/experimental/ts_lua/ts_lua_http_cntl.c | 24 +-
plugins/experimental/ts_lua/ts_lua_http_cntl.h | 2 +-
.../experimental/ts_lua/ts_lua_http_config.c | 121 +-
.../experimental/ts_lua/ts_lua_http_config.h | 2 +-
.../experimental/ts_lua/ts_lua_http_intercept.c | 70 +-
.../experimental/ts_lua/ts_lua_http_intercept.h | 2 +-
.../experimental/ts_lua/ts_lua_http_milestone.c | 49 +-
.../experimental/ts_lua/ts_lua_http_milestone.h | 2 +-
plugins/experimental/ts_lua/ts_lua_log.c | 29 +-
plugins/experimental/ts_lua/ts_lua_log.h | 2 +-
plugins/experimental/ts_lua/ts_lua_mgmt.c | 18 +-
plugins/experimental/ts_lua/ts_lua_mgmt.h | 2 +-
plugins/experimental/ts_lua/ts_lua_misc.c | 38 +-
plugins/experimental/ts_lua/ts_lua_misc.h | 2 +-
plugins/experimental/ts_lua/ts_lua_package.c | 51 +-
plugins/experimental/ts_lua/ts_lua_package.h | 2 +-
plugins/experimental/ts_lua/ts_lua_remap.c | 18 +-
plugins/experimental/ts_lua/ts_lua_remap.h | 2 +-
.../experimental/ts_lua/ts_lua_server_request.c | 195 +-
.../experimental/ts_lua/ts_lua_server_request.h | 2 +-
.../ts_lua/ts_lua_server_response.c | 91 +-
.../ts_lua/ts_lua_server_response.h | 2 +-
plugins/experimental/ts_lua/ts_lua_stat.c | 80 +-
plugins/experimental/ts_lua/ts_lua_stat.h | 2 +-
plugins/experimental/ts_lua/ts_lua_string.c | 2 +-
plugins/experimental/ts_lua/ts_lua_string.h | 2 +-
plugins/experimental/ts_lua/ts_lua_transform.c | 19 +-
plugins/experimental/ts_lua/ts_lua_util.c | 116 +-
plugins/experimental/ts_lua/ts_lua_util.h | 34 +-
plugins/experimental/url_sig/url_sig.c | 104 +-
plugins/experimental/url_sig/url_sig.h | 26 +-
plugins/experimental/xdebug/xdebug.cc | 122 +-
plugins/gzip/configuration.cc | 407 +-
plugins/gzip/configuration.h | 149 +-
plugins/gzip/debug_macros.h | 43 +-
plugins/gzip/gzip.cc | 275 +-
plugins/gzip/misc.cc | 32 +-
plugins/gzip/misc.h | 32 +-
plugins/header_rewrite/condition.cc | 4 +-
plugins/header_rewrite/condition.h | 49 +-
plugins/header_rewrite/conditions.cc | 119 +-
plugins/header_rewrite/conditions.h | 173 +-
plugins/header_rewrite/expander.cc | 2 +-
plugins/header_rewrite/expander.h | 9 +-
plugins/header_rewrite/factory.cc | 12 +-
plugins/header_rewrite/factory.h | 4 +-
plugins/header_rewrite/header_rewrite.cc | 76 +-
plugins/header_rewrite/lulu.cc | 50 +-
plugins/header_rewrite/lulu.h | 54 +-
plugins/header_rewrite/matcher.h | 105 +-
plugins/header_rewrite/operator.cc | 7 +-
plugins/header_rewrite/operator.h | 26 +-
plugins/header_rewrite/operators.cc | 108 +-
plugins/header_rewrite/operators.h | 120 +-
plugins/header_rewrite/parser.cc | 13 +-
plugins/header_rewrite/parser.h | 50 +-
plugins/header_rewrite/regex_helper.cc | 64 +-
plugins/header_rewrite/regex_helper.h | 28 +-
plugins/header_rewrite/resources.cc | 2 +-
plugins/header_rewrite/resources.h | 13 +-
plugins/header_rewrite/ruleset.cc | 12 +-
plugins/header_rewrite/ruleset.h | 53 +-
plugins/header_rewrite/statement.cc | 8 +-
plugins/header_rewrite/statement.h | 66 +-
plugins/header_rewrite/value.h | 49 +-
plugins/libloader/libloader.c | 73 +-
plugins/regex_remap/regex_remap.cc | 318 +-
plugins/stats_over_http/stats_over_http.c | 113 +-
plugins/tcpinfo/tcpinfo.cc | 182 +-
proxy/AbstractBuffer.cc | 52 +-
proxy/AbstractBuffer.h | 80 +-
proxy/CacheControl.cc | 81 +-
proxy/CacheControl.h | 44 +-
proxy/CompletionUtil.h | 24 +-
proxy/ConfigParse.h | 8 +-
proxy/ControlBase.cc | 547 +-
proxy/ControlBase.h | 43 +-
proxy/ControlMatcher.cc | 224 +-
proxy/ControlMatcher.h | 241 +-
proxy/CoreUtils.cc | 207 +-
proxy/CoreUtils.h | 62 +-
proxy/Crash.cc | 18 +-
proxy/DynamicStats.h | 30 +-
proxy/EventName.cc | 146 +-
proxy/FetchSM.cc | 102 +-
proxy/FetchSM.h | 69 +-
proxy/HttpTransStats.h | 4 +-
proxy/ICP.cc | 2054 ++++----
proxy/ICP.h | 686 +--
proxy/ICPConfig.cc | 472 +-
proxy/ICPProcessor.cc | 4 +-
proxy/ICPProcessor.h | 10 +-
proxy/ICPStats.cc | 134 +-
proxy/ICPevents.h | 3 +-
proxy/ICPlog.h | 14 +-
proxy/IPAllow.cc | 60 +-
proxy/IPAllow.h | 49 +-
proxy/InkAPI.cc | 1703 ++++---
proxy/InkAPIInternal.h | 133 +-
proxy/InkAPITest.cc | 1424 +++---
proxy/InkAPITestTool.cc | 372 +-
proxy/InkIOCoreAPI.cc | 42 +-
proxy/InkPool_r.h | 24 +-
proxy/Main.cc | 488 +-
proxy/Main.h | 12 +-
proxy/ParentSelection.cc | 309 +-
proxy/ParentSelection.h | 84 +-
proxy/Plugin.cc | 91 +-
proxy/Plugin.h | 19 +-
proxy/PluginVC.cc | 138 +-
proxy/PluginVC.h | 124 +-
proxy/Prefetch.cc | 752 ++-
proxy/Prefetch.h | 162 +-
proxy/ProtoSM.h | 38 +-
proxy/ProtocolProbeSessionAccept.cc | 40 +-
proxy/ProtocolProbeSessionAccept.h | 27 +-
proxy/ProxyClientSession.cc | 46 +-
proxy/ProxyClientSession.h | 51 +-
proxy/RegressionSM.cc | 88 +-
proxy/RegressionSM.h | 18 +-
proxy/ReverseProxy.cc | 39 +-
proxy/ReverseProxy.h | 2 +-
proxy/Show.h | 46 +-
proxy/SocksProxy.cc | 409 +-
proxy/StatPages.cc | 18 +-
proxy/StatPages.h | 42 +-
proxy/StatSystem.cc | 300 +-
proxy/StatSystem.h | 553 +--
proxy/StufferUdpReceiver.cc | 74 +-
proxy/TestClusterHash.cc | 12 +-
proxy/TestDNS.cc | 121 +-
proxy/TestPreProc.cc | 16 +-
proxy/TestPreProc.h | 13 +-
proxy/TestProxy.cc | 118 +-
proxy/TestSimpleProxy.cc | 49 +-
proxy/TimeTrace.h | 21 +-
proxy/Transform.cc | 259 +-
proxy/Transform.h | 33 +-
proxy/TransformInternal.h | 42 +-
proxy/UDPAPIClientTest.cc | 12 +-
proxy/UDPAPIClientTest.h | 2 +-
proxy/UDPAPITest.cc | 12 +-
proxy/UDPAPITest.h | 2 +-
proxy/UnixCompletionUtil.h | 46 +-
proxy/Update.cc | 1758 ++++---
proxy/Update.h | 191 +-
proxy/api/ts/InkAPIPrivateIOCore.h | 97 +-
proxy/api/ts/TsException.h | 68 +-
proxy/api/ts/experimental.h | 1273 +++--
proxy/api/ts/remap.h | 201 +-
proxy/api/ts/ts.h | 4690 +++++++++---------
proxy/congest/Congestion.cc | 168 +-
proxy/congest/Congestion.h | 175 +-
proxy/congest/CongestionDB.cc | 107 +-
proxy/congest/CongestionDB.h | 38 +-
proxy/congest/CongestionStats.cc | 24 +-
proxy/congest/CongestionStats.h | 7 +-
proxy/congest/CongestionTest.cc | 103 +-
proxy/congest/MT_hashtable.h | 163 +-
proxy/hdrs/HTTP.cc | 425 +-
proxy/hdrs/HTTP.h | 426 +-
proxy/hdrs/HdrHeap.cc | 214 +-
proxy/hdrs/HdrHeap.h | 284 +-
proxy/hdrs/HdrTSOnly.cc | 36 +-
proxy/hdrs/HdrTest.cc | 1600 +++---
proxy/hdrs/HdrTest.h | 22 +-
proxy/hdrs/HdrToken.cc | 536 +-
proxy/hdrs/HdrToken.h | 240 +-
proxy/hdrs/HdrUtils.cc | 62 +-
proxy/hdrs/HdrUtils.h | 27 +-
proxy/hdrs/HttpCompat.cc | 158 +-
proxy/hdrs/HttpCompat.h | 46 +-
proxy/hdrs/MIME.cc | 526 +-
proxy/hdrs/MIME.h | 511 +-
proxy/hdrs/URL.cc | 383 +-
proxy/hdrs/URL.h | 75 +-
proxy/hdrs/load_http_hdr.cc | 49 +-
proxy/hdrs/test_header.cc | 582 +--
proxy/hdrs/test_urlhash.cc | 10 +-
proxy/http/HttpBodyFactory.cc | 151 +-
proxy/http/HttpBodyFactory.h | 91 +-
proxy/http/HttpCacheSM.cc | 73 +-
proxy/http/HttpCacheSM.h | 50 +-
proxy/http/HttpClientSession.cc | 83 +-
proxy/http/HttpClientSession.h | 69 +-
proxy/http/HttpConfig.cc | 1315 ++---
proxy/http/HttpConfig.h | 211 +-
proxy/http/HttpConnectionCount.h | 41 +-
proxy/http/HttpDebugNames.cc | 67 +-
proxy/http/HttpDebugNames.h | 2 +-
proxy/http/HttpPages.cc | 37 +-
proxy/http/HttpPages.h | 20 +-
proxy/http/HttpProxyAPIEnums.h | 2 +-
proxy/http/HttpProxyServerMain.cc | 47 +-
proxy/http/HttpProxyServerMain.h | 2 +-
proxy/http/HttpSM.cc | 2410 +++++----
proxy/http/HttpSM.h | 204 +-
proxy/http/HttpServerSession.cc | 18 +-
proxy/http/HttpServerSession.h | 35 +-
proxy/http/HttpSessionAccept.cc | 10 +-
proxy/http/HttpSessionAccept.h | 264 +-
proxy/http/HttpSessionManager.cc | 77 +-
proxy/http/HttpSessionManager.h | 80 +-
proxy/http/HttpTransact.cc | 2034 ++++----
proxy/http/HttpTransact.h | 812 ++-
proxy/http/HttpTransactCache.cc | 218 +-
proxy/http/HttpTransactCache.h | 84 +-
proxy/http/HttpTransactHeaders.cc | 108 +-
proxy/http/HttpTransactHeaders.h | 80 +-
proxy/http/HttpTunnel.cc | 283 +-
proxy/http/HttpTunnel.h | 195 +-
proxy/http/HttpUpdateSM.cc | 131 +-
proxy/http/HttpUpdateSM.h | 21 +-
proxy/http/HttpUpdateTester.cc | 19 +-
proxy/http/RegressionHttpTransact.cc | 79 +-
proxy/http/TestHttpTransact.cc | 38 +-
proxy/http/TestUrl.cc | 5 +-
proxy/http/remap/AclFiltering.cc | 16 +-
proxy/http/remap/AclFiltering.h | 26 +-
proxy/http/remap/RemapConfig.cc | 302 +-
proxy/http/remap/RemapConfig.h | 48 +-
proxy/http/remap/RemapPluginInfo.cc | 6 +-
proxy/http/remap/RemapPluginInfo.h | 19 +-
proxy/http/remap/RemapPlugins.cc | 39 +-
proxy/http/remap/RemapPlugins.h | 50 +-
proxy/http/remap/RemapProcessor.cc | 37 +-
proxy/http/remap/RemapProcessor.h | 37 +-
proxy/http/remap/UrlMapping.cc | 34 +-
proxy/http/remap/UrlMapping.h | 101 +-
proxy/http/remap/UrlMappingPathIndex.cc | 6 +-
proxy/http/remap/UrlMappingPathIndex.h | 31 +-
proxy/http/remap/UrlRewrite.cc | 175 +-
proxy/http/remap/UrlRewrite.h | 116 +-
proxy/http/test_socket_close.cc | 83 +-
proxy/http/testheaders.cc | 77 +-
proxy/http2/HPACK.cc | 283 +-
proxy/http2/HPACK.h | 123 +-
proxy/http2/HTTP2.cc | 463 +-
proxy/http2/HTTP2.h | 167 +-
proxy/http2/Http2ClientSession.cc | 80 +-
proxy/http2/Http2ClientSession.h | 113 +-
proxy/http2/Http2ConnectionState.cc | 278 +-
proxy/http2/Http2ConnectionState.h | 130 +-
proxy/http2/Http2SessionAccept.cc | 15 +-
proxy/http2/Http2SessionAccept.h | 11 +-
proxy/http2/HuffmanCodec.cc | 549 +-
proxy/http2/HuffmanCodec.h | 2 +-
proxy/logcat.cc | 31 +-
proxy/logging/Log.cc | 735 +--
proxy/logging/Log.h | 63 +-
proxy/logging/LogAccess.cc | 66 +-
proxy/logging/LogAccess.h | 189 +-
proxy/logging/LogAccessHttp.cc | 124 +-
proxy/logging/LogAccessHttp.h | 88 +-
proxy/logging/LogAccessICP.cc | 32 +-
proxy/logging/LogAccessICP.h | 42 +-
proxy/logging/LogAccessTest.cc | 12 +-
proxy/logging/LogAccessTest.h | 47 +-
proxy/logging/LogBuffer.cc | 152 +-
proxy/logging/LogBuffer.h | 186 +-
proxy/logging/LogBufferSink.h | 6 +-
proxy/logging/LogCollationAccept.cc | 16 +-
proxy/logging/LogCollationAccept.h | 11 +-
proxy/logging/LogCollationBase.h | 9 +-
proxy/logging/LogCollationClientSM.cc | 247 +-
proxy/logging/LogCollationClientSM.h | 29 +-
proxy/logging/LogCollationHostSM.cc | 102 +-
proxy/logging/LogCollationHostSM.h | 27 +-
proxy/logging/LogConfig.cc | 593 +--
proxy/logging/LogConfig.h | 68 +-
proxy/logging/LogField.cc | 138 +-
proxy/logging/LogField.h | 99 +-
proxy/logging/LogFieldAliasMap.cc | 7 +-
proxy/logging/LogFieldAliasMap.h | 92 +-
proxy/logging/LogFile.cc | 188 +-
proxy/logging/LogFile.h | 114 +-
proxy/logging/LogFilter.cc | 298 +-
proxy/logging/LogFilter.h | 259 +-
proxy/logging/LogFormat.cc | 134 +-
proxy/logging/LogFormat.h | 124 +-
proxy/logging/LogHost.cc | 111 +-
proxy/logging/LogHost.h | 81 +-
proxy/logging/LogLimits.h | 9 +-
proxy/logging/LogObject.cc | 353 +-
proxy/logging/LogObject.h | 299 +-
proxy/logging/LogPredefined.cc | 41 +-
proxy/logging/LogPredefined.h | 34 +-
proxy/logging/LogSock.cc | 98 +-
proxy/logging/LogSock.h | 52 +-
proxy/logging/LogStandalone.cc | 23 +-
proxy/logging/LogUtils.cc | 83 +-
proxy/logging/LogUtils.h | 51 +-
proxy/logstats.cc | 391 +-
proxy/sac.cc | 16 +-
proxy/shared/DiagsConfig.cc | 103 +-
proxy/shared/DiagsConfig.h | 10 +-
proxy/shared/Error.cc | 5 +-
proxy/shared/Error.h | 78 +-
proxy/shared/InkXml.cc | 31 +-
proxy/shared/InkXml.h | 68 +-
proxy/shared/UglyLogStubs.cc | 55 +-
proxy/spdy/SpdyCallbacks.cc | 245 +-
proxy/spdy/SpdyCallbacks.h | 77 +-
proxy/spdy/SpdyClientSession.cc | 92 +-
proxy/spdy/SpdyClientSession.h | 67 +-
proxy/spdy/SpdyCommon.cc | 21 +-
proxy/spdy/SpdyCommon.h | 50 +-
proxy/spdy/SpdyDefs.h | 15 +-
proxy/spdy/SpdySessionAccept.cc | 9 +-
proxy/spdy/SpdySessionAccept.h | 7 +-
proxy/test_xml_parser.cc | 8 +-
tools/http_load/http_load.c | 389 +-
tools/http_load/port.h | 6 +-
tools/http_load/timers.c | 75 +-
tools/http_load/timers.h | 15 +-
tools/jtest/jtest.cc | 2760 ++++++-----
tools/lighttpd_mod_generator/mod_generator.c | 97 +-
1080 files changed, 69351 insertions(+), 71634 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/65477944/cmd/traffic_cop/traffic_cop.cc
----------------------------------------------------------------------
diff --git a/cmd/traffic_cop/traffic_cop.cc b/cmd/traffic_cop/traffic_cop.cc
index 6fde7aa..115b1cc 100644
--- a/cmd/traffic_cop/traffic_cop.cc
+++ b/cmd/traffic_cop/traffic_cop.cc
@@ -33,35 +33,34 @@
#include <string>
#include <map>
-#if defined(linux) || defined (solaris)
+#if defined(linux) || defined(solaris)
#include "sys/utsname.h"
#include <sys/types.h>
#include <sys/ipc.h>
#include <sys/sem.h>
-union semun
-{
- int val; /* value for SETVAL */
- struct semid_ds *buf; /* buffer for IPC_STAT, IPC_SET */
- unsigned short int *array; /* array for GETALL, SETALL */
- struct seminfo *__buf; /* buffer for IPC_INFO */
+union semun {
+ int val; /* value for SETVAL */
+ struct semid_ds *buf; /* buffer for IPC_STAT, IPC_SET */
+ unsigned short int *array; /* array for GETALL, SETALL */
+ struct seminfo *__buf; /* buffer for IPC_INFO */
};
-#endif // linux check
+#endif // linux check
#include <grp.h>
static const int MAX_LOGIN = ink_login_name_max();
-#define OPTIONS_MAX 32
+#define OPTIONS_MAX 32
#define OPTIONS_LEN_MAX 1024
#ifndef WAIT_ANY
-#define WAIT_ANY (pid_t) -1
+#define WAIT_ANY (pid_t) - 1
#endif // !WAIT_ANY
-#define COP_FATAL LOG_ALERT
-#define COP_WARNING LOG_ERR
-#define COP_DEBUG LOG_DEBUG
-#define COP_NOTICE LOG_NOTICE
+#define COP_FATAL LOG_ALERT
+#define COP_WARNING LOG_ERR
+#define COP_DEBUG LOG_DEBUG
+#define COP_NOTICE LOG_NOTICE
static const char *runtime_dir;
static char config_file[PATH_NAME_MAX];
@@ -83,7 +82,7 @@ static int debug_flag = false;
static int stdout_flag = false;
static int stop_flag = false;
-static char* admin_user;
+static char *admin_user;
static uid_t admin_uid;
static gid_t admin_gid;
static bool admin_user_p = false;
@@ -107,18 +106,18 @@ static int manager_failures = 0;
static int server_failures = 0;
static int server_not_found = 0;
-static const int sleep_time = 10; // 10 sec
-static const int manager_timeout = 3 * 60; // 3 min
-static const int server_timeout = 3 * 60; // 3 min
+static const int sleep_time = 10; // 10 sec
+static const int manager_timeout = 3 * 60; // 3 min
+static const int server_timeout = 3 * 60; // 3 min
// traffic_manager flap detection
#define MANAGER_FLAP_DETECTION 1
#if defined(MANAGER_FLAP_DETECTION)
-#define MANAGER_MAX_FLAP_COUNT 3 // if flap this many times, give up
for a while
-#define MANAGER_FLAP_INTERVAL_MSEC 60000 // if x number of flaps happen
in this interval, declare flapping
-#define MANAGER_FLAP_RETRY_MSEC 60000 // if flapping, don't try to restart
until after this retry duration
-static bool manager_flapping = false; // is the manager flapping?
-static int manager_flap_count = 0; // how many times has the manager
flapped?
+#define MANAGER_MAX_FLAP_COUNT 3 // if flap this many
times, give up for a while
+#define MANAGER_FLAP_INTERVAL_MSEC 60000 // if x number of
flaps happen in this interval, declare flapping
+#define MANAGER_FLAP_RETRY_MSEC 60000 // if flapping, don't
try to restart until after this retry duration
+static bool manager_flapping = false; // is the manager
flapping?
+static int manager_flap_count = 0; // how many times has
the manager flapped?
static ink_hrtime manager_flap_interval_start_time = 0; // first time we
attempted to start the manager in past little while)
static ink_hrtime manager_flap_retry_start_time = 0; // first time we
attempted to start the manager in past little while)
#endif
@@ -140,35 +139,39 @@ static void cop_log(int priority, const char *format,
...) TS_PRINTFLIKE(2, 3);
static void get_admin_user(void);
-struct ConfigValue
-{
- ConfigValue()
- : config_type(RECT_NULL), data_type(RECD_NULL) {
- }
+struct ConfigValue {
+ ConfigValue() : config_type(RECT_NULL), data_type(RECD_NULL) {}
- ConfigValue(RecT _t, RecDataT _d, const std::string& _v)
- : config_type(_t), data_type(_d), data_value(_v) {
- }
+ ConfigValue(RecT _t, RecDataT _d, const std::string &_v) : config_type(_t),
data_type(_d), data_value(_v) {}
- RecT config_type;
- RecDataT data_type;
+ RecT config_type;
+ RecDataT data_type;
std::string data_value;
};
typedef std::map<std::string, ConfigValue> ConfigValueTable;
static ConfigValueTable configTable;
-#define cop_log_trace(...) do { if (debug_flag) cop_log(COP_DEBUG,
__VA_ARGS__); } while (0)
+#define cop_log_trace(...) \
+ do { \
+ if (debug_flag) \
+ cop_log(COP_DEBUG, __VA_ARGS__); \
+ } while (0)
static const char *
priority_name(int priority)
{
switch (priority) {
- case COP_DEBUG: return "DEBUG";
- case COP_WARNING: return "WARNING";
- case COP_FATAL: return "FATAL";
- case COP_NOTICE: return "NOTICE";
- default: return "unknown";
+ case COP_DEBUG:
+ return "DEBUG";
+ case COP_WARNING:
+ return "WARNING";
+ case COP_FATAL:
+ return "FATAL";
+ case COP_NOTICE:
+ return "NOTICE";
+ default:
+ return "unknown";
}
}
@@ -200,11 +203,12 @@ cop_log(int priority, const char *format, ...)
void
-chown_file_to_admin_user(const char *file) {
+chown_file_to_admin_user(const char *file)
+{
if (admin_user_p) {
if (chown(file, admin_uid, admin_gid) < 0 && errno != ENOENT) {
- cop_log(COP_FATAL, "cop couldn't chown the file: '%s' for '%s' (%d/%d) :
[%d] %s\n",
- file, admin_user, admin_uid, admin_gid, errno, strerror(errno));
+ cop_log(COP_FATAL, "cop couldn't chown the file: '%s' for '%s' (%d/%d) :
[%d] %s\n", file, admin_user, admin_uid, admin_gid,
+ errno, strerror(errno));
}
}
}
@@ -240,7 +244,7 @@ sig_term(int signum)
pid_t pid = 0;
int status = 0;
- //killsig = SIGTERM;
+ // killsig = SIGTERM;
cop_log_trace("Entering sig_term(%d)\n", signum);
@@ -271,7 +275,7 @@ sig_term(int signum)
static void
#if defined(solaris)
-sig_fatal(int signum, siginfo_t * t, void *c)
+sig_fatal(int signum, siginfo_t *t, void *c)
#else
sig_fatal(int signum)
#endif
@@ -281,9 +285,12 @@ sig_fatal(int signum)
if (t) {
if (t->si_code <= 0) {
cop_log(COP_FATAL, "cop received fatal user signal [%d] from"
- " pid [%d] uid [%d]\n", signum, (int)(t->si_pid), t->si_uid);
+ " pid [%d] uid [%d]\n",
+ signum, (int)(t->si_pid), t->si_uid);
} else {
- cop_log(COP_FATAL, "cop received fatal kernel signal [%d], " "reason
[%d]\n", signum, t->si_code);
+ cop_log(COP_FATAL, "cop received fatal kernel signal [%d], "
+ "reason [%d]\n",
+ signum, t->si_code);
}
} else {
#endif
@@ -298,13 +305,15 @@ sig_fatal(int signum)
static void
#if defined(solaris)
-sig_alarm_warn(int signum, siginfo_t * t, void *c)
+sig_alarm_warn(int signum, siginfo_t *t, void *c)
#else
sig_alarm_warn(int signum)
#endif
{
cop_log_trace("Entering sig_alarm_warn(%d)\n", signum);
- cop_log(COP_WARNING, "unable to kill traffic_server for the last" " %d
seconds\n", kill_timeout);
+ cop_log(COP_WARNING, "unable to kill traffic_server for the last"
+ " %d seconds\n",
+ kill_timeout);
// Set us up for another alarm
alarm(kill_timeout);
@@ -359,7 +368,6 @@ set_alarm_warn()
sigaction(SIGALRM, &action, NULL);
cop_log_trace("Leaving set_alarm_warn()\n");
-
}
static void
@@ -419,7 +427,7 @@ milliseconds(void)
// Make liberal use of casting to ink_hrtime to ensure the
// compiler does not truncate our result
cop_log_trace("Leaving milliseconds()\n");
- return ((ink_hrtime) curTime.tv_sec * 1000) + ((ink_hrtime) curTime.tv_usec
/ 1000);
+ return ((ink_hrtime)curTime.tv_sec * 1000) + ((ink_hrtime)curTime.tv_usec /
1000);
}
static void
@@ -467,16 +475,16 @@ transient_error(int error, int wait_ms)
}
static void
-config_register_variable(RecT rec_type, RecDataT data_type, const char * name,
const char * value, bool /* inc_version */)
+config_register_variable(RecT rec_type, RecDataT data_type, const char *name,
const char *value, bool /* inc_version */)
{
configTable[std::string(name)] = ConfigValue(rec_type, data_type, value);
}
static void
-config_register_default(const RecordElement * record, void *)
+config_register_default(const RecordElement *record, void *)
{
if (record->type == RECT_CONFIG || record->type == RECT_LOCAL) {
- const char * value = record->value ? record->value : ""; // splooch NULL
values so std::string can swallow them
+ const char *value = record->value ? record->value : ""; // splooch NULL
values so std::string can swallow them
configTable[std::string(record->name)] = ConfigValue(record->type,
record->value_type, value);
}
}
@@ -606,7 +614,7 @@ config_reload_records()
exit(1);
}
- if (stat_buf.st_mtime <= last_mod) { // no change, no need to re-read
+ if (stat_buf.st_mtime <= last_mod) { // no change, no need to re-read
return;
} else {
last_mod = stat_buf.st_mtime;
@@ -843,7 +851,6 @@ poll_write(int fd, int timeout)
static int
open_socket(int port, const char *ip = NULL, char const *ip_to_bind = NULL)
{
-
int sock = 0;
struct addrinfo hints;
struct addrinfo *result = NULL;
@@ -871,7 +878,7 @@ open_socket(int port, const char *ip = NULL, char const
*ip_to_bind = NULL)
err = getaddrinfo(ip, port_str, &hints, &result);
if (err != 0) {
- cop_log (COP_WARNING, "(test) unable to get address info [%d %s] at ip %s,
port %s\n", err, gai_strerror(err), ip, port_str);
+ cop_log(COP_WARNING, "(test) unable to get address info [%d %s] at ip %s,
port %s\n", err, gai_strerror(err), ip, port_str);
goto getaddrinfo_error;
}
@@ -892,7 +899,7 @@ open_socket(int port, const char *ip = NULL, char const
*ip_to_bind = NULL)
err = getaddrinfo(ip_to_bind, NULL, &hints, &result_to_bind);
if (err != 0) {
- cop_log (COP_WARNING, "(test) unable to get address info [%d %s] at ip
%s\n", err, gai_strerror(err), ip_to_bind);
+ cop_log(COP_WARNING, "(test) unable to get address info [%d %s] at ip
%s\n", err, gai_strerror(err), ip_to_bind);
freeaddrinfo(result_to_bind);
goto error;
}
@@ -910,13 +917,13 @@ open_socket(int port, const char *ip = NULL, char const
*ip_to_bind = NULL)
// also set REUSEADDR so that previous cop connections in the TIME_WAIT
state
// do not interfere
if (safe_setsockopt(sock, SOL_SOCKET, SO_REUSEADDR, SOCKOPT_ON,
sizeof(int)) < 0) {
- cop_log (COP_WARNING, "(test) unable to set REUSEADDR socket option
[%d '%s']\n", errno, strerror (errno));
+ cop_log(COP_WARNING, "(test) unable to set REUSEADDR socket option [%d
'%s']\n", errno, strerror(errno));
}
}
#endif
if (safe_bind(sock, result_to_bind->ai_addr, result_to_bind->ai_addrlen) <
0) {
- cop_log (COP_WARNING, "(test) unable to bind socket [%d '%s']\n", errno,
strerror (errno));
+ cop_log(COP_WARNING, "(test) unable to bind socket [%d '%s']\n", errno,
strerror(errno));
}
freeaddrinfo(result_to_bind);
@@ -956,8 +963,8 @@ getaddrinfo_error:
}
static int
-test_port(int port, const char *request, char *buffer, int bufsize,
- int64_t test_timeout, char const *ip = NULL, char const *ip_to_bind
= NULL)
+test_port(int port, const char *request, char *buffer, int bufsize, int64_t
test_timeout, char const *ip = NULL,
+ char const *ip_to_bind = NULL)
{
int64_t start_time, timeout;
int sock;
@@ -1193,7 +1200,7 @@ test_mgmt_cli_port()
TSString val = NULL;
int ret = 0;
- if (TSRecordGetString("proxy.config.manager_binary", &val) != TS_ERR_OKAY) {
+ if (TSRecordGetString("proxy.config.manager_binary", &val) != TS_ERR_OKAY) {
cop_log(COP_WARNING, "(cli test) unable to retrieve manager_binary\n");
ret = -1;
} else {
@@ -1238,7 +1245,7 @@ test_http_port(int port, char *request, int timeout, char
const *ip = NULL, char
}
if (strncmp(p, "200", 3) != 0) {
- char pstatus[4] = { 0 };
+ char pstatus[4] = {0};
ink_strlcpy(pstatus, p, sizeof(pstatus));
cop_log(COP_WARNING, "(http test) received non-200 status(%s)\n", pstatus);
return -1;
@@ -1439,9 +1446,7 @@ check_programs()
// Spawn the manager (check for flapping manager too)
ink_hrtime now = milliseconds();
if (!manager_flapping) {
- if ((manager_flap_interval_start_time == 0) ||
- (now - manager_flap_interval_start_time > MANAGER_FLAP_INTERVAL_MSEC)
- ) {
+ if ((manager_flap_interval_start_time == 0) || (now -
manager_flap_interval_start_time > MANAGER_FLAP_INTERVAL_MSEC)) {
// either:
// . it's our first time through
// . we were flapping a while ago, but we would
@@ -1452,8 +1457,7 @@ check_programs()
}
if (manager_flap_count >= MANAGER_MAX_FLAP_COUNT) {
// we've flapped too many times, hold off for a while
- cop_log(COP_WARNING, "unable to start traffic_manager, retrying in %d
second(s)\n",
- MANAGER_FLAP_RETRY_MSEC / 1000);
+ cop_log(COP_WARNING, "unable to start traffic_manager, retrying in %d
second(s)\n", MANAGER_FLAP_RETRY_MSEC / 1000);
manager_flapping = true;
manager_flap_retry_start_time = now;
} else {
@@ -1549,9 +1553,8 @@ check_memory()
// 3: >0 low low (bad; covered by 1)
// 4: 0 0 high (okay)
// 5: 0 0 low (bad)
- if ((swapsize != 0 && swapfree < check_memory_min_swapfree_kb) ||
- (swapsize == 0 && memfree < check_memory_min_memfree_kb)) {
- cop_log(COP_WARNING, "Low memory available (swap: %dkB, mem: %dkB)\n",
(int) swapfree, (int) memfree);
+ if ((swapsize != 0 && swapfree < check_memory_min_swapfree_kb) ||
(swapsize == 0 && memfree < check_memory_min_memfree_kb)) {
+ cop_log(COP_WARNING, "Low memory available (swap: %dkB, mem: %dkB)\n",
(int)swapfree, (int)memfree);
cop_log(COP_WARNING, "Killing '%s' and '%s'\n", manager_binary,
server_binary);
manager_failures = 0;
safe_kill(manager_lockfile, manager_binary, true);
@@ -1594,7 +1597,7 @@ check_no_run()
// to taking a void* and returning a void*. The change was made
// so that we can call ink_thread_create() on this function
// in the case of running cop as a win32 service.
-static void*
+static void *
check(void *arg)
{
bool mgmt_init = false;
@@ -1615,8 +1618,7 @@ check(void *arg)
if (child_pid > 0) {
if (WIFEXITED(child_status) == 0) {
// Child terminated abnormally
- cop_log(COP_WARNING,
- "cop received non-normal child status signal [%d %d]\n",
child_pid, WEXITSTATUS(child_status));
+ cop_log(COP_WARNING, "cop received non-normal child status signal [%d
%d]\n", child_pid, WEXITSTATUS(child_status));
} else {
// normal termination
cop_log(COP_WARNING, "cop received child status signal [%d %d]\n",
child_pid, child_status);
@@ -1704,10 +1706,10 @@ init_signals()
sigaction(SIGCHLD, &action, NULL);
- // Handle a bunch of fatal signals. We simply call abort() when
- // these signals arrive in order to generate a core. There is some
- // difficulty with generating core files when linking with libthread
- // under solaris.
+// Handle a bunch of fatal signals. We simply call abort() when
+// these signals arrive in order to generate a core. There is some
+// difficulty with generating core files when linking with libthread
+// under solaris.
#if defined(solaris)
action.sa_handler = NULL;
action.sa_sigaction = sig_fatal;
@@ -1748,7 +1750,6 @@ init_signals()
static void
init_lockfiles()
{
-
cop_log_trace("Entering init_lockfiles()\n");
Layout::relative_to(cop_lockfile, sizeof(cop_lockfile), runtime_dir,
COP_LOCK);
Layout::relative_to(manager_lockfile, sizeof(manager_lockfile), runtime_dir,
MANAGER_LOCK);
@@ -1782,8 +1783,8 @@ init_config_file()
if (stat(config_file, &info) < 0) {
Layout::relative_to(config_file, sizeof(config_file), config_dir,
"records.config");
if (stat(config_file, &info) < 0) {
- cop_log(COP_FATAL, "unable to locate \"%s/records.config\" or
\"%s/records.config.shadow\"\n",
- (const char *)config_dir, (const char *)config_dir);
+ cop_log(COP_FATAL, "unable to locate \"%s/records.config\" or
\"%s/records.config.shadow\"\n", (const char *)config_dir,
+ (const char *)config_dir);
exit(1);
}
}
@@ -1809,7 +1810,7 @@ init()
runtime_dir = config_read_runtime_dir();
if (stat(runtime_dir, &info) < 0) {
- cop_log(COP_FATAL, "unable to locate local state directory
'%s'\n",runtime_dir);
+ cop_log(COP_FATAL, "unable to locate local state directory '%s'\n",
runtime_dir);
cop_log(COP_FATAL, " please try setting correct root path in either env
variable TS_ROOT \n");
exit(1);
}
@@ -1821,18 +1822,17 @@ init()
}
static const ArgumentDescription argument_descriptions[] = {
- { "debug", 'd', "Enable debug logging", "F", &debug_flag, NULL, NULL },
- { "stdout", 'o', "Print log messages to standard output", "F", &stdout_flag,
NULL, NULL },
- { "stop", 's', "Send child processes SIGSTOP instead of SIGKILL", "F",
&stop_flag, NULL, NULL },
+ {"debug", 'd', "Enable debug logging", "F", &debug_flag, NULL, NULL},
+ {"stdout", 'o', "Print log messages to standard output", "F", &stdout_flag,
NULL, NULL},
+ {"stop", 's', "Send child processes SIGSTOP instead of SIGKILL", "F",
&stop_flag, NULL, NULL},
HELP_ARGUMENT_DESCRIPTION(),
- VERSION_ARGUMENT_DESCRIPTION()
-};
+ VERSION_ARGUMENT_DESCRIPTION()};
int
main(int /* argc */, const char *argv[])
{
int fd;
- appVersionInfo.setup(PACKAGE_NAME,"traffic_cop", PACKAGE_VERSION, __DATE__,
__TIME__, BUILD_MACHINE, BUILD_PERSON, "");
+ appVersionInfo.setup(PACKAGE_NAME, "traffic_cop", PACKAGE_VERSION, __DATE__,
__TIME__, BUILD_MACHINE, BUILD_PERSON, "");
// Before accessing file system initialize Layout engine
Layout::create();
@@ -1862,13 +1862,13 @@ main(int /* argc */, const char *argv[])
int res;
res = getpwuid_r(uid, &passwdInfo, buf, bufSize, &ppasswd);
if (!res && ppasswd) {
- initgroups(ppasswd->pw_name,gid);
+ initgroups(ppasswd->pw_name, gid);
}
}
- setsid(); // Important, thanks Vlad. :)
+ setsid(); // Important, thanks Vlad. :)
#if (defined(freebsd) && !defined(kfreebsd)) || defined(openbsd)
- setpgrp(0,0);
+ setpgrp(0, 0);
#else
setpgrp();
#endif
@@ -1901,4 +1901,3 @@ main(int /* argc */, const char *argv[])
return 0;
}
-