diff audioDB.cpp @ 515:c7bdb7913762

in audioDB::query, open the database file with O_RDONLY. Bug spotted by Malcolm Slaney.
author mas01cr
date Sat, 24 Jan 2009 09:39:39 +0000
parents cc2b97d020b1
children 5da228727a2d 02e0a9ecfd0f
line wrap: on
line diff
--- a/audioDB.cpp	Sat Jan 24 06:16:00 2009 +0000
+++ b/audioDB.cpp	Sat Jan 24 09:39:39 2009 +0000
@@ -756,7 +756,7 @@
 void audioDB::query(const char* dbName, const char* inFile, struct soap *soap, adb__queryResponse *adbQueryResponse) {
 
   if(!adb) {
-    if(!(adb = audiodb_open(dbName, O_RDWR))) {
+    if(!(adb = audiodb_open(dbName, O_RDONLY))) {
       error("failed to open database", dbName);
     }
   }