You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by zw...@apache.org on 2013/04/24 21:56:06 UTC
[3/3] git commit: TS-1794 Replace all usage of ts_debug_assert() with
ts_assert()
TS-1794 Replace all usage of ts_debug_assert() with ts_assert()
Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/dc6e42c6
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/dc6e42c6
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/dc6e42c6
Branch: refs/heads/master
Commit: dc6e42c63d553c58689df4d50a4de4657dba8660
Parents: 96627f0
Author: Leif Hedstrom <zw...@apache.org>
Authored: Mon Apr 1 15:05:07 2013 -0600
Committer: Leif Hedstrom <zw...@apache.org>
Committed: Wed Apr 24 13:55:16 2013 -0600
----------------------------------------------------------------------
CHANGES | 2 +
iocore/aio/AIO.cc | 12 +-
iocore/cache/Cache.cc | 20 ++--
iocore/cache/CacheDir.cc | 32 +++---
iocore/cache/CacheLink.cc | 2 +-
iocore/cache/CacheRead.cc | 10 +-
iocore/cache/CacheVol.cc | 10 +-
iocore/cache/CacheWrite.cc | 31 +++---
iocore/cache/P_CacheDir.h | 2 +-
iocore/cache/P_CacheInternal.h | 8 +-
iocore/cache/P_CacheVol.h | 2 +-
iocore/cluster/ClusterAPI.cc | 2 +-
iocore/dns/DNS.cc | 2 +-
iocore/eventsystem/I_Lock.h | 8 +-
iocore/eventsystem/I_VConnection.h | 8 +-
iocore/eventsystem/P_IOBuffer.h | 14 +-
iocore/eventsystem/P_UnixEThread.h | 2 +-
iocore/eventsystem/ProtectedQueue.cc | 2 +-
iocore/eventsystem/UnixEvent.cc | 8 +-
iocore/hostdb/HostDB.cc | 22 ++--
iocore/hostdb/I_HostDBProcessor.h | 2 +-
iocore/hostdb/P_HostDBProcessor.h | 2 +-
iocore/net/NetTest-http-server.c | 2 +-
iocore/net/P_UnixNetVConnection.h | 8 +-
iocore/net/P_UnixUDPConnection.h | 2 +-
iocore/net/SSLNetVConnection.cc | 8 +-
iocore/net/SSLUtils.cc | 4 +-
iocore/net/Socks.cc | 18 ++--
iocore/net/UnixNetAccept.cc | 4 +-
iocore/net/UnixNetProcessor.cc | 4 +-
iocore/net/UnixNetVConnection.cc | 56 ++++----
iocore/net/UnixUDPConnection.cc | 10 +-
iocore/net/UnixUDPNet.cc | 2 +-
lib/records/I_RecProcess.h | 2 +-
lib/records/P_RecCore.cc | 16 ++--
lib/records/RecCore.cc | 26 ++--
lib/records/RecLocal.cc | 2 +-
lib/records/RecMessage.cc | 4 +-
lib/records/RecProcess.cc | 6 +-
lib/records/RecUtils.cc | 6 +-
lib/records/test_RecProcess.i | 4 +-
lib/ts/Regression.cc | 2 +-
lib/ts/Trie.h | 2 +-
lib/ts/ink_assert.h | 6 +-
lib/ts/ink_hrtime.cc | 4 +-
mgmt/LocalManager.cc | 2 +-
mgmt/RecordsConfig.cc | 4 +-
mgmt/api/INKMgmtAPI.cc | 4 +-
mgmt/cluster/ClusterCom.cc | 6 +-
mgmt/stats/StatProcessor.cc | 4 +-
mgmt/stats/StatType.cc | 18 ++--
mgmt/web2/WebOverview.cc | 10 +-
proxy/InkAPI.cc | 2 +-
proxy/MuxVC.cc | 184 ++++++++++++++--------------
proxy/PluginVC.cc | 10 +-
proxy/Prefetch.cc | 8 +-
proxy/Update.cc | 2 +-
proxy/hdrs/HTTP.cc | 30 +++---
proxy/hdrs/HTTP.h | 84 +++++++-------
proxy/hdrs/HdrHeap.h | 2 +-
proxy/hdrs/HdrTSOnly.cc | 8 +-
proxy/hdrs/HdrToken.cc | 6 +-
proxy/hdrs/HdrToken.h | 28 ++--
proxy/hdrs/HdrUtils.cc | 2 +-
proxy/hdrs/MIME.cc | 72 ++++++------
proxy/hdrs/URL.cc | 6 +-
proxy/hdrs/URL.h | 74 ++++++------
proxy/http/HttpClientSession.cc | 2 +-
proxy/http/HttpSM.cc | 44 ++++----
proxy/http/HttpServerSession.h | 4 +-
proxy/http/HttpTransact.cc | 174 +++++++++++++-------------
proxy/http/HttpTransact.h | 2 +-
proxy/http/HttpTransactCache.cc | 18 ++--
proxy/http/HttpTransactHeaders.cc | 28 ++--
proxy/http/HttpTransactHeaders.h | 2 +-
proxy/http/HttpTunnel.cc | 4 +-
proxy/http/remap/RemapPlugins.cc | 4 +-
proxy/http/remap/RemapProcessor.cc | 4 +-
proxy/logging/Log.cc | 4 +-
proxy/logging/LogAccess.cc | 26 ++--
proxy/logging/LogBuffer.cc | 4 +-
proxy/logging/LogBuffer.h | 6 +-
proxy/logging/LogCollationClientSM.cc | 2 +-
proxy/logging/LogConfig.cc | 4 +-
proxy/logging/LogField.cc | 2 +-
proxy/logging/LogFile.cc | 16 ++--
proxy/logging/LogFilter.cc | 2 +-
proxy/logging/LogObject.cc | 16 ++--
88 files changed, 666 insertions(+), 669 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/dc6e42c6/CHANGES
----------------------------------------------------------------------
diff --git a/CHANGES b/CHANGES
index b347f59..e8de315 100644
--- a/CHANGES
+++ b/CHANGES
@@ -2,6 +2,8 @@
Changes with Apache Traffic Server 3.3.3
+ *) [TS-1794 Replace all usage of ts_debug_assert() with ts_assert().
+
*) [TS-1834] Force absolute paths to fix logstats unit tests.
*) [TS-1817] Use the libaio interface to the Linux AIO system calls.
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/dc6e42c6/iocore/aio/AIO.cc
----------------------------------------------------------------------
diff --git a/iocore/aio/AIO.cc b/iocore/aio/AIO.cc
index 769ade6..7ddcac7 100644
--- a/iocore/aio/AIO.cc
+++ b/iocore/aio/AIO.cc
@@ -429,7 +429,7 @@ ink_aio_read(AIOCallback *op, int fromAPI)
op->aiocb.aio_lio_opcode = LIO_READ;
#if (AIO_MODE == AIO_MODE_AIO)
- ink_debug_assert(this_ethread() == op->thread);
+ ink_assert(this_ethread() == op->thread);
op->thread->aio_ops.enqueue(op);
if (aio_read(&op->aiocb) < 0) {
Warning("failed aio_read: %s\n", strerror(errno));
@@ -452,7 +452,7 @@ ink_aio_write(AIOCallback *op, int fromAPI)
op->aiocb.aio_lio_opcode = LIO_WRITE;
#if (AIO_MODE == AIO_MODE_AIO)
- ink_debug_assert(this_ethread() == op->thread);
+ ink_assert(this_ethread() == op->thread);
op->thread->aio_ops.enqueue(op);
if (aio_write(&op->aiocb) < 0) {
Warning("failed aio_write: %s\n", strerror(errno));
@@ -572,7 +572,7 @@ Lagain:
int num = 0;
for (; num < MAX_AIO_EVENTS && ((op = ready_list.dequeue()) != NULL); ++num) {
cbs[num] = &op->aiocb;
- ink_debug_assert(op->action.continuation);
+ ink_assert(op->action.continuation);
}
if (num > 0) {
int ret;
@@ -585,7 +585,7 @@ Lagain:
perror("io_submit error");
else {
fprintf(stderr, "could not sumbit IOs");
- ink_debug_assert(0);
+ ink_assert(0);
}
}
}
@@ -632,7 +632,7 @@ ink_aio_readv(AIOCallback *op, int fromAPI) {
}
if (sz > 1) {
- ink_debug_assert(op->action.continuation);
+ ink_assert(op->action.continuation);
AIOVec *vec = new AIOVec(sz, op->action.continuation);
vec->action = op->action.continuation;
while (--sz >= 0) {
@@ -659,7 +659,7 @@ ink_aio_writev(AIOCallback *op, int fromAPI) {
}
if (sz > 1) {
- ink_debug_assert(op->action.continuation);
+ ink_assert(op->action.continuation);
AIOVec *vec = new AIOVec(sz, op->action.continuation);
vec->action = op->action.continuation;
while (--sz >= 0) {
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/dc6e42c6/iocore/cache/Cache.cc
----------------------------------------------------------------------
diff --git a/iocore/cache/Cache.cc b/iocore/cache/Cache.cc
index 3971cb1..cf13826 100644
--- a/iocore/cache/Cache.cc
+++ b/iocore/cache/Cache.cc
@@ -302,7 +302,7 @@ CacheVC::CacheVC():alternate_index(CACHE_ALT_INDEX_DEFAULT)
HTTPInfo::FragOffset*
CacheVC::get_frag_table()
{
- ink_debug_assert(alternate.valid());
+ ink_assert(alternate.valid());
return alternate.valid() ? alternate.get_frag_table() : 0;
}
@@ -363,7 +363,7 @@ CacheVC::do_io_write(Continuation *c, int64_t nbytes, IOBufferReader *abuf, bool
void
CacheVC::do_io_close(int alerrno)
{
- ink_debug_assert(mutex->thread_holding == this_ethread());
+ ink_assert(mutex->thread_holding == this_ethread());
int previous_closed = closed;
closed = (alerrno == -1) ? 1 : -1; // Stupid default arguments
DDebug("cache_close", "do_io_close %p %d %d", this, alerrno, closed);
@@ -435,7 +435,7 @@ bool CacheVC::set_data(int i, void *data)
{
(void) i;
(void) data;
- ink_debug_assert(!"CacheVC::set_data should not be called!");
+ ink_assert(!"CacheVC::set_data should not be called!");
return true;
}
@@ -510,8 +510,8 @@ CacheVC::get_disk_io_priority()
int
Vol::begin_read(CacheVC *cont)
{
- ink_debug_assert(cont->mutex->thread_holding == this_ethread());
- ink_debug_assert(mutex->thread_holding == this_ethread());
+ ink_assert(cont->mutex->thread_holding == this_ethread());
+ ink_assert(mutex->thread_holding == this_ethread());
#ifdef CACHE_STAT_PAGES
ink_assert(!cont->stat_link.next && !cont->stat_link.prev);
stat_cache_vcs.enqueue(cont, cont->stat_link);
@@ -543,8 +543,8 @@ int
Vol::close_read(CacheVC *cont)
{
EThread *t = cont->mutex->thread_holding;
- ink_debug_assert(t == this_ethread());
- ink_debug_assert(t == mutex->thread_holding);
+ ink_assert(t == this_ethread());
+ ink_assert(t == mutex->thread_holding);
if (dir_is_empty(&cont->earliest_dir))
return 1;
int i = dir_evac_bucket(&cont->earliest_dir);
@@ -1950,7 +1950,7 @@ int
CacheVC::handleReadDone(int event, Event *e) {
NOWARN_UNUSED(e);
cancel_trigger();
- ink_debug_assert(this_ethread() == mutex->thread_holding);
+ ink_assert(this_ethread() == mutex->thread_holding);
if (event == AIO_EVENT_DONE)
set_io_not_in_progress();
@@ -2069,7 +2069,7 @@ CacheVC::handleRead(int event, Event *e)
f.doc_from_ram_cache = false;
// check ram cache
- ink_debug_assert(vol->mutex->thread_holding == this_ethread());
+ ink_assert(vol->mutex->thread_holding == this_ethread());
int64_t o = dir_offset(&dir);
if (vol->ram_cache->get(read_key, &buf, (uint32_t)(o >> 32), (uint32_t)o))
goto LramHit;
@@ -2231,7 +2231,7 @@ CacheVC::removeEvent(int event, Event *e)
if (od)
vol->close_write(this);
}
- ink_debug_assert(!vol || this_ethread() != vol->mutex->thread_holding);
+ ink_assert(!vol || this_ethread() != vol->mutex->thread_holding);
_action.continuation->handleEvent(CACHE_EVENT_REMOVE_FAILED, (void *) -ECACHE_NO_DOC);
goto Lfree;
Lremoved:
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/dc6e42c6/iocore/cache/CacheDir.cc
----------------------------------------------------------------------
diff --git a/iocore/cache/CacheDir.cc b/iocore/cache/CacheDir.cc
index 1dc75c6..ca23f9f 100644
--- a/iocore/cache/CacheDir.cc
+++ b/iocore/cache/CacheDir.cc
@@ -68,7 +68,7 @@ OpenDir::OpenDir()
int
OpenDir::open_write(CacheVC *cont, int allow_if_writers, int max_writers)
{
- ink_debug_assert(cont->vol->mutex->thread_holding == this_ethread());
+ ink_assert(cont->vol->mutex->thread_holding == this_ethread());
unsigned int h = cont->first_key.word(0);
int b = h % OPEN_DIR_BUCKETS;
for (OpenDirEntry *d = bucket[b].head; d; d = d->link.next) {
@@ -132,7 +132,7 @@ OpenDir::signal_readers(int event, Event *e)
int
OpenDir::close_write(CacheVC *cont)
{
- ink_debug_assert(cont->vol->mutex->thread_holding == this_ethread());
+ ink_assert(cont->vol->mutex->thread_holding == this_ethread());
cont->od->writers.remove(cont);
cont->od->num_writers--;
if (!cont->od->writers.head) {
@@ -162,7 +162,7 @@ OpenDir::open_read(INK_MD5 *key)
int
OpenDirEntry::wait(CacheVC *cont, int msec)
{
- ink_debug_assert(cont->vol->mutex->thread_holding == this_ethread());
+ ink_assert(cont->vol->mutex->thread_holding == this_ethread());
cont->f.open_read_timeout = 1;
ink_assert(!cont->trigger);
cont->trigger = cont->vol->mutex->thread_holding->schedule_in_local(cont, HRTIME_MSECONDS(msec));
@@ -501,7 +501,7 @@ dir_free_entry(Dir *e, int s, Vol *d)
int
dir_probe(CacheKey *key, Vol *d, Dir *result, Dir ** last_collision)
{
- ink_debug_assert(d->mutex->thread_holding == this_ethread());
+ ink_assert(d->mutex->thread_holding == this_ethread());
int s = key->word(0) % d->segments;
int b = key->word(1) % d->buckets;
Dir *seg = dir_segment(s, d);
@@ -517,7 +517,7 @@ Lagain:
if (dir_offset(e))
do {
if (dir_compare_tag(e, key)) {
- ink_debug_assert(dir_offset(e));
+ ink_assert(dir_offset(e));
// Bug: 51680. Need to check collision before checking
// dir_valid(). In case of a collision, if !dir_valid(), we
// don't want to call dir_delete_entry.
@@ -565,7 +565,7 @@ Lagain:
int
dir_insert(CacheKey *key, Vol *d, Dir *to_part)
{
- ink_debug_assert(d->mutex->thread_holding == this_ethread());
+ ink_assert(d->mutex->thread_holding == this_ethread());
int s = key->word(0) % d->segments, l;
int bi = key->word(1) % d->buckets;
ink_assert(dir_approx_size(to_part) <= MAX_FRAG_SIZE + sizeofDoc);
@@ -618,7 +618,7 @@ Lfill:
int
dir_overwrite(CacheKey *key, Vol *d, Dir *dir, Dir *overwrite, bool must_overwrite)
{
- ink_debug_assert(d->mutex->thread_holding == this_ethread());
+ ink_assert(d->mutex->thread_holding == this_ethread());
int s = key->word(0) % d->segments, l;
int bi = key->word(1) % d->buckets;
Dir *seg = dir_segment(s, d);
@@ -691,7 +691,7 @@ Lfill:
int
dir_delete(CacheKey *key, Vol *d, Dir *del)
{
- ink_debug_assert(d->mutex->thread_holding == this_ethread());
+ ink_assert(d->mutex->thread_holding == this_ethread());
int s = key->word(0) % d->segments;
int b = key->word(1) % d->buckets;
Dir *seg = dir_segment(s, d);
@@ -730,7 +730,7 @@ dir_delete(CacheKey *key, Vol *d, Dir *del)
int
dir_lookaside_probe(CacheKey *key, Vol *d, Dir *result, EvacuationBlock ** eblock)
{
- ink_debug_assert(d->mutex->thread_holding == this_ethread());
+ ink_assert(d->mutex->thread_holding == this_ethread());
int i = key->word(3) % LOOKASIDE_SIZE;
EvacuationBlock *b = d->lookaside[i].head;
while (b) {
@@ -754,7 +754,7 @@ dir_lookaside_insert(EvacuationBlock *eblock, Vol *d, Dir *to)
{
CacheKey *key = &eblock->evac_frags.earliest_key;
DDebug("dir_lookaside", "insert %X %X, offset %d phase %d", key->word(0), key->word(1), (int) dir_offset(to), (int) dir_phase(to));
- ink_debug_assert(d->mutex->thread_holding == this_ethread());
+ ink_assert(d->mutex->thread_holding == this_ethread());
int i = key->word(3) % LOOKASIDE_SIZE;
EvacuationBlock *b = new_EvacuationBlock(d->mutex->thread_holding);
b->evac_frags.key = *key;
@@ -770,7 +770,7 @@ dir_lookaside_insert(EvacuationBlock *eblock, Vol *d, Dir *to)
int
dir_lookaside_fixup(CacheKey *key, Vol *d)
{
- ink_debug_assert(d->mutex->thread_holding == this_ethread());
+ ink_assert(d->mutex->thread_holding == this_ethread());
int i = key->word(3) % LOOKASIDE_SIZE;
EvacuationBlock *b = d->lookaside[i].head;
while (b) {
@@ -793,7 +793,7 @@ dir_lookaside_fixup(CacheKey *key, Vol *d)
void
dir_lookaside_cleanup(Vol *d)
{
- ink_debug_assert(d->mutex->thread_holding == this_ethread());
+ ink_assert(d->mutex->thread_holding == this_ethread());
for (int i = 0; i < LOOKASIDE_SIZE; i++) {
EvacuationBlock *b = d->lookaside[i].head;
while (b) {
@@ -816,7 +816,7 @@ dir_lookaside_cleanup(Vol *d)
void
dir_lookaside_remove(CacheKey *key, Vol *d)
{
- ink_debug_assert(d->mutex->thread_holding == this_ethread());
+ ink_assert(d->mutex->thread_holding == this_ethread());
int i = key->word(3) % LOOKASIDE_SIZE;
EvacuationBlock *b = d->lookaside[i].head;
while (b) {
@@ -929,12 +929,12 @@ sync_cache_dir_on_shutdown(void)
int r = pwrite(d->fd, d->agg_buffer, d->agg_buf_pos,
d->header->write_pos);
if (r != d->agg_buf_pos) {
- ink_debug_assert(!"flusing agg buffer failed");
+ ink_assert(!"flusing agg buffer failed");
continue;
}
d->header->last_write_pos = d->header->write_pos;
d->header->write_pos += d->agg_buf_pos;
- ink_debug_assert(d->header->write_pos == d->header->agg_pos);
+ ink_assert(d->header->write_pos == d->header->agg_pos);
d->agg_buf_pos = 0;
d->header->write_serial++;
}
@@ -957,7 +957,7 @@ sync_cache_dir_on_shutdown(void)
size_t B = d->header->sync_serial & 1;
off_t start = d->skip + (B ? dirlen : 0);
B = pwrite(d->fd, buf, dirlen, start);
- ink_debug_assert(B == dirlen);
+ ink_assert(B == dirlen);
Debug("cache_dir_sync", "done syncing dir for vol %s", d->hash_id);
}
Debug("cache_dir_sync", "sync done");
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/dc6e42c6/iocore/cache/CacheLink.cc
----------------------------------------------------------------------
diff --git a/iocore/cache/CacheLink.cc b/iocore/cache/CacheLink.cc
index b36df91..37c6c8c 100644
--- a/iocore/cache/CacheLink.cc
+++ b/iocore/cache/CacheLink.cc
@@ -144,7 +144,7 @@ CacheVC::derefRead(int event, Event * e)
if (!(doc->first_key == key))
goto Lcollision;
#ifdef DEBUG
- ink_debug_assert(!memcmp(doc->data(), &doc->key, sizeof(doc->key)));
+ ink_assert(!memcmp(doc->data(), &doc->key, sizeof(doc->key)));
#endif
_action.continuation->handleEvent(CACHE_EVENT_DEREF, (void *) &doc->key);
return free_CacheVC(this);
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/dc6e42c6/iocore/cache/CacheRead.cc
----------------------------------------------------------------------
diff --git a/iocore/cache/CacheRead.cc b/iocore/cache/CacheRead.cc
index 1faab20..534e51d 100644
--- a/iocore/cache/CacheRead.cc
+++ b/iocore/cache/CacheRead.cc
@@ -178,7 +178,7 @@ CacheVC::openReadChooseWriter(int event, Event * e)
intptr_t err = ECACHE_DOC_BUSY;
CacheVC *w = NULL;
- ink_debug_assert(vol->mutex->thread_holding == mutex->thread_holding && write_vc == NULL);
+ ink_assert(vol->mutex->thread_holding == mutex->thread_holding && write_vc == NULL);
if (!od)
return EVENT_RETURN;
@@ -213,7 +213,7 @@ CacheVC::openReadChooseWriter(int event, Event * e)
if (!w->closed && !w->alternate.valid()) {
od = NULL;
- ink_debug_assert(!write_vc);
+ ink_assert(!write_vc);
vector.clear(false);
return EVENT_CONT;
}
@@ -310,7 +310,7 @@ CacheVC::openReadFromWriter(int event, Event * e)
SET_HANDLER(&CacheVC::openReadStartHead);
return openReadStartHead(event, e);
} else
- ink_debug_assert(od == vol->open_read(&first_key));
+ ink_assert(od == vol->open_read(&first_key));
if (!write_vc) {
int ret = openReadChooseWriter(event, e);
if (ret < 0) {
@@ -322,7 +322,7 @@ CacheVC::openReadFromWriter(int event, Event * e)
SET_HANDLER(&CacheVC::openReadStartHead);
return openReadStartHead(event, e);
} else if (ret == EVENT_CONT) {
- ink_debug_assert(!write_vc);
+ ink_assert(!write_vc);
VC_SCHED_WRITER_RETRY();
} else
ink_assert(write_vc);
@@ -638,7 +638,7 @@ CacheVC::openReadMain(int event, Event * e)
int target = 0;
HTTPInfo::FragOffset next_off = frags[target];
int lfi = static_cast<int>(alternate.get_frag_offset_count()) - 1;
- ink_debug_assert(lfi >= 0); // because it's not a single frag doc.
+ ink_assert(lfi >= 0); // because it's not a single frag doc.
/* Note: frag[i].offset is the offset of the first byte past the
i'th fragment. So frag[0].offset is the offset of the first
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/dc6e42c6/iocore/cache/CacheVol.cc
----------------------------------------------------------------------
diff --git a/iocore/cache/CacheVol.cc b/iocore/cache/CacheVol.cc
index ccd2009..854948b 100644
--- a/iocore/cache/CacheVol.cc
+++ b/iocore/cache/CacheVol.cc
@@ -289,7 +289,7 @@ CacheVC::scanObject(int event, Event * e)
i = 0;
break;
case CACHE_SCAN_RESULT_UPDATE:
- ink_debug_assert(alternate_index >= 0);
+ ink_assert(alternate_index >= 0);
vector.insert(&alternate, alternate_index);
if (!vector.get(alternate_index)->valid())
continue;
@@ -304,7 +304,7 @@ CacheVC::scanObject(int event, Event * e)
}
if (changed) {
if (!vector.count()) {
- ink_debug_assert(hostinfo_copied);
+ ink_assert(hostinfo_copied);
SET_HANDLER(&CacheVC::scanRemoveDone);
// force remove even if there is a writer
cacheProcessor.remove(this, &doc->first_key, true, CACHE_FRAG_TYPE_HTTP, true, false, (char *) hname, hlen);
@@ -428,7 +428,7 @@ CacheVC::scanOpenWrite(int event, Event * e)
return EVENT_CONT;
}
- ink_debug_assert(this->od);
+ ink_assert(this->od);
// put all the alternates in the open directory vector
int alt_count = vector.count();
for (int i = 0; i < alt_count; i++) {
@@ -496,8 +496,8 @@ CacheVC::scanUpdateDone(int event, Event * e)
if (od->move_resident_alt) {
dir_insert(&od->single_doc_key, vol, &od->single_doc_dir);
}
- ink_debug_assert(vol->open_read(&first_key));
- ink_debug_assert(this->od);
+ ink_assert(vol->open_read(&first_key));
+ ink_assert(this->od);
vol->close_write(this);
SET_HANDLER(&CacheVC::scanObject);
return handleEvent(EVENT_IMMEDIATE, 0);
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/dc6e42c6/iocore/cache/CacheWrite.cc
----------------------------------------------------------------------
diff --git a/iocore/cache/CacheWrite.cc b/iocore/cache/CacheWrite.cc
index 6d835e1..c614177 100644
--- a/iocore/cache/CacheWrite.cc
+++ b/iocore/cache/CacheWrite.cc
@@ -383,7 +383,7 @@ int
CacheVC::evacuateReadHead(int /* event ATS_UNUSED */, Event * /* e ATS_UNUSED */)
{
// The evacuator vc shares the lock with the volition mutex
- ink_debug_assert(vol->mutex->thread_holding == this_ethread());
+ ink_assert(vol->mutex->thread_holding == this_ethread());
cancel_trigger();
Doc *doc = (Doc *) buf->data();
#ifdef HTTP_CACHE
@@ -447,7 +447,7 @@ Ldone:
int
CacheVC::evacuateDocDone(int /* event ATS_UNUSED */, Event */* e ATS_UNUSED */)
{
- ink_debug_assert(vol->mutex->thread_holding == this_ethread());
+ ink_assert(vol->mutex->thread_holding == this_ethread());
Doc *doc = (Doc *) buf->data();
DDebug("cache_evac", "evacuateDocDone %X o %d p %d new_o %d new_p %d",
(int) key.word(0), (int) dir_offset(&overwrite_dir),
@@ -516,7 +516,7 @@ CacheVC::evacuateDocDone(int /* event ATS_UNUSED */, Event */* e ATS_UNUSED */)
}
} else {
DDebug("cache_evac", "evacuating earliest: %X %d", (int) doc->key.word(0), (int) dir_offset(&overwrite_dir));
- ink_debug_assert(dir_compare_tag(&overwrite_dir, &doc->key));
+ ink_assert(dir_compare_tag(&overwrite_dir, &doc->key));
ink_assert(b->earliest_evacuator == this);
total_len += doc->data_len();
first_key = doc->first_key;
@@ -599,7 +599,7 @@ Vol::evacuateDocReadDone(int event, Event *e)
return EVENT_DONE;
ink_assert(is_io_in_progress());
set_io_not_in_progress();
- ink_debug_assert(mutex->thread_holding == this_ethread());
+ ink_assert(mutex->thread_holding == this_ethread());
Doc *doc = (Doc *) doc_evacuator->buf->data();
CacheKey next_key;
EvacuationBlock *b = NULL;
@@ -733,7 +733,7 @@ agg_copy(char *p, CacheVC *vc)
uint32_t len = vc->write_len + vc->header_len + vc->frag_len + sizeofDoc;
ink_assert(vc->frag_type != CACHE_FRAG_TYPE_HTTP || len != sizeofDoc);
- ink_debug_assert(vol->round_to_approx_size(len) == vc->agg_len);
+ ink_assert(vol->round_to_approx_size(len) == vc->agg_len);
// update copy of directory entry for this document
dir_set_approx_size(&vc->dir, vc->agg_len);
dir_set_offset(&vc->dir, offset_to_vol_offset(vol, o));
@@ -785,12 +785,12 @@ agg_copy(char *p, CacheVC *vc)
#endif
// update the new_info object_key, and total_len and dirinfo
if (vc->header_len) {
- ink_debug_assert(vc->f.use_first_key);
+ ink_assert(vc->f.use_first_key);
#ifdef HTTP_CACHE
if (vc->frag_type == CACHE_FRAG_TYPE_HTTP) {
- ink_debug_assert(vc->write_vector->count() > 0);
+ ink_assert(vc->write_vector->count() > 0);
if (!vc->f.update && !vc->f.evac_vector) {
- ink_debug_assert(!(vc->first_key == zero_key));
+ ink_assert(!(vc->first_key == zero_key));
CacheHTTPInfo *http_info = vc->write_vector->get(vc->alternate_index);
http_info->object_size_set(vc->total_len);
}
@@ -813,7 +813,7 @@ agg_copy(char *p, CacheVC *vc)
if (vc->write_len) {
{
ProxyMutex *mutex ATS_UNUSED = vc->vol->mutex;
- ink_debug_assert(mutex->thread_holding == this_ethread());
+ ink_assert(mutex->thread_holding == this_ethread());
CACHE_DEBUG_SUM_DYN_STAT(cache_write_bytes_stat, vc->write_len);
}
#ifdef HTTP_CACHE
@@ -853,8 +853,7 @@ agg_copy(char *p, CacheVC *vc)
int l = vc->vol->round_to_approx_size(doc->len);
{
ProxyMutex *mutex ATS_UNUSED = vc->vol->mutex;
-
- ink_debug_assert(mutex->thread_holding == this_ethread());
+ ink_assert(mutex->thread_holding == this_ethread());
CACHE_DEBUG_INCREMENT_DYN_STAT(cache_gc_frags_evacuated_stat);
CACHE_DEBUG_SUM_DYN_STAT(cache_gc_bytes_evacuated_stat, l);
}
@@ -1077,7 +1076,7 @@ CacheVC::openWriteCloseDir(int /* event ATS_UNUSED */, Event */* e ATS_UNUSED */
CACHE_TRY_LOCK(lock, vol->mutex, mutex->thread_holding);
if (!lock) {
SET_HANDLER(&CacheVC::openWriteCloseDir);
- ink_debug_assert(!is_io_in_progress());
+ ink_assert(!is_io_in_progress());
VC_SCHED_LOCK_RETRY();
}
vol->close_write(this);
@@ -1118,7 +1117,7 @@ CacheVC::openWriteCloseDir(int /* event ATS_UNUSED */, Event */* e ATS_UNUSED */
}
if (f.close_complete) {
recursive++;
- ink_debug_assert(!vol || this_ethread() != vol->mutex->thread_holding);
+ ink_assert(!vol || this_ethread() != vol->mutex->thread_holding);
vio._cont->handleEvent(VC_EVENT_WRITE_COMPLETE, (void *) &vio);
recursive--;
}
@@ -1337,7 +1336,7 @@ CacheVC::openWriteMain(int /* event ATS_UNUSED */, Event */* e ATS_UNUSED */)
{
cancel_trigger();
int called_user = 0;
- ink_debug_assert(!is_io_in_progress());
+ ink_assert(!is_io_in_progress());
Lagain:
if (!vio.buffer.writer()) {
if (calluser(VC_EVENT_WRITE_READY) == EVENT_DONE)
@@ -1498,7 +1497,7 @@ CacheVC::openWriteStartDone(int event, Event *e)
err = ECACHE_BAD_META_DATA;
goto Lfailure;
}
- ink_debug_assert(write_vector->count() > 0);
+ ink_assert(write_vector->count() > 0);
od->first_dir = dir;
first_dir = dir;
if (doc->single_fragment()) {
@@ -1720,7 +1719,7 @@ Cache::open_write(Continuation *cont, CacheKey *key, CacheHTTPInfo *info, time_t
c->base_stat = cache_update_active_stat;
DDebug("cache_update", "Update called");
info->object_key_get(&c->update_key);
- ink_debug_assert(!(c->update_key == zero_key));
+ ink_assert(!(c->update_key == zero_key));
c->update_len = info->object_size_get();
} else
c->base_stat = cache_write_active_stat;
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/dc6e42c6/iocore/cache/P_CacheDir.h
----------------------------------------------------------------------
diff --git a/iocore/cache/P_CacheDir.h b/iocore/cache/P_CacheDir.h
index 2d00e3b..ba3c325 100644
--- a/iocore/cache/P_CacheDir.h
+++ b/iocore/cache/P_CacheDir.h
@@ -64,7 +64,7 @@ struct CacheVC;
// Macros
#ifdef DO_CHECK_DIR
-#define CHECK_DIR(_d) ink_debug_assert(check_dir(_d))
+#define CHECK_DIR(_d) ink_assert(check_dir(_d))
#else
#define CHECK_DIR(_d) ((void)0)
#endif
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/dc6e42c6/iocore/cache/P_CacheInternal.h
----------------------------------------------------------------------
diff --git a/iocore/cache/P_CacheInternal.h b/iocore/cache/P_CacheInternal.h
index eef9eec..098322b 100644
--- a/iocore/cache/P_CacheInternal.h
+++ b/iocore/cache/P_CacheInternal.h
@@ -567,7 +567,7 @@ free_CacheVC(CacheVC *cont)
CACHE_INCREMENT_DYN_STAT(cont->base_stat + CACHE_STAT_SUCCESS);
} // else abort,cancel
}
- ink_debug_assert(mutex->thread_holding == this_ethread());
+ ink_assert(mutex->thread_holding == this_ethread());
if (cont->trigger)
cont->trigger->cancel();
ink_assert(!cont->is_io_in_progress());
@@ -618,7 +618,7 @@ TS_INLINE int
CacheVC::calluser(int event)
{
recursive++;
- ink_debug_assert(!vol || this_ethread() != vol->mutex->thread_holding);
+ ink_assert(!vol || this_ethread() != vol->mutex->thread_holding);
vio._cont->handleEvent(event, (void *) &vio);
recursive--;
if (closed) {
@@ -632,7 +632,7 @@ TS_INLINE int
CacheVC::callcont(int event)
{
recursive++;
- ink_debug_assert(!vol || this_ethread() != vol->mutex->thread_holding);
+ ink_assert(!vol || this_ethread() != vol->mutex->thread_holding);
_action.continuation->handleEvent(event, this);
recursive--;
if (closed)
@@ -776,7 +776,7 @@ Vol::open_write(CacheVC *cont, int allow_if_writers, int max_writers)
}
if (open_dir.open_write(cont, allow_if_writers, max_writers)) {
#ifdef CACHE_STAT_PAGES
- ink_debug_assert(cont->mutex->thread_holding == this_ethread());
+ ink_assert(cont->mutex->thread_holding == this_ethread());
ink_assert(!cont->stat_link.next && !cont->stat_link.prev);
stat_cache_vcs.enqueue(cont, cont->stat_link);
#endif
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/dc6e42c6/iocore/cache/P_CacheVol.h
----------------------------------------------------------------------
diff --git a/iocore/cache/P_CacheVol.h b/iocore/cache/P_CacheVol.h
index 181c045..86e9389 100644
--- a/iocore/cache/P_CacheVol.h
+++ b/iocore/cache/P_CacheVol.h
@@ -221,7 +221,7 @@ struct Vol: public Continuation
int increment_generation()
{
// this is stored in the offset field of the directory (!=0)
- ink_debug_assert(mutex->thread_holding == this_ethread());
+ ink_assert(mutex->thread_holding == this_ethread());
header->generation++;
if (!header->generation)
header->generation++;
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/dc6e42c6/iocore/cluster/ClusterAPI.cc
----------------------------------------------------------------------
diff --git a/iocore/cluster/ClusterAPI.cc b/iocore/cluster/ClusterAPI.cc
index 7691e90..6609c62 100644
--- a/iocore/cluster/ClusterAPI.cc
+++ b/iocore/cluster/ClusterAPI.cc
@@ -527,7 +527,7 @@ TSFreeRPCMsg(TSClusterRPCMsg_t * msg, int msg_data_len)
TSClusterRPCMsg_t *
TSAllocClusterRPCMsg(TSClusterRPCHandle_t * h, int data_size)
{
- ink_debug_assert(data_size >= 4);
+ ink_assert(data_size >= 4);
if (data_size < 4) {
/* Message must be at least 4 bytes in length */
return (TSClusterRPCMsg_t *) 0;
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/dc6e42c6/iocore/dns/DNS.cc
----------------------------------------------------------------------
diff --git a/iocore/dns/DNS.cc b/iocore/dns/DNS.cc
index 8c85481..3efd938 100644
--- a/iocore/dns/DNS.cc
+++ b/iocore/dns/DNS.cc
@@ -1357,7 +1357,7 @@ dns_process(DNSHandler *handler, HostEnt *buf, int len)
u_char *cp = ((u_char *) h) + HFIXEDSZ;
u_char *eom = (u_char *) h + len;
int n;
- ink_debug_assert(buf->srv_hosts.srv_host_count == 0 && buf->srv_hosts.srv_hosts_length == 0);
+ ink_assert(buf->srv_hosts.srv_host_count == 0 && buf->srv_hosts.srv_hosts_length == 0);
buf->srv_hosts.srv_host_count = 0;
buf->srv_hosts.srv_hosts_length = 0;
int &num_srv = buf->srv_hosts.srv_host_count;
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/dc6e42c6/iocore/eventsystem/I_Lock.h
----------------------------------------------------------------------
diff --git a/iocore/eventsystem/I_Lock.h b/iocore/eventsystem/I_Lock.h
index 7e91ec7..1bca2c8 100644
--- a/iocore/eventsystem/I_Lock.h
+++ b/iocore/eventsystem/I_Lock.h
@@ -166,7 +166,7 @@ Mutex_trylock(
{
ink_assert(t != 0);
- ink_debug_assert(t == (EThread*)this_thread());
+ ink_assert(t == (EThread*)this_thread());
if (m->thread_holding != t) {
if (!ink_mutex_try_acquire(&m->the_mutex)) {
#ifdef DEBUG
@@ -231,7 +231,7 @@ Mutex_trylock_spin(
return false;
}
m->thread_holding = t;
- ink_debug_assert(m->thread_holding);
+ ink_assert(m->thread_holding);
#ifdef DEBUG
m->file = afile;
m->line = aline;
@@ -266,7 +266,7 @@ Mutex_lock(
if (m->thread_holding != t) {
ink_mutex_acquire(&m->the_mutex);
m->thread_holding = t;
- ink_debug_assert(m->thread_holding);
+ ink_assert(m->thread_holding);
#ifdef DEBUG
m->file = afile;
m->line = aline;
@@ -306,7 +306,7 @@ Mutex_unlock(ProxyMutex * m, EThread * t)
m->line = 0;
m->handler = NULL;
#endif //DEBUG
- ink_debug_assert(m->thread_holding);
+ ink_assert(m->thread_holding);
m->thread_holding = 0;
ink_mutex_release(&m->the_mutex);
}
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/dc6e42c6/iocore/eventsystem/I_VConnection.h
----------------------------------------------------------------------
diff --git a/iocore/eventsystem/I_VConnection.h b/iocore/eventsystem/I_VConnection.h
index 5f68a61..37c188d 100644
--- a/iocore/eventsystem/I_VConnection.h
+++ b/iocore/eventsystem/I_VConnection.h
@@ -388,24 +388,24 @@ struct DummyVConnection: public VConnection
(void) nbytes;
(void) buf;
(void) owner;
- ink_debug_assert(!"VConnection::do_io_write -- " "cannot use default implementation");
+ ink_assert(!"VConnection::do_io_write -- " "cannot use default implementation");
return NULL;
}
virtual VIO *do_io_read(Continuation *c = NULL, int64_t nbytes = INT64_MAX, MIOBuffer *buf = 0) {
(void) c;
(void) nbytes;
(void) buf;
- ink_debug_assert(!"VConnection::do_io_read -- " "cannot use default implementation");
+ ink_assert(!"VConnection::do_io_read -- " "cannot use default implementation");
return NULL;
}
virtual void do_io_close(int alerrno = -1) {
(void) alerrno;
- ink_debug_assert(!"VConnection::do_io_close -- " "cannot use default implementation");
+ ink_assert(!"VConnection::do_io_close -- " "cannot use default implementation");
}
virtual void do_io_shutdown(ShutdownHowTo_t howto)
{
(void) howto;
- ink_debug_assert(!"VConnection::do_io_shutdown -- " "cannot use default implementation");
+ ink_assert(!"VConnection::do_io_shutdown -- " "cannot use default implementation");
}
DummyVConnection(ProxyMutex *m):VConnection(m) {
}
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/dc6e42c6/iocore/eventsystem/P_IOBuffer.h
----------------------------------------------------------------------
diff --git a/iocore/eventsystem/P_IOBuffer.h b/iocore/eventsystem/P_IOBuffer.h
index 301e0c7..10abd5e 100644
--- a/iocore/eventsystem/P_IOBuffer.h
+++ b/iocore/eventsystem/P_IOBuffer.h
@@ -148,10 +148,10 @@ iobuffer_mem_inc(const char *_loc, int64_t _size_index)
if (!_loc)
_loc = "memory/IOBuffer/UNKNOWN-LOCATION";
Resource *res = res_lookup(_loc);
- ink_debug_assert(strcmp(_loc, res->path) == 0);
+ ink_assert(strcmp(_loc, res->path) == 0);
#ifdef DEBUG
int64_t r = ink_atomic_increment(&res->value, index_to_buffer_size(_size_index));
- ink_debug_assert(r >= 0);
+ ink_assert(r >= 0);
#else
ink_atomic_increment(&res->value, index_to_buffer_size(_size_index));
#endif
@@ -168,10 +168,10 @@ iobuffer_mem_dec(const char *_loc, int64_t _size_index)
if (!_loc)
_loc = "memory/IOBuffer/UNKNOWN-LOCATION";
Resource *res = res_lookup(_loc);
- ink_debug_assert(strcmp(_loc, res->path) == 0);
+ ink_assert(strcmp(_loc, res->path) == 0);
#ifdef DEBUG
int64_t r = ink_atomic_increment(&res->value, -index_to_buffer_size(_size_index));
- ink_debug_assert(r >= index_to_buffer_size(_size_index));
+ ink_assert(r >= index_to_buffer_size(_size_index));
#else
ink_atomic_increment(&res->value, -index_to_buffer_size(_size_index));
#endif
@@ -411,7 +411,7 @@ IOBufferBlock::reset()
TS_INLINE void
IOBufferBlock::alloc(int64_t i)
{
- ink_debug_assert(BUFFER_SIZE_ALLOCATED(i));
+ ink_assert(BUFFER_SIZE_ALLOCATED(i));
#ifdef TRACK_BUFFER_USER
data = new_IOBufferData_internal(_location, i);
#else
@@ -650,7 +650,7 @@ IOBufferReader::consume(int64_t n)
block = block->next;
r = block->read_avail();
}
- ink_debug_assert(read_avail() >= 0);
+ ink_assert(read_avail() >= 0);
}
TS_INLINE char &
@@ -926,7 +926,7 @@ MIOBuffer::append_block(IOBufferBlock * b)
TS_INLINE void
MIOBuffer::append_block(int64_t asize_index)
{
- ink_debug_assert(BUFFER_SIZE_ALLOCATED(asize_index));
+ ink_assert(BUFFER_SIZE_ALLOCATED(asize_index));
#ifdef TRACK_BUFFER_USER
IOBufferBlock *b = new_IOBufferBlock_internal(_location);
#else
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/dc6e42c6/iocore/eventsystem/P_UnixEThread.h
----------------------------------------------------------------------
diff --git a/iocore/eventsystem/P_UnixEThread.h b/iocore/eventsystem/P_UnixEThread.h
index 2de8dd0..ae7f06a 100644
--- a/iocore/eventsystem/P_UnixEThread.h
+++ b/iocore/eventsystem/P_UnixEThread.h
@@ -142,7 +142,7 @@ TS_INLINE Event *
EThread::schedule_local(Event * e)
{
if (tt != REGULAR) {
- ink_debug_assert(tt == DEDICATED);
+ ink_assert(tt == DEDICATED);
return eventProcessor.schedule(e, ET_CALL);
}
if (!e->mutex.m_ptr) {
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/dc6e42c6/iocore/eventsystem/ProtectedQueue.cc
----------------------------------------------------------------------
diff --git a/iocore/eventsystem/ProtectedQueue.cc b/iocore/eventsystem/ProtectedQueue.cc
index 4da134b..cfa1ec4 100644
--- a/iocore/eventsystem/ProtectedQueue.cc
+++ b/iocore/eventsystem/ProtectedQueue.cc
@@ -108,7 +108,7 @@ ProtectedQueue::enqueue(Event *e , bool fast_signal)
void
flush_signals(EThread * thr)
{
- ink_debug_assert(this_ethread() == thr);
+ ink_assert(this_ethread() == thr);
int n = thr->n_ethreads_to_be_signalled;
if (n > eventProcessor.n_ethreads)
n = eventProcessor.n_ethreads; // MAX
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/dc6e42c6/iocore/eventsystem/UnixEvent.cc
----------------------------------------------------------------------
diff --git a/iocore/eventsystem/UnixEvent.cc b/iocore/eventsystem/UnixEvent.cc
index ee9b8de..634cee9 100644
--- a/iocore/eventsystem/UnixEvent.cc
+++ b/iocore/eventsystem/UnixEvent.cc
@@ -35,7 +35,7 @@ void
Event::schedule_imm(int acallback_event)
{
callback_event = acallback_event;
- ink_debug_assert(ethread == this_ethread());
+ ink_assert(ethread == this_ethread());
if (in_the_priority_queue)
ethread->EventQueue.remove(this);
timeout_at = 0;
@@ -50,7 +50,7 @@ void
Event::schedule_at(ink_hrtime atimeout_at, int acallback_event)
{
callback_event = acallback_event;
- ink_debug_assert(ethread == this_ethread());
+ ink_assert(ethread == this_ethread());
ink_assert(atimeout_at > 0);
if (in_the_priority_queue)
ethread->EventQueue.remove(this);
@@ -66,7 +66,7 @@ void
Event::schedule_in(ink_hrtime atimeout_in, int acallback_event)
{
callback_event = acallback_event;
- ink_debug_assert(ethread == this_ethread());
+ ink_assert(ethread == this_ethread());
if (in_the_priority_queue)
ethread->EventQueue.remove(this);
timeout_at = ink_get_based_hrtime() + atimeout_in;
@@ -81,7 +81,7 @@ void
Event::schedule_every(ink_hrtime aperiod, int acallback_event)
{
callback_event = acallback_event;
- ink_debug_assert(ethread == this_ethread());
+ ink_assert(ethread == this_ethread());
ink_assert(aperiod != 0);
if (in_the_priority_queue)
ethread->EventQueue.remove(this);
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/dc6e42c6/iocore/hostdb/HostDB.cc
----------------------------------------------------------------------
diff --git a/iocore/hostdb/HostDB.cc b/iocore/hostdb/HostDB.cc
index 540c37e..52075d6 100644
--- a/iocore/hostdb/HostDB.cc
+++ b/iocore/hostdb/HostDB.cc
@@ -649,7 +649,7 @@ db_mark_for(sockaddr const* ip) {
HostDBInfo *
probe(ProxyMutex *mutex, HostDBMD5 const& md5, bool ignore_timeout)
{
- ink_debug_assert(this_ethread() == hostDB.lock_for_bucket((int) (fold_md5(md5.hash) % hostDB.buckets))->thread_holding);
+ ink_assert(this_ethread() == hostDB.lock_for_bucket((int) (fold_md5(md5.hash) % hostDB.buckets))->thread_holding);
if (hostdb_enable) {
uint64_t folded_md5 = fold_md5(md5.hash);
HostDBInfo *r = hostDB.lookup_block(folded_md5, hostDB.levels);
@@ -724,7 +724,7 @@ HostDBContinuation::insert(unsigned int attl)
uint64_t folded_md5 = fold_md5(md5.hash);
int bucket = folded_md5 % hostDB.buckets;
- ink_debug_assert(this_ethread() == hostDB.lock_for_bucket(bucket)->thread_holding);
+ ink_assert(this_ethread() == hostDB.lock_for_bucket(bucket)->thread_holding);
// remove the old one to prevent buildup
HostDBInfo *old_r = hostDB.lookup_block(folded_md5, 3);
if (old_r)
@@ -875,7 +875,7 @@ Action *
HostDBProcessor::getSRVbyname_imm(Continuation * cont, process_srv_info_pfn process_srv_info,
const char *hostname, int len, Options const& opt)
{
- ink_debug_assert(cont->mutex->thread_holding == this_ethread());
+ ink_assert(cont->mutex->thread_holding == this_ethread());
bool force_dns = false;
EThread *thread = cont->mutex->thread_holding;
ProxyMutex *mutex = thread->mutex;
@@ -949,7 +949,7 @@ Action *
HostDBProcessor::getbyname_imm(Continuation * cont, process_hostdb_info_pfn process_hostdb_info,
const char *hostname, int len, Options const& opt)
{
- ink_debug_assert(cont->mutex->thread_holding == this_ethread());
+ ink_assert(cont->mutex->thread_holding == this_ethread());
bool force_dns = false;
EThread *thread = cont->mutex->thread_holding;
ProxyMutex *mutex = thread->mutex;
@@ -1273,7 +1273,7 @@ HostDBContinuation::lookup_done(IpAddr const& ip, char const* aname, bool around
{
HostDBInfo *i = NULL;
- ink_debug_assert(this_ethread() == hostDB.lock_for_bucket((int) (fold_md5(md5.hash) % hostDB.buckets))->thread_holding);
+ ink_assert(this_ethread() == hostDB.lock_for_bucket((int) (fold_md5(md5.hash) % hostDB.buckets))->thread_holding);
if (!ip.isValid() || !aname || !aname[0]) {
if (is_byname()) {
Debug("hostdb", "lookup_done() failed for '%.*s'", md5.host_len, md5.host_name);
@@ -1322,7 +1322,7 @@ HostDBContinuation::lookup_done(IpAddr const& ip, char const* aname, bool around
}
i->is_srv = false;
} else if (is_srv()) {
- ink_debug_assert(srv && srv->srv_host_count > 0 && srv->srv_host_count <= 16 && around_robin);
+ ink_assert(srv && srv->srv_host_count > 0 && srv->srv_host_count <= 16 && around_robin);
i->data.srv.srv_offset = srv->srv_host_count;
i->reverse_dns = false;
@@ -1362,7 +1362,7 @@ HostDBContinuation::lookup_done(IpAddr const& ip, char const* aname, bool around
int
HostDBContinuation::dnsPendingEvent(int event, Event * e)
{
- ink_debug_assert(this_ethread() == hostDB.lock_for_bucket(fold_md5(md5.hash) % hostDB.buckets)->thread_holding);
+ ink_assert(this_ethread() == hostDB.lock_for_bucket(fold_md5(md5.hash) % hostDB.buckets)->thread_holding);
if (timeout) {
timeout->cancel(this);
timeout = NULL;
@@ -1408,7 +1408,7 @@ restore_info(HostDBInfo * r, HostDBInfo * old_r, HostDBInfo & old_info, HostDBRo
int
HostDBContinuation::dnsEvent(int event, HostEnt * e)
{
- ink_debug_assert(this_ethread() == hostDB.lock_for_bucket(fold_md5(md5.hash) % hostDB.buckets)->thread_holding);
+ ink_assert(this_ethread() == hostDB.lock_for_bucket(fold_md5(md5.hash) % hostDB.buckets)->thread_holding);
if (timeout) {
timeout->cancel(this);
timeout = NULL;
@@ -1519,7 +1519,7 @@ HostDBContinuation::dnsEvent(int event, HostEnt * e)
r = lookup_done(md5.ip, e->ent.h_name, false, ttl_seconds, &e->srv_hosts);
}
- ink_debug_assert(!r || (r->app.allotment.application1 == 0 && r->app.allotment.application2 == 0));
+ ink_assert(!r || (r->app.allotment.application1 == 0 && r->app.allotment.application2 == 0));
if (rr) {
int s = HostDBRoundRobin::size(n, e->srv_hosts.srv_hosts_length);
@@ -1532,7 +1532,7 @@ HostDBContinuation::dnsEvent(int event, HostEnt * e)
int skip = 0;
char *pos = (char *) rr_data + sizeof(HostDBRoundRobin) + n * sizeof(HostDBInfo);
SRV *q[HOST_DB_MAX_ROUND_ROBIN_INFO];
- ink_debug_assert(n <= HOST_DB_MAX_ROUND_ROBIN_INFO);
+ ink_assert(n <= HOST_DB_MAX_ROUND_ROBIN_INFO);
// sort
for (i = 0; i < n; ++i) {
q[i] = &e->srv_hosts.hosts[i];
@@ -1558,7 +1558,7 @@ HostDBContinuation::dnsEvent(int event, HostEnt * e)
item.data.srv.srv_port = t->port;
item.data.srv.key = t->key;
- ink_debug_assert (skip + (int) t->host_len <= e->srv_hosts.srv_hosts_length);
+ ink_assert (skip + (int) t->host_len <= e->srv_hosts.srv_hosts_length);
memcpy(pos + skip, t->host, t->host_len);
item.data.srv.srv_offset = (pos - (char *) rr_data) + skip;
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/dc6e42c6/iocore/hostdb/I_HostDBProcessor.h
----------------------------------------------------------------------
diff --git a/iocore/hostdb/I_HostDBProcessor.h b/iocore/hostdb/I_HostDBProcessor.h
index 28f1647..9029d80 100644
--- a/iocore/hostdb/I_HostDBProcessor.h
+++ b/iocore/hostdb/I_HostDBProcessor.h
@@ -63,7 +63,7 @@ extern unsigned int hostdb_serve_stale_but_revalidate;
static inline unsigned int
makeHostHash(const char *string)
{
- ink_debug_assert(string && *string);
+ ink_assert(string && *string);
if (!string || *string == 0)
return 0;
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/dc6e42c6/iocore/hostdb/P_HostDBProcessor.h
----------------------------------------------------------------------
diff --git a/iocore/hostdb/P_HostDBProcessor.h b/iocore/hostdb/P_HostDBProcessor.h
index 767465b..9691392 100644
--- a/iocore/hostdb/P_HostDBProcessor.h
+++ b/iocore/hostdb/P_HostDBProcessor.h
@@ -323,7 +323,7 @@ HostDBRoundRobin::select_best_srv(char *target, InkRand *rand, ink_time_t now, i
#ifdef DEBUG
for (int i = 1; i < good; ++i) {
- ink_debug_assert(info[i].data.srv.srv_priority >= info[i-1].data.srv.srv_priority);
+ ink_assert(info[i].data.srv.srv_priority >= info[i-1].data.srv.srv_priority);
}
#endif
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/dc6e42c6/iocore/net/NetTest-http-server.c
----------------------------------------------------------------------
diff --git a/iocore/net/NetTest-http-server.c b/iocore/net/NetTest-http-server.c
index e20dada..6154e36 100644
--- a/iocore/net/NetTest-http-server.c
+++ b/iocore/net/NetTest-http-server.c
@@ -87,7 +87,7 @@ struct NetTesterSM:public Continuation
Debug("net_test", "The request header is :\n%s\n", request);
// parse and get the doc size
SET_HANDLER(&NetTesterSM::handle_write);
- ink_debug_assert(doc_len == resp_reader->read_avail());
+ ink_assert(doc_len == resp_reader->read_avail());
vc->do_io_write(this, doc_len, resp_reader);
//vc->set_inactivity_timeout(HRTIME_SECONDS(10));
}
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/dc6e42c6/iocore/net/P_UnixNetVConnection.h
----------------------------------------------------------------------
diff --git a/iocore/net/P_UnixNetVConnection.h b/iocore/net/P_UnixNetVConnection.h
index 72df73e..0b338a0 100644
--- a/iocore/net/P_UnixNetVConnection.h
+++ b/iocore/net/P_UnixNetVConnection.h
@@ -291,13 +291,13 @@ UnixNetVConnection::set_inactivity_timeout(ink_hrtime timeout)
inactivity_timeout->cancel_action(this);
if (inactivity_timeout_in) {
if (read.enabled) {
- ink_debug_assert(read.vio.mutex->thread_holding == this_ethread() && thread);
+ ink_assert(read.vio.mutex->thread_holding == this_ethread() && thread);
if (read.vio.mutex->thread_holding == thread)
inactivity_timeout = thread->schedule_in_local(this, inactivity_timeout_in);
else
inactivity_timeout = thread->schedule_in(this, inactivity_timeout_in);
} else if (write.enabled) {
- ink_debug_assert(write.vio.mutex->thread_holding == this_ethread() && thread);
+ ink_assert(write.vio.mutex->thread_holding == this_ethread() && thread);
if (write.vio.mutex->thread_holding == thread)
inactivity_timeout = thread->schedule_in_local(this, inactivity_timeout_in);
else
@@ -318,13 +318,13 @@ UnixNetVConnection::set_active_timeout(ink_hrtime timeout)
active_timeout->cancel_action(this);
if (active_timeout_in) {
if (read.enabled) {
- ink_debug_assert(read.vio.mutex->thread_holding == this_ethread() && thread);
+ ink_assert(read.vio.mutex->thread_holding == this_ethread() && thread);
if (read.vio.mutex->thread_holding == thread)
active_timeout = thread->schedule_in_local(this, active_timeout_in);
else
active_timeout = thread->schedule_in(this, active_timeout_in);
} else if (write.enabled) {
- ink_debug_assert(write.vio.mutex->thread_holding == this_ethread() && thread);
+ ink_assert(write.vio.mutex->thread_holding == this_ethread() && thread);
if (read.vio.mutex->thread_holding == thread)
active_timeout = thread->schedule_in_local(this, active_timeout_in);
else
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/dc6e42c6/iocore/net/P_UnixUDPConnection.h
----------------------------------------------------------------------
diff --git a/iocore/net/P_UnixUDPConnection.h b/iocore/net/P_UnixUDPConnection.h
index a9ea194..5a7c03d 100644
--- a/iocore/net/P_UnixUDPConnection.h
+++ b/iocore/net/P_UnixUDPConnection.h
@@ -104,7 +104,7 @@ UDPConnection::recv(Continuation * c)
UnixUDPConnection *p = (UnixUDPConnection *) this;
// register callback interest.
p->continuation = c;
- ink_debug_assert(c != NULL);
+ ink_assert(c != NULL);
mutex = c->mutex;
p->recvActive = 1;
return ACTION_RESULT_NONE;
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/dc6e42c6/iocore/net/SSLNetVConnection.cc
----------------------------------------------------------------------
diff --git a/iocore/net/SSLNetVConnection.cc b/iocore/net/SSLNetVConnection.cc
index 26fc96b..3247968 100644
--- a/iocore/net/SSLNetVConnection.cc
+++ b/iocore/net/SSLNetVConnection.cc
@@ -107,12 +107,12 @@ ssl_read_from_net(NetHandler * nh, UnixNetVConnection * vc, EThread * lthread, i
SSLDebugBufferPrint("ssl_buff", b->end() + offset, rres, "SSL Read");
#endif
- ink_debug_assert(rres);
+ ink_assert(rres);
bytes_read += rres;
offset += rres;
block_write_avail -= rres;
- ink_debug_assert(block_write_avail >= 0);
+ ink_assert(block_write_avail >= 0);
continue;
@@ -207,7 +207,7 @@ SSLNetVConnection::net_read_io(NetHandler *nh, EThread *lthread)
return;
}
- ink_debug_assert(buf.writer());
+ ink_assert(buf.writer());
// This function will always return true unless
// vc is an SSLNetVConnection.
@@ -258,7 +258,7 @@ SSLNetVConnection::net_read_io(NetHandler *nh, EThread *lthread)
if (ret == SSL_READ_READY || ret == SSL_READ_ERROR_NONE) {
bytes += r;
}
- ink_debug_assert(bytes >= 0);
+ ink_assert(bytes >= 0);
} while ((ret == SSL_READ_READY && bytes == 0) || ret == SSL_READ_ERROR_NONE);
if (bytes > 0) {
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/dc6e42c6/iocore/net/SSLUtils.cc
----------------------------------------------------------------------
diff --git a/iocore/net/SSLUtils.cc b/iocore/net/SSLUtils.cc
index f9bc3af..9827815 100644
--- a/iocore/net/SSLUtils.cc
+++ b/iocore/net/SSLUtils.cc
@@ -62,7 +62,7 @@ SSL_locking_callback(int mode, int type, const char * file, int line)
NOWARN_UNUSED(file);
NOWARN_UNUSED(line);
- ink_debug_assert(type < CRYPTO_num_locks());
+ ink_assert(type < CRYPTO_num_locks());
if (mode & CRYPTO_LOCK) {
MUTEX_TAKE_LOCK(sslMutexArray[type], this_ethread());
@@ -70,7 +70,7 @@ SSL_locking_callback(int mode, int type, const char * file, int line)
MUTEX_UNTAKE_LOCK(sslMutexArray[type], this_ethread());
} else {
Debug("ssl", "invalid SSL locking mode 0x%x", mode);
- ink_debug_assert(0);
+ ink_assert(0);
}
}
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/dc6e42c6/iocore/net/Socks.cc
----------------------------------------------------------------------
diff --git a/iocore/net/Socks.cc b/iocore/net/Socks.cc
index 44b7710..5f37919 100644
--- a/iocore/net/Socks.cc
+++ b/iocore/net/Socks.cc
@@ -85,7 +85,7 @@ SocksEntry::findServer()
#ifdef SOCKS_WITH_TS
if (nattempts == 1) {
- ink_debug_assert(server_result.r == PARENT_UNDEFINED);
+ ink_assert(server_result.r == PARENT_UNDEFINED);
server_params->findParent(&req_data, &server_result);
} else {
@@ -114,7 +114,7 @@ SocksEntry::findServer()
break;
default:
- ink_debug_assert(!"Unexpected event");
+ ink_assert(!"Unexpected event");
case PARENT_DIRECT:
case PARENT_FAIL:
memset(&server_addr, 0, sizeof(server_addr));
@@ -139,7 +139,7 @@ SocksEntry::free()
if (!lock) {
// Socks continuation share the user's lock
// so acquiring a lock shouldn't fail
- ink_debug_assert(0);
+ ink_assert(0);
return;
}
@@ -243,7 +243,7 @@ SocksEntry::mainEvent(int event, void *data)
buf->reset();
unsigned short ts;
p = (unsigned char *) buf->start();
- ink_debug_assert(netVConnection);
+ ink_assert(netVConnection);
if (auth_handler) {
n_bytes = invokeSocksAuthHandler(auth_handler, SOCKS_AUTH_OPEN, p);
@@ -407,7 +407,7 @@ SocksEntry::mainEvent(int event, void *data)
} else
success = (p[0] == 0 && p[1] == SOCKS4_REQ_GRANTED);
- //ink_debug_assert(*(p) == 0);
+ //ink_assert(*(p) == 0);
if (!success) { // SOCKS request failed
Debug("Socks", "Socks request denied %d", (int) *(p + 1));
lerrno = ESOCK_DENIED;
@@ -449,7 +449,7 @@ SocksEntry::mainEvent(int event, void *data)
break;
default:
// BUGBUG:: could be active/inactivity timeout ...
- ink_debug_assert(!"bad case value");
+ ink_assert(!"bad case value");
Debug("Socks", "Bad Case/Net Error Event");
lerrno = ESOCK_NO_SOCK_SERVER_CONN;
free();
@@ -666,7 +666,7 @@ socks5BasicAuthHandler(int event, unsigned char *p, void (**h_ptr) (void))
default:
//This should be inpossible
- ink_debug_assert(!"bad case value");
+ ink_assert(!"bad case value");
ret = -1;
break;
}
@@ -686,7 +686,7 @@ socks5PasswdAuthHandler(int event, unsigned char *p, void (**h_ptr) (void))
case SOCKS_AUTH_OPEN:
pass_phrase = netProcessor.socks_conf_stuff->user_name_n_passwd;
pass_len = netProcessor.socks_conf_stuff->user_name_n_passwd_len;
- ink_debug_assert(pass_phrase);
+ ink_assert(pass_phrase);
p[0] = 1; //version
memcpy(&p[1], pass_phrase, pass_len);
@@ -724,7 +724,7 @@ socks5PasswdAuthHandler(int event, unsigned char *p, void (**h_ptr) (void))
break;
default:
- ink_debug_assert(!"bad case value");
+ ink_assert(!"bad case value");
ret = -1;
break;
}
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/dc6e42c6/iocore/net/UnixNetAccept.cc
----------------------------------------------------------------------
diff --git a/iocore/net/UnixNetAccept.cc b/iocore/net/UnixNetAccept.cc
index fcb7fb9..8ad6e6e 100644
--- a/iocore/net/UnixNetAccept.cc
+++ b/iocore/net/UnixNetAccept.cc
@@ -350,9 +350,9 @@ NetAccept::acceptEvent(int event, void *ep)
return EVENT_DONE;
}
- //ink_debug_assert(ifd < 0 || event == EVENT_INTERVAL || (pd->nfds > ifd && pd->pfd[ifd].fd == server.fd));
+ //ink_assert(ifd < 0 || event == EVENT_INTERVAL || (pd->nfds > ifd && pd->pfd[ifd].fd == server.fd));
//if (ifd < 0 || event == EVENT_INTERVAL || (pd->pfd[ifd].revents & (POLLIN | POLLERR | POLLHUP | POLLNVAL))) {
- //ink_debug_assert(!"incomplete");
+ //ink_assert(!"incomplete");
int res;
if ((res = accept_fn(this, e, false)) < 0) {
NET_DECREMENT_DYN_STAT(net_accepts_currently_open_stat);
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/dc6e42c6/iocore/net/UnixNetProcessor.cc
----------------------------------------------------------------------
diff --git a/iocore/net/UnixNetProcessor.cc b/iocore/net/UnixNetProcessor.cc
index 975167d..0f4e389 100644
--- a/iocore/net/UnixNetProcessor.cc
+++ b/iocore/net/UnixNetProcessor.cc
@@ -115,7 +115,7 @@ UnixNetProcessor::accept_internal(
accept_ip.assign(opt.local_ip);
else
accept_ip.setToAnyAddr(opt.ip_family);
- ink_debug_assert(0 < opt.local_port && opt.local_port < 65536);
+ ink_assert(0 < opt.local_port && opt.local_port < 65536);
accept_ip.port() = htons(opt.local_port);
na->accept_fn = net_accept; // All callers used this.
@@ -351,7 +351,7 @@ struct CheckConnect:public Continuation
action_.continuation->handleEvent(NET_EVENT_OPEN_FAILED, (void *) -ENET_CONNECT_TIMEOUT);
break;
default:
- ink_debug_assert(!"unknown connect event");
+ ink_assert(!"unknown connect event");
if (!action_.cancelled)
action_.continuation->handleEvent(NET_EVENT_OPEN_FAILED, (void *) -ENET_CONNECT_FAILED);
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/dc6e42c6/iocore/net/UnixNetVConnection.cc
----------------------------------------------------------------------
diff --git a/iocore/net/UnixNetVConnection.cc b/iocore/net/UnixNetVConnection.cc
index 9586f43..5838f8d 100644
--- a/iocore/net/UnixNetVConnection.cc
+++ b/iocore/net/UnixNetVConnection.cc
@@ -138,7 +138,7 @@ read_signal_and_update(int event, UnixNetVConnection *vc)
vc->read.vio._cont->handleEvent(event, &vc->read.vio);
if (!--vc->recursion && vc->closed) {
/* BZ 31932 */
- ink_debug_assert(vc->thread == this_ethread());
+ ink_assert(vc->thread == this_ethread());
close_UnixNetVConnection(vc, vc->thread);
return EVENT_DONE;
} else {
@@ -153,7 +153,7 @@ write_signal_and_update(int event, UnixNetVConnection *vc)
vc->write.vio._cont->handleEvent(event, &vc->write.vio);
if (!--vc->recursion && vc->closed) {
/* BZ 31932 */
- ink_debug_assert(vc->thread == this_ethread());
+ ink_assert(vc->thread == this_ethread());
close_UnixNetVConnection(vc, vc->thread);
return EVENT_DONE;
} else {
@@ -223,7 +223,7 @@ read_from_net(NetHandler *nh, UnixNetVConnection *vc, EThread *thread)
return;
}
- ink_debug_assert(buf.writer());
+ ink_assert(buf.writer());
// if there is nothing to do, disable connection
int64_t ntodo = s->vio.ntodo();
@@ -406,7 +406,7 @@ write_to_net_io(NetHandler *nh, UnixNetVConnection *vc, EThread *thread)
}
MIOBufferAccessor & buf = s->vio.buffer;
- ink_debug_assert(buf.writer());
+ ink_assert(buf.writer());
// Calculate amount to write
int64_t towrite = buf.reader()->read_avail();
@@ -467,9 +467,9 @@ write_to_net_io(NetHandler *nh, UnixNetVConnection *vc, EThread *thread)
NET_SUM_DYN_STAT(net_write_bytes_stat, r);
// Remove data from the buffer and signal continuation.
- ink_debug_assert(buf.reader()->read_avail() >= r);
+ ink_assert(buf.reader()->read_avail() >= r);
buf.reader()->consume(r);
- ink_debug_assert(buf.reader()->read_avail() >= 0);
+ ink_assert(buf.reader()->read_avail() >= 0);
s->vio.ndone += r;
net_activity(vc, thread);
@@ -627,7 +627,7 @@ OOB_callback::retry_OOB_send(int event, Event *e)
{
(void) event;
(void) e;
- ink_debug_assert(mutex->thread_holding == this_ethread());
+ ink_assert(mutex->thread_holding == this_ethread());
// the NetVC and the OOB_callback share a mutex
server_vc->oob_ptr = NULL;
server_vc->send_OOB(server_cont, data, length);
@@ -653,11 +653,11 @@ Action *
UnixNetVConnection::send_OOB(Continuation *cont, char *buf, int len)
{
UnixNetVConnection *u = (UnixNetVConnection *) this;
- ink_debug_assert(len > 0);
- ink_debug_assert(buf);
- ink_debug_assert(!u->oob_ptr);
+ ink_assert(len > 0);
+ ink_assert(buf);
+ ink_assert(!u->oob_ptr);
int written;
- ink_debug_assert(cont->mutex->thread_holding == this_ethread());
+ ink_assert(cont->mutex->thread_holding == this_ethread());
written = socketManager.send(u->con.fd, buf, len, MSG_OOB);
if (written == len) {
cont->handleEvent(VC_EVENT_OOB_COMPLETE, NULL);
@@ -694,8 +694,8 @@ UnixNetVConnection::reenable(VIO *vio)
if (!thread)
return;
EThread *t = vio->mutex->thread_holding;
- ink_debug_assert(t == this_ethread());
- ink_debug_assert(!closed);
+ ink_assert(t == this_ethread());
+ ink_assert(!closed);
if (nh->mutex->thread_holding == t) {
if (vio == &read.vio) {
ep.modify(EVENTIO_READ);
@@ -754,7 +754,7 @@ UnixNetVConnection::reenable_re(VIO *vio)
if (!thread)
return;
EThread *t = vio->mutex->thread_holding;
- ink_debug_assert(t == this_ethread());
+ ink_assert(t == this_ethread());
if (nh->mutex->thread_holding == t) {
set_enabled(vio);
if (vio == &read.vio) {
@@ -798,7 +798,7 @@ UnixNetVConnection::UnixNetVConnection()
void
UnixNetVConnection::set_enabled(VIO *vio)
{
- ink_debug_assert(vio->mutex->thread_holding == this_ethread() && thread);
+ ink_assert(vio->mutex->thread_holding == this_ethread() && thread);
ink_assert(!closed);
STATE_FROM_VIO(vio)->enabled = 1;
#ifdef INACTIVITY_TIMEOUT
@@ -983,8 +983,8 @@ UnixNetVConnection::acceptEvent(int event, Event *e)
int
UnixNetVConnection::mainEvent(int event, Event *e)
{
- ink_debug_assert(event == EVENT_IMMEDIATE || event == EVENT_INTERVAL);
- ink_debug_assert(thread == this_ethread());
+ ink_assert(event == EVENT_IMMEDIATE || event == EVENT_INTERVAL);
+ ink_assert(thread == this_ethread());
MUTEX_TRY_LOCK(hlock, get_NetHandler(thread)->mutex, e->ethread);
MUTEX_TRY_LOCK(rlock, read.vio.mutex ? (ProxyMutex *) read.vio.mutex : (ProxyMutex *) e->ethread->mutex, e->ethread);
@@ -1019,8 +1019,8 @@ UnixNetVConnection::mainEvent(int event, Event *e)
#else
if (event == EVENT_IMMEDIATE) {
/* BZ 49408 */
- //ink_debug_assert(inactivity_timeout_in);
- //ink_debug_assert(next_inactivity_timeout_at < ink_get_hrtime());
+ //ink_assert(inactivity_timeout_in);
+ //ink_assert(next_inactivity_timeout_at < ink_get_hrtime());
if (!inactivity_timeout_in || next_inactivity_timeout_at > ink_get_hrtime())
return EVENT_CONT;
signal_event = VC_EVENT_INACTIVITY_TIMEOUT;
@@ -1028,7 +1028,7 @@ UnixNetVConnection::mainEvent(int event, Event *e)
}
#endif
else {
- ink_debug_assert(e == active_timeout);
+ ink_assert(e == active_timeout);
signal_event = VC_EVENT_ACTIVE_TIMEOUT;
signal_timeout = &active_timeout;
}
@@ -1144,14 +1144,14 @@ UnixNetVConnection::free(EThread *t)
write.triggered = 0;
options.reset();
closed = 0;
- ink_debug_assert(!read.ready_link.prev && !read.ready_link.next);
- ink_debug_assert(!read.enable_link.next);
- ink_debug_assert(!write.ready_link.prev && !write.ready_link.next);
- ink_debug_assert(!write.enable_link.next);
- ink_debug_assert(!link.next && !link.prev);
- ink_debug_assert(!active_timeout);
- ink_debug_assert(con.fd == NO_FD);
- ink_debug_assert(t == this_ethread());
+ ink_assert(!read.ready_link.prev && !read.ready_link.next);
+ ink_assert(!read.enable_link.next);
+ ink_assert(!write.ready_link.prev && !write.ready_link.next);
+ ink_assert(!write.enable_link.next);
+ ink_assert(!link.next && !link.prev);
+ ink_assert(!active_timeout);
+ ink_assert(con.fd == NO_FD);
+ ink_assert(t == this_ethread());
if (from_accept_thread) {
netVCAllocator.free(this);
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/dc6e42c6/iocore/net/UnixUDPConnection.cc
----------------------------------------------------------------------
diff --git a/iocore/net/UnixUDPConnection.cc b/iocore/net/UnixUDPConnection.cc
index 31d2fac..1c6d29e 100644
--- a/iocore/net/UnixUDPConnection.cc
+++ b/iocore/net/UnixUDPConnection.cc
@@ -146,11 +146,11 @@ UDPConnection::Release()
p->ep.stop();
if (ink_atomic_increment(&p->refcount, -1) == 1) {
- ink_debug_assert(p->callback_link.next == NULL);
- ink_debug_assert(p->callback_link.prev == NULL);
- ink_debug_assert(p->polling_link.next == NULL);
- ink_debug_assert(p->polling_link.prev == NULL);
- ink_debug_assert(p->newconn_alink.next == NULL);
+ ink_assert(p->callback_link.next == NULL);
+ ink_assert(p->callback_link.prev == NULL);
+ ink_assert(p->polling_link.next == NULL);
+ ink_assert(p->polling_link.prev == NULL);
+ ink_assert(p->newconn_alink.next == NULL);
delete this;
}
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/dc6e42c6/iocore/net/UnixUDPNet.cc
----------------------------------------------------------------------
diff --git a/iocore/net/UnixUDPNet.cc b/iocore/net/UnixUDPNet.cc
index 7ec85d0..8a696ff 100644
--- a/iocore/net/UnixUDPNet.cc
+++ b/iocore/net/UnixUDPNet.cc
@@ -340,7 +340,7 @@ UDPReadContinuation::readPollEvent(int event_, Event * e)
}
//ink_assert(ifd < 0 || event_ == EVENT_INTERVAL || (event_ == EVENT_POLL && pc->pollDescriptor->nfds > ifd && pc->pollDescriptor->pfd[ifd].fd == fd));
//if (ifd < 0 || event_ == EVENT_INTERVAL || (pc->pollDescriptor->pfd[ifd].revents & POLLIN)) {
- ink_debug_assert(!"incomplete");
+ ink_assert(!"incomplete");
c = completionUtil::getContinuation(event);
// do read
socklen_t tmp_fromlen = *fromaddrlen;
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/dc6e42c6/lib/records/I_RecProcess.h
----------------------------------------------------------------------
diff --git a/lib/records/I_RecProcess.h b/lib/records/I_RecProcess.h
index e5c0506..3664e2e 100644
--- a/lib/records/I_RecProcess.h
+++ b/lib/records/I_RecProcess.h
@@ -118,7 +118,7 @@ int64_t *RecGetGlobalRawStatCountPtr(RecRawStatBlock * rsb, int id);
inline RecRawStat *
raw_stat_get_tlp(RecRawStatBlock * rsb, int id, EThread * ethread)
{
- ink_debug_assert((id >= 0) && (id < rsb->max_stats));
+ ink_assert((id >= 0) && (id < rsb->max_stats));
if (ethread == NULL) {
ethread = this_ethread();
}
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/dc6e42c6/lib/records/P_RecCore.cc
----------------------------------------------------------------------
diff --git a/lib/records/P_RecCore.cc b/lib/records/P_RecCore.cc
index 59a18fc..3a8a992 100644
--- a/lib/records/P_RecCore.cc
+++ b/lib/records/P_RecCore.cc
@@ -257,7 +257,7 @@ recv_message_cb(RecMessage * msg, RecMessageT msg_type, void */* cookie */)
break;
default:
- ink_debug_assert(!"Unexpected RecG type");
+ ink_assert(!"Unexpected RecG type");
return REC_ERR_FAIL;
}
@@ -270,7 +270,7 @@ recv_message_cb(RecMessage * msg, RecMessageT msg_type, void */* cookie */)
// RecRegisterStatXXX
//-------------------------------------------------------------------------
#define REC_REGISTER_STAT_XXX(A, B) \
- ink_debug_assert((rec_type == RECT_NODE) || \
+ ink_assert((rec_type == RECT_NODE) || \
(rec_type == RECT_CLUSTER) || \
(rec_type == RECT_PROCESS) || \
(rec_type == RECT_LOCAL) || \
@@ -340,7 +340,7 @@ RecRegisterConfigInt(RecT rec_type, const char *name,
RecInt data_default, RecUpdateT update_type,
RecCheckT check_type, const char *check_regex, RecAccessT access_type)
{
- ink_debug_assert((rec_type == RECT_CONFIG) || (rec_type == RECT_LOCAL));
+ ink_assert((rec_type == RECT_CONFIG) || (rec_type == RECT_LOCAL));
REC_REGISTER_CONFIG_XXX(rec_int, RECD_INT);
}
@@ -349,7 +349,7 @@ RecRegisterConfigFloat(RecT rec_type, const char *name,
RecFloat data_default, RecUpdateT update_type,
RecCheckT check_type, const char *check_regex, RecAccessT access_type)
{
- ink_debug_assert((rec_type == RECT_CONFIG) || (rec_type == RECT_LOCAL));
+ ink_assert((rec_type == RECT_CONFIG) || (rec_type == RECT_LOCAL));
REC_REGISTER_CONFIG_XXX(rec_float, RECD_FLOAT);
}
@@ -360,7 +360,7 @@ RecRegisterConfigString(RecT rec_type, const char *name,
RecCheckT check_type, const char *check_regex, RecAccessT access_type)
{
RecString data_default = (RecString)data_default_tmp;
- ink_debug_assert((rec_type == RECT_CONFIG) || (rec_type == RECT_LOCAL));
+ ink_assert((rec_type == RECT_CONFIG) || (rec_type == RECT_LOCAL));
REC_REGISTER_CONFIG_XXX(rec_string, RECD_STRING);
}
@@ -369,7 +369,7 @@ RecRegisterConfigCounter(RecT rec_type, const char *name,
RecCounter data_default, RecUpdateT update_type,
RecCheckT check_type, const char *check_regex, RecAccessT access_type)
{
- ink_debug_assert((rec_type == RECT_CONFIG) || (rec_type == RECT_LOCAL));
+ ink_assert((rec_type == RECT_CONFIG) || (rec_type == RECT_LOCAL));
REC_REGISTER_CONFIG_XXX(rec_counter, RECD_COUNTER);
}
@@ -835,7 +835,7 @@ RecSyncConfigToTB(textBuffer * tb)
tb->copyFrom("LOCAL ", 6);
break;
default:
- ink_debug_assert(!"Unexpected RecT type");
+ ink_assert(!"Unexpected RecT type");
break;
}
// name
@@ -867,7 +867,7 @@ RecSyncConfigToTB(textBuffer * tb)
tb->copyFrom(b, strlen(b));
break;
default:
- ink_debug_assert(!"Unexpected RecD type");
+ ink_assert(!"Unexpected RecD type");
break;
}
tb->copyFrom("\n", 1);
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/dc6e42c6/lib/records/RecCore.cc
----------------------------------------------------------------------
diff --git a/lib/records/RecCore.cc b/lib/records/RecCore.cc
index 2ee7233..ce9818e 100644
--- a/lib/records/RecCore.cc
+++ b/lib/records/RecCore.cc
@@ -337,7 +337,7 @@ RecRegisterConfigUpdateCb(const char *name, RecConfigUpdateCb update_cb, void *c
new_callback->next = NULL;
- ink_debug_assert(new_callback);
+ ink_assert(new_callback);
if (!r->config_meta.update_cb_list) {
r->config_meta.update_cb_list = new_callback;
} else {
@@ -346,8 +346,8 @@ RecRegisterConfigUpdateCb(const char *name, RecConfigUpdateCb update_cb, void *c
for (cur_callback = r->config_meta.update_cb_list; cur_callback; cur_callback = cur_callback->next) {
prev_callback = cur_callback;
}
- ink_debug_assert(prev_callback);
- ink_debug_assert(!prev_callback->next);
+ ink_assert(prev_callback);
+ ink_assert(!prev_callback->next);
prev_callback->next = new_callback;
}
err = REC_ERR_OKAY;
@@ -550,7 +550,7 @@ RecGetRecordUpdateType(const char *name, RecUpdateT *update_type, bool lock)
*update_type = r->config_meta.update_type;
err = REC_ERR_OKAY;
} else {
- ink_debug_assert(!"rec_type is not CONFIG");
+ ink_assert(!"rec_type is not CONFIG");
}
rec_mutex_release(&(r->lock));
}
@@ -579,7 +579,7 @@ RecGetRecordCheckType(const char *name, RecCheckT *check_type, bool lock)
*check_type = r->config_meta.check_type;
err = REC_ERR_OKAY;
} else {
- ink_debug_assert(!"rec_type is not CONFIG");
+ ink_assert(!"rec_type is not CONFIG");
}
rec_mutex_release(&(r->lock));
}
@@ -608,7 +608,7 @@ RecGetRecordCheckExpr(const char *name, char **check_expr, bool lock)
*check_expr = r->config_meta.check_expr;
err = REC_ERR_OKAY;
} else {
- ink_debug_assert(!"rec_type is not CONFIG");
+ ink_assert(!"rec_type is not CONFIG");
}
rec_mutex_release(&(r->lock));
}
@@ -652,7 +652,7 @@ RecGetRecordDefaultDataString_Xmalloc(char *name, char **buf, bool lock)
snprintf(*buf, 1023, "%" PRId64 "", r->data_default.rec_counter);
break;
default:
- ink_debug_assert(!"Unexpected RecD type");
+ ink_assert(!"Unexpected RecD type");
ats_free(*buf);
*buf = NULL;
break;
@@ -727,7 +727,7 @@ RecRegisterStat(RecT rec_type, const char *name, RecDataT data_type, RecData dat
if ((r = register_record(rec_type, name, data_type, data_default)) != NULL) {
r->stat_meta.persist_type = persist_type;
} else {
- ink_debug_assert(!"Can't register record!");
+ ink_assert(!"Can't register record!");
}
ink_rwlock_unlock(&g_records_rwlock);
@@ -1027,7 +1027,7 @@ REC_ConfigReadCounter(const char *name)
RecInt
REC_readInteger(const char *name, bool * found, bool lock)
{
- ink_debug_assert(name);
+ ink_assert(name);
RecInt _tmp = 0;
bool _found;
_found = (RecGetRecordInt(name, &_tmp, lock) == REC_ERR_OKAY);
@@ -1039,7 +1039,7 @@ REC_readInteger(const char *name, bool * found, bool lock)
RecFloat
REC_readFloat(char *name, bool * found, bool lock)
{
- ink_debug_assert(name);
+ ink_assert(name);
RecFloat _tmp = 0.0;
bool _found;
_found = (RecGetRecordFloat(name, &_tmp, lock) == REC_ERR_OKAY);
@@ -1051,7 +1051,7 @@ REC_readFloat(char *name, bool * found, bool lock)
RecCounter
REC_readCounter(char *name, bool * found, bool lock)
{
- ink_debug_assert(name);
+ ink_assert(name);
RecCounter _tmp = 0;
bool _found;
_found = (RecGetRecordCounter(name, &_tmp, lock) == REC_ERR_OKAY);
@@ -1063,7 +1063,7 @@ REC_readCounter(char *name, bool * found, bool lock)
RecString
REC_readString(const char *name, bool * found, bool lock)
{
- ink_debug_assert(name);
+ ink_assert(name);
RecString _tmp = NULL;
bool _found;
_found = (RecGetRecordString_Xmalloc(name, &_tmp, lock) == REC_ERR_OKAY);
@@ -1102,7 +1102,7 @@ RecRegisterManagerCb(int _signal, RecManagerCb _fn, void *_data)
void
RecSignalManager(int id, const char *msg)
{
- ink_debug_assert(pmgmt);
+ ink_assert(pmgmt);
pmgmt->signalManager(id, msg);
}
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/dc6e42c6/lib/records/RecLocal.cc
----------------------------------------------------------------------
diff --git a/lib/records/RecLocal.cc b/lib/records/RecLocal.cc
index 90cee83..51b5c8e 100644
--- a/lib/records/RecLocal.cc
+++ b/lib/records/RecLocal.cc
@@ -48,7 +48,7 @@ i_am_the_record_owner(RecT rec_type)
case RECT_PLUGIN:
return false;
default:
- ink_debug_assert(!"Unexpected RecT type");
+ ink_assert(!"Unexpected RecT type");
return false;
}
}
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/dc6e42c6/lib/records/RecMessage.cc
----------------------------------------------------------------------
diff --git a/lib/records/RecMessage.cc b/lib/records/RecMessage.cc
index 17b36e2..32fc8b6 100644
--- a/lib/records/RecMessage.cc
+++ b/lib/records/RecMessage.cc
@@ -162,7 +162,7 @@ RecMessageInit()
case RECM_NULL:
case RECM_STAND_ALONE:
default:
- ink_debug_assert(!"Unexpected RecModeT type");
+ ink_assert(!"Unexpected RecModeT type");
break;
}
@@ -435,7 +435,7 @@ RecMessageUnmarshalNext(RecMessage * msg, RecMessageItr * itr, RecRecord ** reco
eh = itr->ele_hdr;
}
- ink_debug_assert(eh->magic == REC_MESSAGE_ELE_MAGIC);
+ ink_assert(eh->magic == REC_MESSAGE_ELE_MAGIC);
// If the file is corrupt, ignore the the rest of the file.
if (eh->magic != REC_MESSAGE_ELE_MAGIC) {
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/dc6e42c6/lib/records/RecProcess.cc
----------------------------------------------------------------------
diff --git a/lib/records/RecProcess.cc b/lib/records/RecProcess.cc
index a85e2a0..e1c9813 100644
--- a/lib/records/RecProcess.cc
+++ b/lib/records/RecProcess.cc
@@ -58,7 +58,7 @@ i_am_the_record_owner(RecT rec_type)
case RECT_LOCAL:
return false;
default:
- ink_debug_assert(!"Unexpected RecT type");
+ ink_assert(!"Unexpected RecT type");
return false;
}
} else if (g_mode_type == RECM_STAND_ALONE) {
@@ -71,7 +71,7 @@ i_am_the_record_owner(RecT rec_type)
case RECT_PLUGIN:
return true;
default:
- ink_debug_assert(!"Unexpected RecT type");
+ ink_assert(!"Unexpected RecT type");
return false;
}
}
@@ -505,7 +505,7 @@ RecRegisterRawStat(RecRawStatBlock *rsb, RecT rec_type, const char *name, RecDat
Debug("stats", "RecRawStatSyncCb(%s): rsb pointer:%p id:%d\n", name, rsb, id);
// check to see if we're good to proceed
- ink_debug_assert(id < rsb->max_stats);
+ ink_assert(id < rsb->max_stats);
int err = REC_ERR_OKAY;
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/dc6e42c6/lib/records/RecUtils.cc
----------------------------------------------------------------------
diff --git a/lib/records/RecUtils.cc b/lib/records/RecUtils.cc
index 3680fee..84e036a 100644
--- a/lib/records/RecUtils.cc
+++ b/lib/records/RecUtils.cc
@@ -338,7 +338,7 @@ RecDataSetFromInk64(RecDataT data_type, RecData * data_dst, int64_t data_int64)
data_dst->rec_counter = data_int64;
break;
default:
- ink_debug_assert(!"Unexpected RecD type");
+ ink_assert(!"Unexpected RecD type");
return false;
}
@@ -378,7 +378,7 @@ RecDataSetFromFloat(RecDataT data_type, RecData * data_dst, float data_float)
data_dst->rec_counter = (RecCounter) data_float;
break;
default:
- ink_debug_assert(!"Unexpected RecD type");
+ ink_assert(!"Unexpected RecD type");
return false;
}
@@ -418,7 +418,7 @@ RecDataSetFromString(RecDataT data_type, RecData * data_dst, char *data_string)
data_src.rec_counter = ink_atoi64(data_string);
break;
default:
- ink_debug_assert(!"Unexpected RecD type");
+ ink_assert(!"Unexpected RecD type");
return false;
}
rec_set = RecDataSet(data_type, data_dst, &data_src);
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/dc6e42c6/lib/records/test_RecProcess.i
----------------------------------------------------------------------
diff --git a/lib/records/test_RecProcess.i b/lib/records/test_RecProcess.i
index f7d2134..84efe51 100644
--- a/lib/records/test_RecProcess.i
+++ b/lib/records/test_RecProcess.i
@@ -585,7 +585,7 @@ TreeTest01()
int buf_len = 0;
RecGetRecordList("proxy.config", &var_buf, &buf_len);
for (int i = 0; i < buf_len; i++) {
- ink_debug_assert(var_buf[i]);
+ ink_assert(var_buf[i]);
diags->print(NULL, DL_Note, NULL, NULL, "\tRecTree node: (proxy.config.*) %s", var_buf[i]);
}
delete[]var_buf;
@@ -614,7 +614,7 @@ TreeTest02()
int buf_len = 0;
RecGetRecordList("proxy.process", &var_buf, &buf_len);
for (int i = 0; i < buf_len; i++) {
- ink_debug_assert(var_buf[i]);
+ ink_assert(var_buf[i]);
diags->print(NULL, DL_Note, NULL, NULL, "\tRecTree (proxy.process.*) node: %s", var_buf[i]);
}
delete[]var_buf;
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/dc6e42c6/lib/ts/Regression.cc
----------------------------------------------------------------------
diff --git a/lib/ts/Regression.cc b/lib/ts/Regression.cc
index 5840696..d7f5918 100644
--- a/lib/ts/Regression.cc
+++ b/lib/ts/Regression.cc
@@ -70,7 +70,7 @@ RegressionTest::RegressionTest(const char *name_arg, TestFunction * function_arg
static inline int
start_test(RegressionTest * t)
{
- ink_debug_assert(t->status == REGRESSION_TEST_NOT_RUN);
+ ink_assert(t->status == REGRESSION_TEST_NOT_RUN);
t->status = REGRESSION_TEST_INPROGRESS;
fprintf(stderr, "REGRESSION TEST %s started\n", t->name);
(*t->function) (t, regression_level, &t->status);
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/dc6e42c6/lib/ts/Trie.h
----------------------------------------------------------------------
diff --git a/lib/ts/Trie.h b/lib/ts/Trie.h
index eb5363b..257ab2a 100644
--- a/lib/ts/Trie.h
+++ b/lib/ts/Trie.h
@@ -74,7 +74,7 @@ private:
inline Node* GetChild(char index) const { return children[static_cast<unsigned char>(index)]; }
inline Node* AllocateChild(char index) {
Node * &child = children[static_cast<unsigned char>(index)];
- ink_debug_assert(child == NULL);
+ ink_assert(child == NULL);
child = static_cast<Node*>(ats_malloc(sizeof(Node)));
child->Clear();
return child;
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/dc6e42c6/lib/ts/ink_assert.h
----------------------------------------------------------------------
diff --git a/lib/ts/ink_assert.h b/lib/ts/ink_assert.h
index fb1cb90..bf490cc 100644
--- a/lib/ts/ink_assert.h
+++ b/lib/ts/ink_assert.h
@@ -48,14 +48,10 @@ extern "C"
#ifdef DEBUG
#define ink_assert(EX) ( \
- (void)(likely(EX) ? (void)0 : _ink_assert(#EX, __FILE__, __LINE__)) \
-)
-#define ink_debug_assert(EX) ( \
- (void)(likely(EX) ? (void)0 : _ink_assert(#EX, __FILE__, __LINE__)) \
+ (void)(likely(EX) ? (void)0 : _ink_assert(#EX, __FILE__, __LINE__))\
)
#else
#define ink_assert(EX) (void)(EX)
-#define ink_debug_assert(EX)
#endif
#define ink_release_assert(EX) ( \
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/dc6e42c6/lib/ts/ink_hrtime.cc
----------------------------------------------------------------------
diff --git a/lib/ts/ink_hrtime.cc b/lib/ts/ink_hrtime.cc
index 4dbb469..7b2a459 100644
--- a/lib/ts/ink_hrtime.cc
+++ b/lib/ts/ink_hrtime.cc
@@ -144,7 +144,7 @@ squid_timestamp_to_buf(char *buf, unsigned int buf_size, long timestamp_sec, lon
unsigned int num_chars_s;
char *ts_s = int64_to_str(tmp_buf, tmp_buf_size - 4, timestamp_sec, &num_chars_s, 0, '0');
- ink_debug_assert(ts_s);
+ ink_assert(ts_s);
// convert milliseconds
//
@@ -152,7 +152,7 @@ squid_timestamp_to_buf(char *buf, unsigned int buf_size, long timestamp_sec, lon
int ms = timestamp_usec / 1000;
unsigned int num_chars_ms;
char ATS_UNUSED *ts_ms = int64_to_str(&tmp_buf[tmp_buf_size - 4], 4, ms, &num_chars_ms, 4, '0');
- ink_debug_assert(ts_ms && num_chars_ms == 4);
+ ink_assert(ts_ms && num_chars_ms == 4);
unsigned int chars_to_write = num_chars_s + 3; // no eos
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/dc6e42c6/mgmt/LocalManager.cc
----------------------------------------------------------------------
diff --git a/mgmt/LocalManager.cc b/mgmt/LocalManager.cc
index f72d8e5..be83768 100644
--- a/mgmt/LocalManager.cc
+++ b/mgmt/LocalManager.cc
@@ -229,7 +229,7 @@ LocalManager::LocalManager(char *mpath, bool proxy_on)
virt_map = NULL;
RecInt http_enabled = REC_readInteger("proxy.config.http.enabled", &found);
- ink_debug_assert(found);
+ ink_assert(found);
if (http_enabled && found) {
HttpProxyPort::loadConfig(m_proxy_ports);
}
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/dc6e42c6/mgmt/RecordsConfig.cc
----------------------------------------------------------------------
diff --git a/mgmt/RecordsConfig.cc b/mgmt/RecordsConfig.cc
index 240f72c..6735615 100644
--- a/mgmt/RecordsConfig.cc
+++ b/mgmt/RecordsConfig.cc
@@ -1956,7 +1956,7 @@ LibRecordsConfigInit()
break;
default:
- ink_debug_assert(true);
+ ink_assert(true);
break;
} // switch
@@ -1983,7 +1983,7 @@ LibRecordsConfigInit()
break;
default:
- ink_debug_assert(true);
+ ink_assert(true);
break;
} // switch
}
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/dc6e42c6/mgmt/api/INKMgmtAPI.cc
----------------------------------------------------------------------
diff --git a/mgmt/api/INKMgmtAPI.cc b/mgmt/api/INKMgmtAPI.cc
index 0b0a1e7..a278ffd 100644
--- a/mgmt/api/INKMgmtAPI.cc
+++ b/mgmt/api/INKMgmtAPI.cc
@@ -1910,8 +1910,8 @@ TSEncryptPassword(char *passwd, char **e_passwd)
char *passwd_md5_str;
int passwd_md5_str_len = 32;
- ink_debug_assert(passwd);
- ink_debug_assert(TS_ENCRYPT_PASSWD_LEN <= passwd_md5_str_len);
+ ink_assert(passwd);
+ ink_assert(TS_ENCRYPT_PASSWD_LEN <= passwd_md5_str_len);
const size_t md5StringSize = (passwd_md5_str_len + 1) * sizeof(char);
passwd_md5_str = (char *)ats_malloc(md5StringSize);
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/dc6e42c6/mgmt/cluster/ClusterCom.cc
----------------------------------------------------------------------
diff --git a/mgmt/cluster/ClusterCom.cc b/mgmt/cluster/ClusterCom.cc
index 6f15a91..5e55b46 100644
--- a/mgmt/cluster/ClusterCom.cc
+++ b/mgmt/cluster/ClusterCom.cc
@@ -909,7 +909,7 @@ ClusterCom::handleMultiCastStatPacket(char *last, ClusterPeerInfo * peer)
mgmt_elog("[ClusterCom::handleMultiCastStatPacket] Invalid message-line(%d) '%s'\n", __LINE__, line);
return;
}
- ink_debug_assert(i == tmp_id && rec->data_type == tmp_type);
+ ink_assert(i == tmp_id && rec->data_type == tmp_type);
ink_release_assert(i == tmp_id && rec->data_type == tmp_type);
if (!(i == tmp_id && rec->data_type == tmp_type)) {
return;
@@ -930,7 +930,7 @@ ClusterCom::handleMultiCastStatPacket(char *last, ClusterPeerInfo * peer)
mgmt_elog("[ClusterCom::handleMultiCastStatPacket] Invalid message-line(%d) '%s'\n", __LINE__, line);
return;
}
- ink_debug_assert(i == tmp_id && rec->data_type == tmp_type);
+ ink_assert(i == tmp_id && rec->data_type == tmp_type);
ink_release_assert(i == tmp_id && rec->data_type == tmp_type);
if (!(i == tmp_id && rec->data_type == tmp_type)) {
return;
@@ -950,7 +950,7 @@ ClusterCom::handleMultiCastStatPacket(char *last, ClusterPeerInfo * peer)
return;
}
tmp_msg_val = &line[ccons];
- ink_debug_assert(i == tmp_id && rec->data_type == tmp_type);
+ ink_assert(i == tmp_id && rec->data_type == tmp_type);
ink_release_assert(i == tmp_id && rec->data_type == tmp_type);
if (!(i == tmp_id && rec->data_type == tmp_type)) {
return;
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/dc6e42c6/mgmt/stats/StatProcessor.cc
----------------------------------------------------------------------
diff --git a/mgmt/stats/StatProcessor.cc b/mgmt/stats/StatProcessor.cc
index 279740d..96df01b 100644
--- a/mgmt/stats/StatProcessor.cc
+++ b/mgmt/stats/StatProcessor.cc
@@ -68,7 +68,7 @@ startElement(void *userData, const char *name, const char **atts)
Debug(MODULE_INIT, "\nStat #: ----------------------- %d -----------------------\n", statCount);
for (i = 0; atts[i]; i += 2) {
- ink_debug_assert(atts[i + 1]); // Attribute comes in pairs, hopefully.
+ ink_assert(atts[i + 1]); // Attribute comes in pairs, hopefully.
if (!strcmp(atts[i], "minimum")) {
statObject->m_stats_min = (MgmtFloat) atof(atts[i + 1]);
@@ -96,7 +96,7 @@ startElement(void *userData, const char *name, const char **atts)
sumClusterVar = true; // Should only be used with cluster variable
for (i = 0; atts[i]; i += 2) {
- ink_debug_assert(atts[i + 1]); // Attribute comes in pairs, hopefully.
+ ink_assert(atts[i + 1]); // Attribute comes in pairs, hopefully.
if (!strcmp(atts[i], "scope")) {
nodeVar = (!strcmp(atts[i + 1], "node") ? true : false);
} else if (!strcmp(atts[i], "operation")) {