*** empty log message ***
authorMatthew Mondor <mmondor@pulsar-zone.net>
Thu, 7 Jul 2005 20:36:26 +0000 (20:36 +0000)
committerMatthew Mondor <mmondor@pulsar-zone.net>
Thu, 7 Jul 2005 20:36:26 +0000 (20:36 +0000)
tests/js-test/js/httpd/httpd.js
tests/js-test/js/httpd/options.js

index bc51574..070f05d 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: httpd.js,v 1.26 2005/07/07 18:30:48 mmondor Exp $ */
+/* $Id: httpd.js,v 1.27 2005/07/07 20:36:26 mmondor Exp $ */
 
 /*
  * Copyright (c) 2005, Matthew Mondor
@@ -90,7 +90,7 @@ eval(file_read('root.js'));           /* Root object for virtual chroot(2) */
  * Server identification
  */
 SERVER_VERSION                 = 'mmondor_js_httpd/0.0.1 (NetBSD)';
-SERVER_CVSID   = '$Id: httpd.js,v 1.26 2005/07/07 18:30:48 mmondor Exp $';
+SERVER_CVSID   = '$Id: httpd.js,v 1.27 2005/07/07 20:36:26 mmondor Exp $';
 
 
 
@@ -196,7 +196,7 @@ function session_gc(time)
        var i;
 
        for (i in sessions_table) {
-               if (sessions_table[i].expires >= time)
+               if (sessions_table[i].expires <= time)
                        delete sessions_table[i];
        }
 }
@@ -731,7 +731,7 @@ FD.prototype.parseRequest = function(time)
         */
        if ((sessid = this.http_vars_cookies['SessionID']) != undefined &&
            (sess = sessions_table[sessid]) != undefined &&
-           sess.expires < time) {
+           sess.expires > time) {
                this.http_sessid = sessid;
                this.http_vars_session = sess.variables;
        }
@@ -1259,7 +1259,7 @@ function main() {
                 * Verify if we should call the session gc, and if so, do so.
                 */
                sess_gc_secs += cur - old;
-               if (sess_gc_secs >= options.sess_gc_timeout) {
+               if (sess_gc_secs >= options.sess_gc_interval) {
                        sess_gc_secs = 0;
                        session_gc(cur);
                }
index 123a41e..ad0355d 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: options.js,v 1.6 2005/07/07 17:09:54 mmondor Exp $ */
+/* $Id: options.js,v 1.7 2005/07/07 20:36:26 mmondor Exp $ */
 
 var options = {
        /* Maximum number of concurrent clients that we should serve */
@@ -15,7 +15,7 @@ var options = {
        default_mimetype:       "application/octet-stream",
        default_charset:        "us-ascii",
        default_session_exp:    1800,
-       sess_gc_timeout:        600
+       sess_gc_interval:       600
 };
 
 /* Address:port combinations to listen to */