MCPcopy Create free account
hub / github.com/DFHack/dfhack / rpc_connect

Method rpc_connect

library/PluginManager.cpp:647–671  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

645}
646
647RPCService *Plugin::rpc_connect(color_ostream &out)
648{
649 RPCService *rv = NULL;
650
651 access->lock_add();
652
653 if(state == PS_LOADED && plugin_rpcconnect)
654 {
655 rv = plugin_rpcconnect(out);
656 }
657
658 if (rv)
659 {
660 // Retain the access reference
661 assert(!rv->holder);
662 services.push_back(rv);
663 rv->holder = this;
664 return rv;
665 }
666 else
667 {
668 access->lock_sub();
669 return NULL;
670 }
671}
672
673void Plugin::detach_connection(RPCService *svc)
674{

Callers 2

dump_rpcMethod · 0.80
findFunctionMethod · 0.80

Calls 3

lock_addMethod · 0.80
lock_subMethod · 0.80
plugin_rpcconnectFunction · 0.50

Tested by

no test coverage detected