comparison audioDB.cpp @ 307:d1b8b2dec37e

Added reporters radius search via Web Services. The ordering for radius search is degenerate if usingQueryPoint, because the query point can only be counted once. This behaviour is changed by specifying -n 1 to emulate the trackAveragingReporter ordering behaviour
author mas01mc
date Wed, 06 Aug 2008 21:23:14 +0000
parents 2d6efbe56bb8
children 896679d8cc39
comparison
equal deleted inserted replaced
306:921ba500a024 307:d1b8b2dec37e
43 43
44 else if(O2_ACTION(COM_BATCHINSERT)) 44 else if(O2_ACTION(COM_BATCHINSERT))
45 batchinsert(dbName, inFile); 45 batchinsert(dbName, inFile);
46 46
47 else if(O2_ACTION(COM_QUERY)) 47 else if(O2_ACTION(COM_QUERY))
48 if(isClient) 48 if(isClient){
49 ws_query(dbName, inFile, (char*)hostport); 49 if(query_from_key)
50 ws_query_by_key(dbName, key, (char*)hostport);
51 else
52 ws_query(dbName, inFile, (char*)hostport);
53 }
50 else 54 else
51 query(dbName, inFile); 55 query(dbName, inFile);
52 56
53 else if(O2_ACTION(COM_STATUS)) 57 else if(O2_ACTION(COM_STATUS))
54 if(isClient) 58 if(isClient)
197 } 201 }
198 } 202 }
199 203
200 if(args_info.radius_given) { 204 if(args_info.radius_given) {
201 radius = args_info.radius_arg; 205 radius = args_info.radius_arg;
202 if(radius <= 0 || radius > 1000000000) { 206 if(radius < 0 || radius > 1000000000) {
203 error("radius out of range"); 207 error("radius out of range");
204 } else { 208 } else {
205 VERB_LOG(3, "Setting radius to %f\n", radius); 209 VERB_LOG(3, "Setting radius to %f\n", radius);
206 } 210 }
207 } 211 }