No longer include llerrorlegacy.h. Updated llstl to include deletion utilites.
This commit is contained in:
@@ -84,7 +84,7 @@ void ll_debug_poll_fd(const char* msg, const apr_pollfd_t* poll)
|
||||
#if LL_DEBUG_POLL_FILE_DESCRIPTORS
|
||||
if(!poll)
|
||||
{
|
||||
lldebugs << "Poll -- " << (msg?msg:"") << ": no pollfd." << llendl;
|
||||
LL_DEBUGS() << "Poll -- " << (msg?msg:"") << ": no pollfd." << LL_ENDL;
|
||||
return;
|
||||
}
|
||||
if(poll->desc.s)
|
||||
@@ -92,13 +92,13 @@ void ll_debug_poll_fd(const char* msg, const apr_pollfd_t* poll)
|
||||
apr_os_sock_t os_sock;
|
||||
if(APR_SUCCESS == apr_os_sock_get(&os_sock, poll->desc.s))
|
||||
{
|
||||
lldebugs << "Poll -- " << (msg?msg:"") << " on fd " << os_sock
|
||||
<< " at " << poll->desc.s << llendl;
|
||||
LL_DEBUGS() << "Poll -- " << (msg?msg:"") << " on fd " << os_sock
|
||||
<< " at " << poll->desc.s << LL_ENDL;
|
||||
}
|
||||
else
|
||||
{
|
||||
lldebugs << "Poll -- " << (msg?msg:"") << " no fd "
|
||||
<< " at " << poll->desc.s << llendl;
|
||||
LL_DEBUGS() << "Poll -- " << (msg?msg:"") << " no fd "
|
||||
<< " at " << poll->desc.s << LL_ENDL;
|
||||
}
|
||||
}
|
||||
else if(poll->desc.f)
|
||||
@@ -106,18 +106,18 @@ void ll_debug_poll_fd(const char* msg, const apr_pollfd_t* poll)
|
||||
apr_os_file_t os_file;
|
||||
if(APR_SUCCESS == apr_os_file_get(&os_file, poll->desc.f))
|
||||
{
|
||||
lldebugs << "Poll -- " << (msg?msg:"") << " on fd " << os_file
|
||||
<< " at " << poll->desc.f << llendl;
|
||||
LL_DEBUGS() << "Poll -- " << (msg?msg:"") << " on fd " << os_file
|
||||
<< " at " << poll->desc.f << LL_ENDL;
|
||||
}
|
||||
else
|
||||
{
|
||||
lldebugs << "Poll -- " << (msg?msg:"") << " no fd "
|
||||
<< " at " << poll->desc.f << llendl;
|
||||
LL_DEBUGS() << "Poll -- " << (msg?msg:"") << " no fd "
|
||||
<< " at " << poll->desc.f << LL_ENDL;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
lldebugs << "Poll -- " << (msg?msg:"") << ": no descriptor." << llendl;
|
||||
LL_DEBUGS() << "Poll -- " << (msg?msg:"") << ": no descriptor." << LL_ENDL;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
@@ -185,7 +185,7 @@ LLPumpIO::~LLPumpIO()
|
||||
{
|
||||
if(mPollset)
|
||||
{
|
||||
// lldebugs << "cleaning up pollset" << llendl;
|
||||
// LL_DEBUGS() << "cleaning up pollset" << LL_ENDL;
|
||||
apr_pollset_destroy(mPollset);
|
||||
mPollset = NULL;
|
||||
}
|
||||
@@ -202,10 +202,10 @@ bool LLPumpIO::addChain(chain_t const& chain, F32 timeout)
|
||||
info.mData = LLIOPipe::buffer_ptr_t(new LLBufferArray);
|
||||
LLLinkInfo link;
|
||||
#if LL_DEBUG_PIPE_TYPE_IN_PUMP
|
||||
lldebugs << "LLPumpIO::addChain() " << chain[0] << " '"
|
||||
<< typeid(*(chain[0])).name() << "'" << llendl;
|
||||
LL_DEBUGS() << "LLPumpIO::addChain() " << chain[0] << " '"
|
||||
<< typeid(*(chain[0])).name() << "'" << LL_ENDL;
|
||||
#else
|
||||
lldebugs << "LLPumpIO::addChain() " << chain[0] <<llendl;
|
||||
LL_DEBUGS() << "LLPumpIO::addChain() " << chain[0] <<LL_ENDL;
|
||||
#endif
|
||||
for(; it != end; ++it)
|
||||
{
|
||||
@@ -237,10 +237,10 @@ bool LLPumpIO::addChain(
|
||||
if (link == end) return false;
|
||||
|
||||
#if LL_DEBUG_PIPE_TYPE_IN_PUMP
|
||||
lldebugs << "LLPumpIO::addChain() " << links[0].mPipe << " '"
|
||||
<< typeid(*(links[0].mPipe)).name() << "'" << llendl;
|
||||
LL_DEBUGS() << "LLPumpIO::addChain() " << links[0].mPipe << " '"
|
||||
<< typeid(*(links[0].mPipe)).name() << "'" << LL_ENDL;
|
||||
#else
|
||||
lldebugs << "LLPumpIO::addChain() " << links[0].mPipe << llendl;
|
||||
LL_DEBUGS() << "LLPumpIO::addChain() " << links[0].mPipe << LL_ENDL;
|
||||
#endif
|
||||
LLChainInfo info;
|
||||
info.setTimeoutSeconds(timeout);
|
||||
@@ -317,12 +317,12 @@ bool LLPumpIO::setConditional(LLIOPipe* pipe, const apr_pollfd_t* poll)
|
||||
if(!pipe) return false;
|
||||
ll_debug_poll_fd("Set conditional", poll);
|
||||
|
||||
lldebugs << "Setting conditionals (" << (poll ? events_2_string(poll->reqevents) :"null")
|
||||
LL_DEBUGS() << "Setting conditionals (" << (poll ? events_2_string(poll->reqevents) :"null")
|
||||
<< ") "
|
||||
#if LL_DEBUG_PIPE_TYPE_IN_PUMP
|
||||
<< "on pipe " << typeid(*pipe).name()
|
||||
#endif
|
||||
<< " at " << pipe << llendl;
|
||||
<< " at " << pipe << LL_ENDL;
|
||||
|
||||
// remove any matching poll file descriptors for this pipe.
|
||||
LLIOPipe::ptr_t pipe_ptr(pipe);
|
||||
@@ -456,7 +456,7 @@ LLPumpIO::current_chain_t LLPumpIO::removeRunningChain(LLPumpIO::current_chain_t
|
||||
void LLPumpIO::pump(const S32& poll_timeout)
|
||||
{
|
||||
LLFastTimer t1(FTM_PUMP_IO);
|
||||
//llinfos << "LLPumpIO::pump()" << llendl;
|
||||
//LL_INFOS() << "LLPumpIO::pump()" << LL_ENDL;
|
||||
|
||||
// Run any pending runners.
|
||||
mRunner.run();
|
||||
@@ -484,7 +484,7 @@ void LLPumpIO::pump(const S32& poll_timeout)
|
||||
if(!mPendingChains.empty())
|
||||
{
|
||||
PUMP_DEBUG;
|
||||
//lldebugs << "Pushing " << mPendingChains.size() << "." << llendl;
|
||||
//LL_DEBUGS() << "Pushing " << mPendingChains.size() << "." << LL_ENDL;
|
||||
std::copy(
|
||||
mPendingChains.begin(),
|
||||
mPendingChains.end(),
|
||||
@@ -532,7 +532,7 @@ void LLPumpIO::pump(const S32& poll_timeout)
|
||||
if(mPollset)
|
||||
{
|
||||
PUMP_DEBUG;
|
||||
//llinfos << "polling" << llendl;
|
||||
//LL_INFOS() << "polling" << LL_ENDL;
|
||||
S32 count = 0;
|
||||
S32 client_id = 0;
|
||||
{
|
||||
@@ -554,7 +554,7 @@ void LLPumpIO::pump(const S32& poll_timeout)
|
||||
signal_client_t::iterator not_signalled = signalled_client.end();
|
||||
|
||||
// Process everything as appropriate
|
||||
//lldebugs << "Running chain count: " << mRunningChains.size() << llendl;
|
||||
//LL_DEBUGS() << "Running chain count: " << mRunningChains.size() << LL_ENDL;
|
||||
running_chains_t::iterator run_chain = mRunningChains.begin();
|
||||
bool process_this_chain = false;
|
||||
while( run_chain != mRunningChains.end() )
|
||||
@@ -574,9 +574,9 @@ void LLPumpIO::pump(const S32& poll_timeout)
|
||||
&& (*run_chain).mTimer.hasExpired())
|
||||
{
|
||||
PUMP_DEBUG;
|
||||
llinfos << "Error handler forgot to reset timeout. "
|
||||
LL_INFOS() << "Error handler forgot to reset timeout. "
|
||||
<< "Resetting to " << DEFAULT_CHAIN_EXPIRY_SECS
|
||||
<< " seconds." << llendl;
|
||||
<< " seconds." << LL_ENDL;
|
||||
(*run_chain).setTimeoutSeconds(DEFAULT_CHAIN_EXPIRY_SECS);
|
||||
}
|
||||
}
|
||||
@@ -586,15 +586,15 @@ void LLPumpIO::pump(const S32& poll_timeout)
|
||||
// it timed out and no one handled it, so we need to
|
||||
// retire the chain
|
||||
#if LL_DEBUG_PIPE_TYPE_IN_PUMP
|
||||
lldebugs << "Removing chain "
|
||||
LL_DEBUGS() << "Removing chain "
|
||||
<< (*run_chain).mChainLinks[0].mPipe
|
||||
<< " '"
|
||||
<< typeid(*((*run_chain).mChainLinks[0].mPipe)).name()
|
||||
<< "' because it timed out." << llendl;
|
||||
<< "' because it timed out." << LL_ENDL;
|
||||
#else
|
||||
// lldebugs << "Removing chain "
|
||||
// LL_DEBUGS() << "Removing chain "
|
||||
// << (*run_chain).mChainLinks[0].mPipe
|
||||
// << " because we reached the end." << llendl;
|
||||
// << " because we reached the end." << LL_ENDL;
|
||||
#endif
|
||||
run_chain = removeRunningChain(run_chain);
|
||||
continue;
|
||||
@@ -619,12 +619,12 @@ void LLPumpIO::pump(const S32& poll_timeout)
|
||||
{
|
||||
// if there are no conditionals, just process this chain.
|
||||
process_this_chain = true;
|
||||
//lldebugs << "no conditionals - processing" << llendl;
|
||||
//LL_DEBUGS() << "no conditionals - processing" << LL_ENDL;
|
||||
}
|
||||
else
|
||||
{
|
||||
PUMP_DEBUG;
|
||||
//lldebugs << "checking conditionals" << llendl;
|
||||
//LL_DEBUGS() << "checking conditionals" << LL_ENDL;
|
||||
// Check if this run chain was signalled. If any file
|
||||
// descriptor is ready for something, then go ahead and
|
||||
// process this chian.
|
||||
@@ -664,7 +664,7 @@ void LLPumpIO::pump(const S32& poll_timeout)
|
||||
error_status = LLIOPipe::STATUS_ERROR;
|
||||
if(handleChainError(*run_chain, error_status)) break;
|
||||
ll_debug_poll_fd("Removing pipe", poll);
|
||||
llwarns << "Removing pipe "
|
||||
LL_WARNS() << "Removing pipe "
|
||||
<< (*run_chain).mChainLinks[0].mPipe
|
||||
<< " '"
|
||||
#if LL_DEBUG_PIPE_TYPE_IN_PUMP
|
||||
@@ -673,7 +673,7 @@ void LLPumpIO::pump(const S32& poll_timeout)
|
||||
#endif
|
||||
<< "' because: "
|
||||
<< events_2_string(poll->rtnevents)
|
||||
<< llendl;
|
||||
<< LL_ENDL;
|
||||
(*run_chain).mHead = (*run_chain).mChainLinks.end();
|
||||
break;
|
||||
}
|
||||
@@ -701,13 +701,13 @@ void LLPumpIO::pump(const S32& poll_timeout)
|
||||
if((*run_chain).mHead == (*run_chain).mChainLinks.end())
|
||||
{
|
||||
#if LL_DEBUG_PIPE_TYPE_IN_PUMP
|
||||
lldebugs << "Removing chain " << (*run_chain).mChainLinks[0].mPipe
|
||||
LL_DEBUGS() << "Removing chain " << (*run_chain).mChainLinks[0].mPipe
|
||||
<< " '"
|
||||
<< typeid(*((*run_chain).mChainLinks[0].mPipe)).name()
|
||||
<< "' because we reached the end." << llendl;
|
||||
<< "' because we reached the end." << LL_ENDL;
|
||||
#else
|
||||
// lldebugs << "Removing chain " << (*run_chain).mChainLinks[0].mPipe
|
||||
// << " because we reached the end." << llendl;
|
||||
// LL_DEBUGS() << "Removing chain " << (*run_chain).mChainLinks[0].mPipe
|
||||
// << " because we reached the end." << LL_ENDL;
|
||||
#endif
|
||||
|
||||
PUMP_DEBUG;
|
||||
@@ -787,7 +787,7 @@ static LLFastTimer::DeclareTimer FTM_PUMP_CALLBACK_CHAIN("Chain");
|
||||
|
||||
void LLPumpIO::callback()
|
||||
{
|
||||
//llinfos << "LLPumpIO::callback()" << llendl;
|
||||
//LL_INFOS() << "LLPumpIO::callback()" << LL_ENDL;
|
||||
if(true)
|
||||
{
|
||||
#if LL_THREADS_PUMPIO
|
||||
@@ -844,10 +844,10 @@ LLAPRPool& LLPumpIO::initPool()
|
||||
|
||||
void LLPumpIO::rebuildPollset()
|
||||
{
|
||||
// lldebugs << "LLPumpIO::rebuildPollset()" << llendl;
|
||||
// LL_DEBUGS() << "LLPumpIO::rebuildPollset()" << LL_ENDL;
|
||||
if(mPollset)
|
||||
{
|
||||
//lldebugs << "destroying pollset" << llendl;
|
||||
//LL_DEBUGS() << "destroying pollset" << LL_ENDL;
|
||||
apr_pollset_destroy(mPollset);
|
||||
mPollset = NULL;
|
||||
}
|
||||
@@ -858,7 +858,7 @@ void LLPumpIO::rebuildPollset()
|
||||
{
|
||||
size += (*run_it).mDescriptors.size();
|
||||
}
|
||||
//lldebugs << "found " << size << " descriptors." << llendl;
|
||||
//LL_DEBUGS() << "found " << size << " descriptors." << LL_ENDL;
|
||||
if(size)
|
||||
{
|
||||
// Recycle the memory pool
|
||||
@@ -903,10 +903,10 @@ void LLPumpIO::processChain(LLChainInfo& chain)
|
||||
{
|
||||
#if LL_DEBUG_PROCESS_LINK
|
||||
#if LL_DEBUG_PIPE_TYPE_IN_PUMP
|
||||
llinfos << "Processing " << typeid(*((*it).mPipe)).name() << "."
|
||||
<< llendl;
|
||||
LL_INFOS() << "Processing " << typeid(*((*it).mPipe)).name() << "."
|
||||
<< LL_ENDL;
|
||||
#else
|
||||
llinfos << "Processing link " << (*it).mPipe << "." << llendl;
|
||||
LL_INFOS() << "Processing link " << (*it).mPipe << "." << LL_ENDL;
|
||||
#endif
|
||||
#endif
|
||||
#if LL_DEBUG_SPEW_BUFFER_CHANNEL_IN
|
||||
@@ -923,15 +923,15 @@ void LLPumpIO::processChain(LLChainInfo& chain)
|
||||
(U8*)buf,
|
||||
bytes);
|
||||
buf[bytes] = '\0';
|
||||
llinfos << "CHANNEL IN(" << (*it).mChannels.in() << "): "
|
||||
<< buf << llendl;
|
||||
LL_INFOS() << "CHANNEL IN(" << (*it).mChannels.in() << "): "
|
||||
<< buf << LL_ENDL;
|
||||
delete[] buf;
|
||||
buf = NULL;
|
||||
}
|
||||
else
|
||||
{
|
||||
llinfos << "CHANNEL IN(" << (*it).mChannels.in()<< "): (null)"
|
||||
<< llendl;
|
||||
LL_INFOS() << "CHANNEL IN(" << (*it).mChannels.in()<< "): (null)"
|
||||
<< LL_ENDL;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -956,15 +956,15 @@ void LLPumpIO::processChain(LLChainInfo& chain)
|
||||
(U8*)buf,
|
||||
bytes);
|
||||
buf[bytes] = '\0';
|
||||
llinfos << "CHANNEL OUT(" << (*it).mChannels.out()<< "): "
|
||||
<< buf << llendl;
|
||||
LL_INFOS() << "CHANNEL OUT(" << (*it).mChannels.out()<< "): "
|
||||
<< buf << LL_ENDL;
|
||||
delete[] buf;
|
||||
buf = NULL;
|
||||
}
|
||||
else
|
||||
{
|
||||
llinfos << "CHANNEL OUT(" << (*it).mChannels.out()<< "): (null)"
|
||||
<< llendl;
|
||||
LL_INFOS() << "CHANNEL OUT(" << (*it).mChannels.out()<< "): (null)"
|
||||
<< LL_ENDL;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -974,11 +974,11 @@ void LLPumpIO::processChain(LLChainInfo& chain)
|
||||
// below.
|
||||
if(LLIOPipe::isSuccess(status))
|
||||
{
|
||||
llinfos << "Pipe returned: '"
|
||||
LL_INFOS() << "Pipe returned: '"
|
||||
#if LL_DEBUG_PIPE_TYPE_IN_PUMP
|
||||
<< typeid(*((*it).mPipe)).name() << "':'"
|
||||
#endif
|
||||
<< LLIOPipe::lookupStatusString(status) << "'" << llendl;
|
||||
<< LLIOPipe::lookupStatusString(status) << "'" << LL_ENDL;
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -1018,12 +1018,12 @@ void LLPumpIO::processChain(LLChainInfo& chain)
|
||||
PUMP_DEBUG;
|
||||
if(LLIOPipe::isError(status))
|
||||
{
|
||||
llinfos << "Pump generated pipe err: '"
|
||||
LL_INFOS() << "Pump generated pipe err: '"
|
||||
#if LL_DEBUG_PIPE_TYPE_IN_PUMP
|
||||
<< typeid(*((*it).mPipe)).name() << "':'"
|
||||
#endif
|
||||
<< LLIOPipe::lookupStatusString(status)
|
||||
<< "'" << llendl;
|
||||
<< "'" << LL_ENDL;
|
||||
#if LL_DEBUG_SPEW_BUFFER_CHANNEL_IN_ON_ERROR
|
||||
if(chain.mData)
|
||||
{
|
||||
@@ -1040,18 +1040,18 @@ void LLPumpIO::processChain(LLChainInfo& chain)
|
||||
(U8*)buf,
|
||||
bytes);
|
||||
buf[bytes] = '\0';
|
||||
llinfos << "Input After Error: " << buf << llendl;
|
||||
LL_INFOS() << "Input After Error: " << buf << LL_ENDL;
|
||||
delete[] buf;
|
||||
buf = NULL;
|
||||
}
|
||||
else
|
||||
{
|
||||
llinfos << "Input After Error: (null)" << llendl;
|
||||
LL_INFOS() << "Input After Error: (null)" << LL_ENDL;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
llinfos << "Input After Error: (null)" << llendl;
|
||||
LL_INFOS() << "Input After Error: (null)" << LL_ENDL;
|
||||
}
|
||||
#endif
|
||||
keep_going = false;
|
||||
@@ -1063,8 +1063,8 @@ void LLPumpIO::processChain(LLChainInfo& chain)
|
||||
}
|
||||
else
|
||||
{
|
||||
llinfos << "Unhandled status code: " << status << ":"
|
||||
<< LLIOPipe::lookupStatusString(status) << llendl;
|
||||
LL_INFOS() << "Unhandled status code: " << status << ":"
|
||||
<< LLIOPipe::lookupStatusString(status) << LL_ENDL;
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -1113,8 +1113,8 @@ bool LLPumpIO::handleChainError(
|
||||
do
|
||||
{
|
||||
#if LL_DEBUG_PIPE_TYPE_IN_PUMP
|
||||
lldebugs << "Passing error to " << typeid(*((*rit).mPipe)).name()
|
||||
<< "." << llendl;
|
||||
LL_DEBUGS() << "Passing error to " << typeid(*((*rit).mPipe)).name()
|
||||
<< "." << LL_ENDL;
|
||||
#endif
|
||||
error = (*rit).mPipe->handleError(error, this);
|
||||
switch(error)
|
||||
@@ -1128,8 +1128,8 @@ bool LLPumpIO::handleChainError(
|
||||
case LLIOPipe::STATUS_BREAK:
|
||||
case LLIOPipe::STATUS_NEED_PROCESS:
|
||||
#if LL_DEBUG_PIPE_TYPE_IN_PUMP
|
||||
lldebugs << "Pipe " << typeid(*((*rit).mPipe)).name()
|
||||
<< " returned code to stop error handler." << llendl;
|
||||
LL_DEBUGS() << "Pipe " << typeid(*((*rit).mPipe)).name()
|
||||
<< " returned code to stop error handler." << LL_ENDL;
|
||||
#endif
|
||||
keep_going = false;
|
||||
break;
|
||||
@@ -1139,8 +1139,8 @@ bool LLPumpIO::handleChainError(
|
||||
default:
|
||||
if(LLIOPipe::isSuccess(error))
|
||||
{
|
||||
llinfos << "Unhandled status code: " << error << ":"
|
||||
<< LLIOPipe::lookupStatusString(error) << llendl;
|
||||
LL_INFOS() << "Unhandled status code: " << error << ":"
|
||||
<< LLIOPipe::lookupStatusString(error) << LL_ENDL;
|
||||
error = LLIOPipe::STATUS_ERROR;
|
||||
keep_going = false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user