Mercurial > hg > audiodb
diff 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 |
line wrap: on
line diff
--- a/audioDB.cpp Tue Aug 05 22:40:38 2008 +0000 +++ b/audioDB.cpp Wed Aug 06 21:23:14 2008 +0000 @@ -45,8 +45,12 @@ batchinsert(dbName, inFile); else if(O2_ACTION(COM_QUERY)) - if(isClient) - ws_query(dbName, inFile, (char*)hostport); + if(isClient){ + if(query_from_key) + ws_query_by_key(dbName, key, (char*)hostport); + else + ws_query(dbName, inFile, (char*)hostport); + } else query(dbName, inFile); @@ -199,7 +203,7 @@ if(args_info.radius_given) { radius = args_info.radius_arg; - if(radius <= 0 || radius > 1000000000) { + if(radius < 0 || radius > 1000000000) { error("radius out of range"); } else { VERB_LOG(3, "Setting radius to %f\n", radius);