From 4db316a432ce3d4fb280f64b64d3f1d0f3295b39 Mon Sep 17 00:00:00 2001 From: Kelly Rauchenberger Date: Sat, 16 Aug 2008 18:32:17 +0000 Subject: General: Upped default verIDBufferSize Because of the increase in possible Verification ID values, it will be even less likely to have a repeat, so the number that are buffered is being increased. A test was run to find repeats if 10000 numbers were generated between 1 and 2147483647 and a repeat was found only once at the 8500th number, the rest of the tests (20 others) passed successfully. Refs #37 --- central/trunk/install.php | 2 +- client/trunk/src/com/fourisland/instadisc/AdvancedSettingsForm.java | 4 ++-- client/trunk/src/com/fourisland/instadisc/FirstRun/Step2.java | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/central/trunk/install.php b/central/trunk/install.php index b2b1396..c056431 100644 --- a/central/trunk/install.php +++ b/central/trunk/install.php @@ -193,7 +193,7 @@ if (!isset($_GET['submit'])) $sql[5] = "INSERT INTO config (name,value) VALUES (\"siteName\",\"" . mysql_real_escape_string($_POST['siteName']) . "\")"; $sql[6] = "INSERT INTO config (name,value) VALUES (\"xmlrpcURL\",\"" . mysql_real_escape_string($_POST['xmlrpcURL']) . "\")"; $sql[7] = "INSERT INTO config (name,value) VALUES (\"owner\",\"" . mysql_real_escape_string($_POST['adminUser']) . "\")"; - $sql[8] = "INSERT INTO config (name,value) VALUES (\"verIDBufferSize\",\"100\")"; + $sql[8] = "INSERT INTO config (name,value) VALUES (\"verIDBufferSize\",\"10000\")"; $sql[9] = "INSERT INTO config (name,value) VALUES (\"softwareVersion\",\"" . $softwareVersion . "\")"; $sql[10] = "INSERT INTO config (name,value) VALUES (\"databaseVersion\",\"1\")"; $sql[11] = "INSERT INTO users (username, password, email, ip) VALUES (\"" . mysql_real_escape_string($_POST['adminUser']) . "\",\"" . mysql_real_escape_string(md5($_POST['adminPass'])) . "\",\"" . mysql_real_escape_string($_POST['adminEmail']) . "\",\"" . mysql_real_escape_string($_SERVER['REMOTE_ADDR']) . "\")"; diff --git a/client/trunk/src/com/fourisland/instadisc/AdvancedSettingsForm.java b/client/trunk/src/com/fourisland/instadisc/AdvancedSettingsForm.java index 14469ea..597aca8 100644 --- a/client/trunk/src/com/fourisland/instadisc/AdvancedSettingsForm.java +++ b/client/trunk/src/com/fourisland/instadisc/AdvancedSettingsForm.java @@ -22,14 +22,14 @@ public class AdvancedSettingsForm extends javax.swing.JDialog { SpinnerNumberModel sm = new SpinnerNumberModel(); sm.setValue(Integer.decode(Wrapper.getConfig("itemBufferSize"))); - sm.setMaximum(100); + sm.setMaximum(1000); sm.setMinimum(1); sm.setStepSize(1); jSpinner1.setModel(sm); SpinnerNumberModel sm2 = new SpinnerNumberModel(); sm2.setValue(Integer.decode(Wrapper.getConfig("verIDBufferSize"))); - sm2.setMaximum(10000); + sm2.setMaximum(100000); sm2.setMinimum(1); sm2.setStepSize(1); jSpinner2.setModel(sm2); diff --git a/client/trunk/src/com/fourisland/instadisc/FirstRun/Step2.java b/client/trunk/src/com/fourisland/instadisc/FirstRun/Step2.java index 0a8287b..7133f6f 100644 --- a/client/trunk/src/com/fourisland/instadisc/FirstRun/Step2.java +++ b/client/trunk/src/com/fourisland/instadisc/FirstRun/Step2.java @@ -166,7 +166,7 @@ public class Step2 extends javax.swing.JDialog { Wrapper.setConfig("password", password); Wrapper.setConfig("centralServerURL", jTextField3.getText()); Wrapper.setConfig("itemBufferSize", "10"); - Wrapper.setConfig("verIDBufferSize", "100"); + Wrapper.setConfig("verIDBufferSize", "10000"); Wrapper.setConfig("nextFilterID", "0"); Wrapper.setConfig("ipCheckValue", "1"); Wrapper.setConfig("ipCheckUnit", "day"); -- cgit 1.4.1