Merge pull request #5866 from daira/revert-span-reload
Partially revert #4909, in order to avoid a use-after-free after calling setlogfilter
This commit is contained in:
commit
6205075970
|
@ -8,7 +8,6 @@
|
||||||
#include "fs.h"
|
#include "fs.h"
|
||||||
#include "init.h"
|
#include "init.h"
|
||||||
#include "key_io.h"
|
#include "key_io.h"
|
||||||
#include "net.h"
|
|
||||||
#include "random.h"
|
#include "random.h"
|
||||||
#include "sync.h"
|
#include "sync.h"
|
||||||
#include "ui_interface.h"
|
#include "ui_interface.h"
|
||||||
|
@ -274,14 +273,6 @@ UniValue setlogfilter(const UniValue& params, bool fHelp)
|
||||||
if (!tracing_reload(pTracingHandle, newFilter.c_str())) {
|
if (!tracing_reload(pTracingHandle, newFilter.c_str())) {
|
||||||
throw JSONRPCError(RPC_INTERNAL_ERROR, "Filter reload failed; check logs");
|
throw JSONRPCError(RPC_INTERNAL_ERROR, "Filter reload failed; check logs");
|
||||||
}
|
}
|
||||||
|
|
||||||
// Now that we have reloaded the filter, reload any stored spans.
|
|
||||||
{
|
|
||||||
LOCK(cs_vNodes);
|
|
||||||
for (CNode* pnode : vNodes) {
|
|
||||||
pnode->ReloadTracingSpan();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return NullUniValue;
|
return NullUniValue;
|
||||||
|
|
Loading…
Reference in New Issue