comparison audioDB.cpp @ 194:0e75deb7d4d1

Remove workaround for previous file format compatibility changes.
author mas01cr
date Wed, 21 Nov 2007 11:38:19 +0000
parents f9d16137e704
children 8c81cacf5aab
comparison
equal deleted inserted replaced
193:f9d16137e704 194:0e75deb7d4d1
499 error("database file has incorrect header", dbName); 499 error("database file has incorrect header", dbName);
500 } 500 }
501 501
502 if(dbH->version != O2_FORMAT_VERSION) { 502 if(dbH->version != O2_FORMAT_VERSION) {
503 error("database file has incorect version", dbName); 503 error("database file has incorect version", dbName);
504 }
505
506 // FIXME: when changing file format version, remove this workaround.
507 if(dbH->dbSize == 0) {
508 dbH->dbSize = O2_DEFAULTDBSIZE;
509 } 504 }
510 505
511 // mmap the database file 506 // mmap the database file
512 if ((db = (char*) mmap(0, dbH->dbSize, PROT_READ | (forWrite ? PROT_WRITE : 0), 507 if ((db = (char*) mmap(0, dbH->dbSize, PROT_READ | (forWrite ? PROT_WRITE : 0),
513 MAP_SHARED, dbfid, 0)) == (caddr_t) -1) 508 MAP_SHARED, dbfid, 0)) == (caddr_t) -1)