MCPcopy Create free account
hub / github.com/acl-dev/acl / get_config

Method get_config

lib_acl_cpp/src/connpool/connect_manager.cpp:211–227  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

209}
210
211const conn_config* connect_manager::get_config(const char* addr,
212 bool use_first /* false */)
213{
214 string buf(addr);
215 buf.lower();
216
217 lock_guard guard(lock_);
218 std::map<string, conn_config>::const_iterator cit = addrs_.find(buf);
219 if (cit != addrs_.end()) {
220 return &cit->second;
221 }
222 if (!use_first || addrs_.empty()) {
223 return NULL;
224 }
225 cit = addrs_.begin();
226 return &cit->second;
227}
228
229#define DEFAULT_ID 0
230

Callers 3

peekMethod · 0.80
moveMethod · 0.80
askMethod · 0.80

Calls 4

beginMethod · 0.80
findMethod · 0.45
endMethod · 0.45
emptyMethod · 0.45

Tested by

no test coverage detected