+bool configcache::readHeader()
+{
+ long unsigned int headersize;
+
+ if( readDataToMem((char*)&headersize, sizeof(long unsigned int)) == sizeof(long unsigned int) && inFile.is_open() )
+ {
+ if( readHeaderData != NULL ) free(readHeaderData);
+
+ readHeaderData = (char*) malloc(headersize);
+
+ if( readDataToMem(readHeaderData, headersize) == headersize && inFile.is_open() ) {
+ return true;
+ }
+ else {
+ if(out) *out->log << "CCACHE: Could not read header! Closing dat-file: " << openFileDesc.filename << endl << flush;
+ inFile.close();
+ return false;
+ }
+ }
+ else {
+ if(out) *out->log << "CCACHE: Could not read header size. Closing dat-file: " << openFileDesc.filename << endl << flush;
+ inFile.close();
+ return false;
+ }
+}
+
+void *configcache::getHeader() {
+ return readHeaderData;
+}
+