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

Method callback

src/remote/client/interface.cpp:10436–10478  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

10434}
10435
10436unsigned ClntAuthBlock::ClientCrypt::callback(unsigned dlen, const void* data, unsigned blen, void* buffer)
10437{
10438 HANDSHAKE_DEBUG(fprintf(stderr, "dlen=%d blen=%d\n", dlen, blen));
10439
10440 int loop = 0;
10441 while (loop < 2)
10442 {
10443 for (; pluginItr.hasData(); pluginItr.next())
10444 {
10445 if (!currentIface)
10446 {
10447 LocalStatus ls;
10448 CheckStatusWrapper st(&ls);
10449
10450 HANDSHAKE_DEBUG(fprintf(stderr, "Try plugin %s\n", pluginItr.name()));
10451 currentIface = pluginItr.plugin()->chainHandle(&st);
10452 // if plugin does not support chaining - silently ignore it
10453 check(&st, isc_wish_list);
10454 HANDSHAKE_DEBUG(fprintf(stderr, "Use plugin %s, ptr=%p\n", pluginItr.name(), currentIface));
10455 }
10456
10457 // if we have an iface - try it
10458 if (currentIface)
10459 {
10460 unsigned retlen = currentIface->callback(dlen, data, blen, buffer);
10461 HANDSHAKE_DEBUG(fprintf(stderr, "Iface %p returned %d\n", currentIface, retlen));
10462 if (retlen)
10463 return retlen;
10464 }
10465
10466 // no success with iface - clear it
10467 // appropriate data structures to be released by plugin cleanup code
10468 currentIface = nullptr;
10469 }
10470
10471 ++loop;
10472 // prepare iterator for next use
10473 pluginItr.rewind();
10474 }
10475
10476 // no luck with suggested data
10477 return 0;
10478}
10479
10480int ClntAuthBlock::ClientCrypt::getHashLength(Firebird::CheckStatusWrapper* status)
10481{

Callers 2

INET_analyzeFunction · 0.45

Calls 7

pluginMethod · 0.80
checkFunction · 0.50
hasDataMethod · 0.45
nextMethod · 0.45
nameMethod · 0.45
chainHandleMethod · 0.45
rewindMethod · 0.45

Tested by

no test coverage detected