Commit 11dec146 authored by Per Cederqvist's avatar Per Cederqvist
Browse files

Use the allocator from the configuration to create an IscMaster in

isc_initialize().
parent aa7b9245
Sun May 31 01:49:22 1992 Per Cederqvist (ceder@lysator)
* isc_master (isc_initialize): Allocate the master control block
with the allocator that is passed in IscConfig (if any).
......@@ -26,10 +26,24 @@ isc_initialize(IscConfig * cfg)
IscMaster * mcb;
IscMasterConfig * mcfg;
IscSessionConfig * scfg;
/* Make sure the mcb is allocated using the correct allocator. */
if (cfg && cfg->version == 1005 && cfg->master.version == 1001)
{
if (cfg->master.memfn.alloc && cfg->master.memfn.realloc
&& cfg->master.memfn.free)
{
isc_setallocfn(cfg->master.memfn.alloc,
cfg->master.memfn.realloc,
cfg->master.memfn.free);
}
if (cfg->master.abortfn)
isc_setabortfn(cfg->master.abortfn);
}
ISC_XNEW(mcb);
mcb->sessions = NULL;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment