#define STDC_HEADERS 1
/* Most recent revision number in the version control system */
-#define VCS_REVISION "237"
+#define VCS_REVISION "238"
/* Version number of package */
#define VERSION "2.10"
ac_compiler_gnu=$ac_cv_c_compiler_gnu
-VCS_REVISION=237
+VCS_REVISION=238
cat >>confdefs.h <<_ACEOF
dnl This is the one location where the authoritative version number is stored
AC_INIT(shellinabox, 2.10, markus@shellinabox.com)
-VCS_REVISION=237
+VCS_REVISION=238
AC_SUBST(VCS_REVISION)
AC_DEFINE_UNQUOTED(VCS_REVISION, "${VCS_REVISION}",
[Most recent revision number in the version control system])
};
VT100.prototype.about = function() {
- alert("VT100 Terminal Emulator " + "2.10 (revision 237)" +
+ alert("VT100 Terminal Emulator " + "2.10 (revision 238)" +
"\nCopyright 2008-2010 by Markus Gutschke\n" +
"For more information check http://shellinabox.com");
};
ServerConnection *serverGetConnection(Server *server, ServerConnection *hint,
int fd);
short serverConnectionSetEvents(Server *server, ServerConnection *connection,
- short events);
+ int fd, short events);
void serverExitLoop(Server *server, int exitAll);
void serverLoop(Server *server);
int serverSupportsSSL();
if (!serverGetTimeout(connection)) {
serverSetTimeout(connection, CONNECTION_TIMEOUT);
}
- serverConnectionSetEvents(http->server, connection,
+ serverConnectionSetEvents(http->server, connection, http->fd,
http->msgLength ? POLLIN|POLLOUT : POLLIN);
}
}
}
short serverConnectionSetEvents(struct Server *server,
- struct ServerConnection *connection,
+ struct ServerConnection *connection, int fd,
short events) {
dcheck(server);
dcheck(connection);
dcheck(!connection->deleted);
int idx = connection - server->connections;
short oldEvents = server->pollFds[idx + 1].events;
+ dcheck(fd == server->pollFds[idx + 1].fd);
server->pollFds[idx + 1].events = events;
return oldEvents;
}
if (server->pollFds[i].revents) {
eventCount--;
}
- short events = server->pollFds[i].events;
if (!connection->handleConnection(connection, connection->arg,
- &events, server->pollFds[i].revents)){
+ &server->pollFds[i].events,
+ server->pollFds[i].revents)) {
connection = server->connections + i - 1;
connection->destroyConnection(connection->arg);
connection->deleted = 1;
- } else {
- server->pollFds[i].events = events;
}
}
}
struct ServerConnection *hint,
int fd);
short serverConnectionSetEvents(struct Server *server,
- struct ServerConnection *connection,
+ struct ServerConnection *connection, int fd,
short events);
void serverExitLoop(struct Server *server, int exitAll);
void serverLoop(struct Server *server);
};
ShellInABox.prototype.about = function() {
- alert("Shell In A Box version " + "2.10 (revision 237)" +
+ alert("Shell In A Box version " + "2.10 (revision 238)" +
"\nCopyright 2008-2010 by Markus Gutschke\n" +
"For more information check http://shellinabox.com" +
(typeof serverSupportsSSL != 'undefined' && serverSupportsSSL ?
}
static int handleSession(struct ServerConnection *connection, void *arg,
- short *events ATTR_UNUSED, short revents) {
- UNUSED(events);
+ short *events, short revents) {
struct Session *session = (struct Session *)arg;
session->connection = connection;
int len = MAX_RESPONSE - session->len;
session->pty);
session->connection = connection;
if (session->len >= MAX_RESPONSE) {
- serverConnectionSetEvents(session->server, connection, 0);
+ *events = 0;
}
serverSetTimeout(connection, AJAX_TIMEOUT);
return 1;
serverSetTimeout(session->connection, AJAX_TIMEOUT);
if (session->len < MAX_RESPONSE) {
// Re-enable input on the child's pty
- serverConnectionSetEvents(session->server, session->connection,POLLIN);
+ serverConnectionSetEvents(session->server, session->connection,
+ session->pty, POLLIN);
}
}
return HTTP_DONE;
} else if (session->connection) {
// Re-enable input on the child's pty
- serverConnectionSetEvents(session->server, session->connection, POLLIN);
+ serverConnectionSetEvents(session->server, session->connection,
+ session->pty, POLLIN);
serverSetTimeout(session->connection, AJAX_TIMEOUT);
}
};
VT100.prototype.about = function() {
- alert("VT100 Terminal Emulator " + "2.10 (revision 237)" +
+ alert("VT100 Terminal Emulator " + "2.10 (revision 238)" +
"\nCopyright 2008-2010 by Markus Gutschke\n" +
"For more information check http://shellinabox.com");
};