[Freeswitch-trunk] [commit] r12619 - freeswitch/trunk/src/mod/applications/mod_lcr
FreeSWITCH SVN
rupa at freeswitch.org
Mon Mar 16 08:35:10 PDT 2009
Author: rupa
Date: Mon Mar 16 10:35:10 2009
New Revision: 12619
Log:
reduce random/rand tsts to absolute minimum stmnt required
Modified:
freeswitch/trunk/src/mod/applications/mod_lcr/mod_lcr.c
Modified: freeswitch/trunk/src/mod/applications/mod_lcr/mod_lcr.c
==============================================================================
--- freeswitch/trunk/src/mod/applications/mod_lcr/mod_lcr.c (original)
+++ freeswitch/trunk/src/mod/applications/mod_lcr/mod_lcr.c Mon Mar 16 10:35:10 2009
@@ -247,13 +247,13 @@
{
char *sql = NULL;
if (globals.odbc_dsn) {
- sql = "SELECT * FROM lcr ORDER BY rand() LIMIT 1";
+ sql = "SELECT rand()";
if (switch_odbc_handle_exec(globals.master_odbc, sql, NULL)
== SWITCH_ODBC_SUCCESS) {
db_random = "rand()";
return SWITCH_TRUE;
}
- sql = "SELECT * FROM lcr ORDER BY random() LIMIT 1";
+ sql = "SELECT random()";
if (switch_odbc_handle_exec(globals.master_odbc, sql, NULL)
== SWITCH_ODBC_SUCCESS) {
db_random = "random()";
More information about the Freeswitch-trunk
mailing list