char const *stripePath() const;
ConfigOption * getOptionTree() const;
const char *ioModule;
- ConfigOptionVector *currentIOOptions;
+ mutable ConfigOptionVector *currentIOOptions;
const char *stripe_path;
};
/*
- * $Id: store_dir_coss.cc,v 1.59 2005/01/06 14:09:26 serassio Exp $
+ * $Id: store_dir_coss.cc,v 1.60 2005/02/05 22:02:32 serassio Exp $
* vim: set et :
*
* DEBUG: section 47 Store COSS Directory Routines
io = anIO;
/* Change the IO Options */
+ if (currentIOOptions == NULL)
+ currentIOOptions = new ConfigOptionVector();
+
if (currentIOOptions->options.size() > 3)
delete currentIOOptions->options.pop_back();
{
ConfigOption *parentResult = SwapDir::getOptionTree();
+ if (currentIOOptions == NULL)
+ currentIOOptions = new ConfigOptionVector();
+
currentIOOptions->options.push_back(parentResult);
+
currentIOOptions->options.push_back(new ConfigOptionAdapter<CossSwapDir>(*const_cast<CossSwapDir *>(this), &CossSwapDir::optionIOParse, &CossSwapDir::optionIODump));
+
currentIOOptions->options.push_back(
new ConfigOptionAdapter<CossSwapDir>(*const_cast<CossSwapDir *>(this),
&CossSwapDir::optionBlockSizeParse,
if (ioOptions)
currentIOOptions->options.push_back(ioOptions);
- return currentIOOptions;
+ ConfigOption* result = currentIOOptions;
+
+ currentIOOptions = NULL;
+
+ return result;
}
void
/*
- * $Id: store_dir_ufs.cc,v 1.68 2005/01/03 16:08:27 robertc Exp $
+ * $Id: store_dir_ufs.cc,v 1.69 2005/02/05 22:02:32 serassio Exp $
*
* DEBUG: section 47 Store Directory Routines
* AUTHOR: Duane Wessels
{
ConfigOption *parentResult = SwapDir::getOptionTree();
+ if (currentIOOptions == NULL)
+ currentIOOptions = new ConfigOptionVector();
+
currentIOOptions->options.push_back(parentResult);
+
currentIOOptions->options.push_back(new ConfigOptionAdapter<UFSSwapDir>(*const_cast<UFSSwapDir *>(this), &UFSSwapDir::optionIOParse, &UFSSwapDir::optionIODump));
ConfigOption *ioOptions = IO->io->getOptionTree();
if (ioOptions)
currentIOOptions->options.push_back(ioOptions);
- return currentIOOptions;
+ ConfigOption* result = currentIOOptions;
+
+ currentIOOptions = NULL;
+
+ return result;
}
/*
/*
- * $Id: ufscommon.h,v 1.2 2005/01/03 16:08:27 robertc Exp $
+ * $Id: ufscommon.h,v 1.3 2005/02/05 22:02:32 serassio Exp $
*
* SQUID Web Proxy Cache http://www.squid-cache.org/
* ----------------------------------------------------------
void changeIO(DiskIOModule *);
bool optionIOParse(char const *option, const char *value, int reconfiguring);
void optionIODump(StoreEntry * e) const;
- ConfigOptionVector *currentIOOptions;
+ mutable ConfigOptionVector *currentIOOptions;
char const *ioType;
};