diff soap.cpp @ 313:f9dde18f556a

Check for index-exists on WS --load_index and exit if it does not. Revert unmap_tables because cleanup() did it fine, but there is a memory leak in ws_query calls.
author mas01mc
date Sat, 09 Aug 2008 15:46:42 +0000
parents 435ffdaecae9
children b671a46873c2
line wrap: on
line diff
--- a/soap.cpp	Sat Aug 09 15:17:01 2008 +0000
+++ b/soap.cpp	Sat Aug 09 15:46:42 2008 +0000
@@ -252,6 +252,9 @@
     {
       fprintf(stderr, "Socket connection successful: master socket = %d\n", m);
       // Make a global Web Services LSH Index (SINGLETON)
+      if(WS_load_index && dbName && !index_exists(dbName, radius, sequenceLength)){
+        error("Can't find requested index file:", index_get_name(dbName,radius,sequenceLength));
+      }
       if(WS_load_index && dbName && index_exists(dbName, radius, sequenceLength)){
 	char* indexName = index_get_name(dbName, radius, sequenceLength);
 	fprintf(stderr, "Loading LSH hashtables: %s...\n", indexName);