trafficserver git commit: HostDB HTTP UI: Fix merge issue. This closes #240
Repository: trafficserver Updated Branches: refs/heads/master 94f4083d0 -> 3c2f63faf HostDB HTTP UI: Fix merge issue. This closes #240 Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/3c2f63fa Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/3c2f63fa Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/3c2f63fa Branch: refs/heads/master Commit: 3c2f63faf03b7a2ddd7a73542944e9c21caf2227 Parents: 94f4083 Author: Brian Geffon Authored: Wed Jul 15 00:29:55 2015 -0700 Committer: Brian Geffon Committed: Wed Jul 15 00:29:55 2015 -0700 -- iocore/hostdb/HostDB.cc | 86 -- iocore/hostdb/I_HostDBProcessor.h | 2 +- iocore/hostdb/P_HostDBProcessor.h | 3 +- 3 files changed, 3 insertions(+), 88 deletions(-) -- http://git-wip-us.apache.org/repos/asf/trafficserver/blob/3c2f63fa/iocore/hostdb/HostDB.cc -- diff --git a/iocore/hostdb/HostDB.cc b/iocore/hostdb/HostDB.cc index 6abb7b0..0919b00 100644 --- a/iocore/hostdb/HostDB.cc +++ b/iocore/hostdb/HostDB.cc @@ -1039,15 +1039,6 @@ HostDBProcessor::getbyname_imm(Continuation *cont, process_hostdb_info_pfn proce } Action * -HostDBProcessor::getall(Continuation *cont) -{ - ink_assert(cont->mutex->thread_holding == this_ethread()); - EThread *thread = cont->mutex->thread_holding; - ProxyMutex *mutex = thread->mutex; - - HOSTDB_INCREMENT_DYN_STAT(hostdb_total_lookups_stat); - -Action * HostDBProcessor::iterate(Continuation *cont) { ink_assert(cont->mutex->thread_holding == this_ethread()); @@ -1076,24 +1067,6 @@ HostDBProcessor::iterate(Continuation *cont) return &c->action; } - HostDBContinuation *c = hostDBContAllocator.alloc(); - HostDBContinuation::Options copt; - copt.cont = cont; - copt.force_dns = false; - copt.timeout = 0; - copt.host_res_style = HOST_RES_NONE; - c->init(HostDBMD5(), copt); - SET_CONTINUATION_HANDLER(c, (HostDBContHandler)&HostDBContinuation::probeAllEvent); - - if (thread->mutex == cont->mutex) { -thread->schedule_in(c, HOST_DB_RETRY_PERIOD); - } else { -dnsProcessor.thread->schedule_imm(c); - } - - return &c->action; -} - static void do_setby(HostDBInfo *r, HostDBApplicationInfo *app, const char *hostname, IpAddr const &ip, bool is_srv = false) { @@ -1916,40 +1889,6 @@ HostDBContinuation::do_put_response(ClusterMachine *m, HostDBInfo *r, Continuati clusterProcessor.invoke_remote(m->pop_ClusterHandler(), PUT_HOSTINFO_CLUSTER_FUNCTION, (char *)&msg, len); } -int -HostDBContinuation::probeAllEvent(int event, Event *e) -{ - Debug("hostdb", "probeAllEvent event=%d eventp=%p", event, e); - ink_assert(!link.prev && !link.next); - EThread *t = e ? e->ethread : this_ethread(); - - MUTEX_TRY_LOCK_FOR(lock, action.mutex, t, action.continuation); - if (!lock.is_locked()) { -mutex->thread_holding->schedule_in(this, HOST_DB_RETRY_PERIOD); -return EVENT_CONT; - } - - if (action.cancelled) { -hostdb_cont_free(this); -return EVENT_DONE; - } - - for (int i = 0; i < hostDB.buckets; ++i) { - ProxyMutex *bucket_mutex = hostDB.lock_for_bucket(i); - SCOPED_MUTEX_LOCK(lock, bucket_mutex, t); - for (unsigned int l = 0; l < hostDB.levels; ++l) { - HostDBInfo *r = reinterpret_cast(hostDB.data + hostDB.level_offset[l] + hostDB.bucketsize[l] * i); - if (!r->deleted && !r->failed()) { - action.continuation->handleEvent(EVENT_INTERVAL, static_cast(r)); - } - } - } - - action.continuation->handleEvent(EVENT_DONE, NULL); - hostdb_cont_free(this); - return EVENT_DONE; -} - // // Probe state // @@ -2479,31 +2418,6 @@ struct ShowHostDB : public ShowCont { CHECK_SHOW(begin("HostDB All Records")); CHECK_SHOW(show("")); SET_HANDLER(&ShowHostDB::showAllEvent); -hostDBProcessor.getall(this); -return EVENT_CONT; - } - - int - showAllEvent(int event, Event *e) - { -HostDBInfo *r = (HostDBInfo *)e; -if (event == EVENT_INTERVAL) { - HostDBInfo *r = reinterpret_cast(e); - return showOne(r,false,event,e); -} else if (event == EVENT_DONE) { - return complete(event, e); -} else { - ink_assert(!"unexpected event"); -} -return EVENT_CONT; - } - - int - showAll(int event , Event *e) - { -CHECK_SHOW(begin("HostDB All Records")); -CHECK_SHOW(show("")); -SET_HANDLER(&ShowHostDB::showAllEvent); hostDBProcessor.iterate(this); return EVENT_CONT; } http://git-wip-us.apache.org/repos/asf/trafficserver/blob/3c2f63fa/iocore/hostdb/I_HostDBProcessor.h -- diff --git a/iocore/hostdb/I_HostDBProcessor.h b/iocore/hostdb/I_HostDBProcessor.h index 37719f6..f5acf
trafficserver git commit: HostDB HTTP UI: Fix merge issue. This closes #240
Repository: trafficserver Updated Branches: refs/heads/master 3c2f63faf -> 5a5311bca HostDB HTTP UI: Fix merge issue. This closes #240 Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/5a5311bc Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/5a5311bc Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/5a5311bc Branch: refs/heads/master Commit: 5a5311bca4f9acaab2a2a286fe635047bf5ae746 Parents: 3c2f63f Author: Brian Geffon Authored: Wed Jul 15 00:33:06 2015 -0700 Committer: Brian Geffon Committed: Wed Jul 15 00:33:06 2015 -0700 -- iocore/hostdb/HostDB.cc | 1 - 1 file changed, 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/trafficserver/blob/5a5311bc/iocore/hostdb/HostDB.cc -- diff --git a/iocore/hostdb/HostDB.cc b/iocore/hostdb/HostDB.cc index 0919b00..df302d7 100644 --- a/iocore/hostdb/HostDB.cc +++ b/iocore/hostdb/HostDB.cc @@ -2425,7 +2425,6 @@ struct ShowHostDB : public ShowCont { int showAllEvent(int event, Event *e) { -HostDBInfo *r = (HostDBInfo *)e; if (event == EVENT_INTERVAL) { HostDBInfo *r = reinterpret_cast(e); return showOne(r,false,event,e);
trafficserver git commit: TS-3769: Fix coverity complaint about NULL reference.
Repository: trafficserver Updated Branches: refs/heads/master 5a5311bca -> 1d81a2d79 TS-3769: Fix coverity complaint about NULL reference. Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/1d81a2d7 Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/1d81a2d7 Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/1d81a2d7 Branch: refs/heads/master Commit: 1d81a2d79a4b21c3d7850e3acde40fd612bc6f38 Parents: 5a5311b Author: Alan M. Carroll Authored: Wed Jul 15 13:53:42 2015 -0500 Committer: Alan M. Carroll Committed: Wed Jul 15 13:53:42 2015 -0500 -- proxy/http/HttpTransact.cc | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/trafficserver/blob/1d81a2d7/proxy/http/HttpTransact.cc -- diff --git a/proxy/http/HttpTransact.cc b/proxy/http/HttpTransact.cc index d164c1a..fcd0666 100644 --- a/proxy/http/HttpTransact.cc +++ b/proxy/http/HttpTransact.cc @@ -1592,9 +1592,10 @@ HttpTransact::ReDNSRoundRobin(State *s) // Our ReDNS of the server succeeded so update the necessary // information and try again. Need to preserve the current port value if possible. -in_port_t server_port = s->current.server ? s->current.server->dst_addr.host_order_port() : s->server_info.dst_addr.isValid() ? - s->server_info.dst_addr.host_order_port() : - s->hdr_info.client_request.port_get(); +in_port_t server_port = s->current.server->dst_addr.host_order_port(); +// Temporary check to make sure the port preservation can be depended upon. That should be the case +// because we get here only after trying a connection. Remove for 6.2. +ink_assert(s->current.server->dst_addr.isValid() && 0 != server_port); ats_ip_copy(&s->server_info.dst_addr, s->host_db_info.ip()); s->server_info.dst_addr.port() = htons(server_port);
trafficserver git commit: TS-3754: Fix potential bad _buf_end in IOBuffer::set
Repository: trafficserver Updated Branches: refs/heads/master 1d81a2d79 -> 26f983de3 TS-3754: Fix potential bad _buf_end in IOBuffer::set Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/26f983de Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/26f983de Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/26f983de Branch: refs/heads/master Commit: 26f983de36291e0afc7d42bc8a1ec1cf9e8473c1 Parents: 1d81a2d Author: Alan M. Carroll Authored: Wed Jul 15 17:54:29 2015 -0500 Committer: Alan M. Carroll Committed: Wed Jul 15 17:54:29 2015 -0500 -- iocore/eventsystem/P_IOBuffer.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/trafficserver/blob/26f983de/iocore/eventsystem/P_IOBuffer.h -- diff --git a/iocore/eventsystem/P_IOBuffer.h b/iocore/eventsystem/P_IOBuffer.h index 3b8c323..4a64972 100644 --- a/iocore/eventsystem/P_IOBuffer.h +++ b/iocore/eventsystem/P_IOBuffer.h @@ -477,7 +477,7 @@ IOBufferBlock::set(IOBufferData *d, int64_t len, int64_t offset) data = d; _start = buf() + offset; _end = _start + len; - _buf_end = _start + d->block_size(); + _buf_end = buf() + d->block_size(); } TS_INLINE void