assert(static_cast<unsigned int>(res) < sizeof(key));
if (!ident_hash) {
- Init();
+ ident_hash = hash_create((HASHCMP *) strcmp,
+ hashPrime(Squid_MaxFD / 8),
+ hash4);
}
if ((state = (IdentStateData *)hash_lookup(ident_hash, key)) != NULL) {
ClientAdd(state, callback, data);
state->connWait.start(connOpener, call);
}
-void
-Ident::Init(void)
-{
- if (ident_hash) {
- debugs(30, DBG_CRITICAL, "WARNING: Ident already initialized.");
- return;
- }
-
- ident_hash = hash_create((HASHCMP *) strcmp,
- hashPrime(Squid_MaxFD / 8),
- hash4);
-}
-
#endif /* USE_IDENT */
/**
* Open a connection and request IDENT information from a peer machine.
- * Callback will be called whan the lookup is completed.
- * Self-registers with a global ident lookup manager,
- * will call Ident::Init() itself if the manager has not been initialized already.
+ * Callback will be called when the lookup is completed.
*/
void Start(const Comm::ConnectionPointer &conn, IDCB * callback, void *cbdata);
-/**
- * Initialize IDENT lookup manager.
- * Currently a hash list of open ident requests.
- */
-void Init(void);
-
} // namespace Ident
#endif /* USE_IDENT */
#include "icmp/IcmpSquid.h"
#include "icmp/net_db.h"
#include "ICP.h"
-#include "ident/Ident.h"
#include "Instance.h"
#include "ip/tools.h"
#include "ipc/Coordinator.h"
icapLogOpen();
#endif
-#if USE_IDENT
- Ident::Init();
-#endif
-
#if SQUID_SNMP
snmpInit();