From: Alex Rousskov Date: Tue, 1 Feb 2011 08:22:59 +0000 (-0700) Subject: Preserve old registration tag when updating registration info. X-Git-Tag: take01~5^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b04c601b074b210e033ca8c236b172f7699e5eb0;p=thirdparty%2Fsquid.git Preserve old registration tag when updating registration info. Sometimes, tagless strand registers self only after its module (like IpcIoFile) supplies a tag. We need to keep the tag for future tag searches to succeed. --- diff --git a/src/ipc/Coordinator.cc b/src/ipc/Coordinator.cc index f1e6032132..afdec48cad 100644 --- a/src/ipc/Coordinator.cc +++ b/src/ipc/Coordinator.cc @@ -48,10 +48,14 @@ void Ipc::Coordinator::registerStrand(const StrandCoord& strand) { debugs(54, 3, HERE << "registering kid" << strand.kidId << ' ' << strand.tag); - if (StrandCoord* found = findStrand(strand.kidId)) + if (StrandCoord* found = findStrand(strand.kidId)) { + const String oldTag = found->tag; *found = strand; - else + if (oldTag.size() && !strand.tag.size()) + found->tag = oldTag; // keep more detailed info (XXX?) + } else { strands_.push_back(strand); + } // notify searchers waiting for this new strand, if any typedef Searchers::iterator SRI;