MCPcopy Create free account
hub / github.com/FirebirdSQL/firebird / loadClientKey

Method loadClientKey

src/remote/server/server.cpp:227–263  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

225 }
226
227 void loadClientKey()
228 {
229 if (clientKeyChecked)
230 return;
231
232 Reference r(*port);
233
234 for (GetPlugins<IKeyHolderPlugin> kh(IPluginManager::TYPE_KEY_HOLDER, port->getPortConfig());
235 kh.hasData(); kh.next())
236 {
237 IKeyHolderPlugin* keyPlugin = kh.plugin();
238 LocalStatus ls;
239 CheckStatusWrapper st(&ls);
240
241 networkCallback.wake = false;
242 bool callbackResult = keyPlugin->keyCallback(&st, &networkCallback);
243 if (st.getErrors()[1] != isc_wish_list)
244 check(&st);
245 if (callbackResult && networkCallback.wake)
246 {
247 // current holder has a key and it seems to be from the client
248 keyHolder = keyPlugin;
249 keyHolder->addRef();
250 keyCallback = keyHolder->chainHandle(&st);
251
252 if (st.isEmpty())
253 {
254 if (keyCallback)
255 break;
256 }
257 else if (st.getErrors()[1] != isc_wish_list)
258 check(&st);
259 }
260 }
261
262 clientKeyChecked = true;
263 }
264
265 void wakeup(unsigned int length, const void* data)
266 {

Callers 1

getInterfaceMethod · 0.80

Calls 10

getPortConfigMethod · 0.80
pluginMethod · 0.80
checkFunction · 0.50
hasDataMethod · 0.45
nextMethod · 0.45
keyCallbackMethod · 0.45
getErrorsMethod · 0.45
addRefMethod · 0.45
chainHandleMethod · 0.45
isEmptyMethod · 0.45

Tested by

no test coverage detected