MCPcopy Create free account
hub / github.com/ElementsProject/elements / UnregisterHTTPHandler

Function UnregisterHTTPHandler

src/httpserver.cpp:651–664  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

649}
650
651void UnregisterHTTPHandler(const std::string &prefix, bool exactMatch)
652{
653 LOCK(g_httppathhandlers_mutex);
654 std::vector<HTTPPathHandler>::iterator i = pathHandlers.begin();
655 std::vector<HTTPPathHandler>::iterator iend = pathHandlers.end();
656 for (; i != iend; ++i)
657 if (i->prefix == prefix && i->exactMatch == exactMatch)
658 break;
659 if (i != iend)
660 {
661 LogPrint(BCLog::HTTP, "Unregistering HTTP handler for %s (exactmatch %d)\n", prefix, exactMatch);
662 pathHandlers.erase(i);
663 }
664}

Callers 2

StopRESTFunction · 0.85
StopHTTPRPCFunction · 0.85

Calls 3

beginMethod · 0.45
endMethod · 0.45
eraseMethod · 0.45

Tested by

no test coverage detected