add: if (!Ns_ConfigGetInt(path, "checkinterval", &i) || i < 0) { i = 600;	 } Ns_ScheduleProc(NsDbCheckPool, poolPtr, 0, i);
context: CreatePool(char *pool, char *path, char *driver){    Pool            *poolPtr;    Handle          *handlePtr;    struct DbDriver *driverPtr;    int              i;    char	    *source;    if (driver == NULL) {	Ns_Log(Error, "dbinit: no driver for pool '%s'", pool);	return NULL;    }    driverPtr = NsDbLoadDriver(driver);    if (driverPtr == NULL) {	return NULL;    }    source = Ns_ConfigGet(path, CONFIG_SOURCE);    if (source == NULL) {	Ns_Log(Error, "dbinit: missing datasource for pool '%s'", pool);	return NULL;    }    poolPtr = ns_malloc(sizeof(Pool));    poolPtr->driver = driver;    poolPtr->driverPtr = driverPtr;    Ns_MutexInit(&poolPtr->lock);    Ns_MutexSetName2(&poolPtr->lock, "nsdb", pool);    Ns_CondInit(&poolPtr->waitCond);    Ns_CondInit(&poolPtr->getCond);    poolPtr->source = source;    poolPtr->name = pool;    poolPtr->waiting = 0;    poolPtr->user = Ns_ConfigGet(path, CONFIG_USER);    poolPtr->pass = Ns_ConfigGet(path, CONFIG_PASS);    poolPtr->desc = Ns_ConfigGet("ns/db/pools", pool);    poolPtr->stale_on_close = 0;    if (Ns_ConfigGetBool(path, CONFIG_VERBOSE,			 &poolPtr->fVerbose) == NS_FALSE) {        poolPtr->fVerbose = 0;    }     if (Ns_ConfigGetBool(path, CONFIG_VERBOSE_ERROR,			 &poolPtr->fVerboseError) == NS_FALSE) {	poolPtr->fVerboseError = 0;    }    if (Ns_ConfigGetInt(path, CONFIG_CONNS, &poolPtr->nhandles) == NS_FALSE ||	poolPtr->nhandles <= 0) {        poolPtr->nhandles = 2;    }    if (Ns_ConfigGetInt(path, "MaxIdle", &i) == NS_FALSE || i < 0) {        i = 600;                    /* 10 minutes */    }    poolPtr->maxidle = i;    if (Ns_ConfigGetInt(path, "MaxOpen", &i) == NS_FALSE || i < 0) {        i = 3600;                   /* 1 hour */    }    poolPtr->maxopen = i;    poolPtr->firstPtr = poolPtr->lastPtr = NULL;    for (i = 0; i < poolPtr->nhandles; ++i) {    	handlePtr = ns_malloc(sizeof(Handle));    	Ns_DStringInit(&handlePtr->dsExceptionMsg);    	handlePtr->poolPtr = poolPtr;    	handlePtr->connection = NULL;    	handlePtr->connected = NS_FALSE;    	handlePtr->fetchingRows = 0;    	handlePtr->row = Ns_SetCreate(NULL);    	handlePtr->cExceptionCode[0] = '\0';    	handlePtr->otime = handlePtr->atime = 0;    	handlePtr->stale = NS_FALSE;    	handlePtr->stale_on_close = 0;	/*	 * The following elements of the Handle structure could	 * be obtained by dereferencing the poolPtr.  They're	 * only needed to maintain the original Ns_DbHandle	 * structure definition which was designed to allow	 * handles outside of pools, a feature no longer supported.	 */	handlePtr->driver = driver;	handlePtr->datasource = poolPtr->source;	handlePtr->user = poolPtr->user;	handlePtr->password = poolPtr->pass;	handlePtr->verbose = poolPtr->fVerbose;	handlePtr->poolname = pool;	ReturnHandle(handlePtr);    }    return poolPtr;}