*** empty log message ***
authorMatthew Mondor <mmondor@pulsar-zone.net>
Sat, 19 Aug 2006 11:43:12 +0000 (11:43 +0000)
committerMatthew Mondor <mmondor@pulsar-zone.net>
Sat, 19 Aug 2006 11:43:12 +0000 (11:43 +0000)
mmsoftware/js/js-sh/app/httpd/httpd.js

index 4e15c31..110212f 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: httpd.js,v 1.30 2006/08/19 11:41:57 mmondor Exp $ */
+/* $Id: httpd.js,v 1.31 2006/08/19 11:43:12 mmondor Exp $ */
 
 /*
  * Copyright (c) 2005-2006, Matthew Mondor
@@ -76,7 +76,7 @@
  * Server identification
  */
 const SERVER_VERSION = 'mmondor_js_httpd/0.1.0 (NetBSD)';
-const SERVER_CVSID = '$Id: httpd.js,v 1.30 2006/08/19 11:41:57 mmondor Exp $';
+const SERVER_CVSID = '$Id: httpd.js,v 1.31 2006/08/19 11:43:12 mmondor Exp $';
 
 
 
@@ -497,7 +497,7 @@ function http_error(fd, code, desc, ldesc)
 FD.prototype.state_http_init = function(time)
 {
        /* For differenciation after poll(2) */
-       this.stype = STYPE_HTTP;
+       this.type = STYPE_HTTP;
        this.stat = PSTAT_CONTINUE;
 
        /* Empty request */
@@ -1215,7 +1215,7 @@ FD.prototype.appserv_connect = function(sid, set)
         */
        try {
                fd = new FD();
-               fd.stype = STYPE_CONNECT;
+               fd.type = STYPE_CONNECT;
                fd.fcntl(FD.F_SETFL, FD.O_NONBLOCK);
 
                fd.connect(s.host, s.port);
@@ -1306,7 +1306,7 @@ function state_connect_appserv(time)
        }
 
        /* Success */
-       this.stype = STYPE_APPSERV;
+       this.type = STYPE_APPSERV;
        this.client_fd = undefined;
        this.transfer_state = TSTATE_WRITE;
        /* XXX */
@@ -1641,7 +1641,7 @@ function main() {
                         * polling set
                         */
                        fd.events = FD.POLLIN;
-                       fd.stype = STYPE_LISTEN;
+                       fd.type = STYPE_LISTEN;
                        poll_set_add(fd);
                } catch (x) {
                        err.put(x + " preparing listening socket\n");
@@ -1666,7 +1666,7 @@ function main() {
 
                for (i in poll_set) {
                        if ((fd = poll_set[i]) == undefined ||
-                           fd.stype != STYPE_HTTP)
+                           fd.type != STYPE_HTTP)
                                continue;
                        if (fd.expires <= cur) {
                                /*
@@ -1734,7 +1734,7 @@ function main() {
                         * If descriptor is a bound one, attempt to accept
                         * the new client connection
                         */
-                       if (efd.stype == STYPE_LISTEN &&
+                       if (efd.type == STYPE_LISTEN &&
                            (efd.revents & FD.POLLIN) != 0) {
                                try {
                                        fd = efd.accept();
@@ -1800,7 +1800,7 @@ function main() {
                                try {
                                        efd.close();
                                } catch (x) {}
-                               if (efd.stype == STYPE_APPSERV) {
+                               if (efd.type == STYPE_APPSERV) {
                                        /* Dismiss SID->FD table entry */
                                        sid_table[efd.sid] = undefined;
                                        /* appserv object back to pool */