Mercurial > hg > audiodb
comparison audioDB.cpp @ 339:da901c62e569
Added new INDEX tests: LARGE_ADB, PATH PREFIX, cmdline and WS. Removed redundant feature PREFIX in audioDB.cpp. Moved tests/0050 to tests/0041 so INDEX tests are all in 0040-0049 range.
author | mas01mc |
---|---|
date | Fri, 05 Sep 2008 20:01:58 +0000 |
parents | cdb31e8b94e3 |
children | 30384a82983a |
comparison
equal
deleted
inserted
replaced
338:cdb31e8b94e3 | 339:da901c62e569 |
---|---|
38 | 38 |
39 // Perform database prefix substitution | 39 // Perform database prefix substitution |
40 if(dbName && adb_root) | 40 if(dbName && adb_root) |
41 prefix_name((char** const)&dbName, adb_root); | 41 prefix_name((char** const)&dbName, adb_root); |
42 | 42 |
43 if(inFile && adb_feature_root) | |
44 prefix_name((char** const)&inFile, adb_feature_root); | |
45 | |
46 if(O2_ACTION(COM_SERVER)) | 43 if(O2_ACTION(COM_SERVER)) |
47 startServer(); | 44 startServer(); |
48 | 45 |
49 else if(O2_ACTION(COM_CREATE)) | 46 else if(O2_ACTION(COM_CREATE)) |
50 create(dbName); | 47 create(dbName); |
106 isServer = 1; // Set to make errors report over SOAP | 103 isServer = 1; // Set to make errors report over SOAP |
107 processArgs(argc, argv); | 104 processArgs(argc, argv); |
108 // Perform database prefix substitution | 105 // Perform database prefix substitution |
109 if(dbName && adb_root) | 106 if(dbName && adb_root) |
110 prefix_name((char** const)&dbName, adb_root); | 107 prefix_name((char** const)&dbName, adb_root); |
111 if(inFile && adb_feature_root) | |
112 prefix_name((char** const)&inFile, adb_feature_root); | |
113 assert(O2_ACTION(COM_QUERY)); | 108 assert(O2_ACTION(COM_QUERY)); |
114 query(dbName, inFile, adbQueryResponse); | 109 query(dbName, inFile, adbQueryResponse); |
115 } catch(char *err) { | 110 } catch(char *err) { |
116 cleanup(); | 111 cleanup(); |
117 throw(err); | 112 throw(err); |
124 isServer = 1; // Set to make errors report over SOAP | 119 isServer = 1; // Set to make errors report over SOAP |
125 processArgs(argc, argv); | 120 processArgs(argc, argv); |
126 // Perform database prefix substitution | 121 // Perform database prefix substitution |
127 if(dbName && adb_root) | 122 if(dbName && adb_root) |
128 prefix_name((char** const)&dbName, adb_root); | 123 prefix_name((char** const)&dbName, adb_root); |
129 if(inFile && adb_feature_root) | |
130 prefix_name((char** const)&inFile, adb_feature_root); | |
131 assert(O2_ACTION(COM_STATUS)); | 124 assert(O2_ACTION(COM_STATUS)); |
132 status(dbName, adbStatusResponse); | 125 status(dbName, adbStatusResponse); |
133 } catch(char *err) { | 126 } catch(char *err) { |
134 cleanup(); | 127 cleanup(); |
135 throw(err); | 128 throw(err); |
299 // perform dbName path prefix SERVER-side subsitution | 292 // perform dbName path prefix SERVER-side subsitution |
300 if(SERVER_ADB_ROOT && !adb_root) | 293 if(SERVER_ADB_ROOT && !adb_root) |
301 adb_root = SERVER_ADB_ROOT; | 294 adb_root = SERVER_ADB_ROOT; |
302 if(SERVER_ADB_FEATURE_ROOT && !adb_feature_root) | 295 if(SERVER_ADB_FEATURE_ROOT && !adb_feature_root) |
303 adb_feature_root = SERVER_ADB_FEATURE_ROOT; | 296 adb_feature_root = SERVER_ADB_FEATURE_ROOT; |
304 | 297 |
305 if(args_info.SERVER_given){ | 298 if(args_info.SERVER_given){ |
306 command=COM_SERVER; | 299 command=COM_SERVER; |
307 port=args_info.SERVER_arg; | 300 port=args_info.SERVER_arg; |
308 if(port<100 || port > 100000) | 301 if(port<100 || port > 100000) |
309 error("port out of range"); | 302 error("port out of range"); |