diff audioDB.cpp @ 338:cdb31e8b94e3

fixed startServer() reporting of non-locatable database or index. Achieved by setting isServer=1 AFTER checking database and loading INDEX.
author mas01mc
date Fri, 05 Sep 2008 16:40:41 +0000
parents ccf15a8c3e46
children da901c62e569
line wrap: on
line diff
--- a/audioDB.cpp	Fri Sep 05 14:35:44 2008 +0000
+++ b/audioDB.cpp	Fri Sep 05 16:40:41 2008 +0000
@@ -103,7 +103,7 @@
 audioDB::audioDB(const unsigned argc, char* const argv[], adb__queryResponse *adbQueryResponse): O2_AUDIODB_INITIALIZERS
 {
   try {
-    isServer = 1; // FIXME: Hack
+    isServer = 1; // Set to make errors report over SOAP
     processArgs(argc, argv);
     // Perform database prefix substitution
     if(dbName && adb_root)
@@ -121,7 +121,7 @@
 audioDB::audioDB(const unsigned argc, char* const argv[], adb__statusResponse *adbStatusResponse): O2_AUDIODB_INITIALIZERS
 {
   try {
-    isServer = 1; // FIXME: Hack
+    isServer = 1; // Set to make errors report over SOAP
     processArgs(argc, argv);
     // Perform database prefix substitution
     if(dbName && adb_root)
@@ -139,8 +139,8 @@
 audioDB::audioDB(const unsigned argc, char* const argv[], adb__lisztResponse *adbLisztResponse): O2_AUDIODB_INITIALIZERS
 {
   try {
-    isServer = 1; // FIXME: Hack
-    processArgs(argc, argv);
+    isServer = 1; // Set to make errors report over SOAP
+    processArgs(argc, argv); 
     // Perform database prefix substitution
     if(dbName && adb_root)
       prefix_name((char** const)&dbName, adb_root);
@@ -307,7 +307,6 @@
     port=args_info.SERVER_arg;
     if(port<100 || port > 100000)
       error("port out of range");
-    isServer = 1;
 #if defined(O2_DEBUG)
     struct sigaction sa;
     sa.sa_sigaction = sigterm_action;