-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Started working on support for WebSockets.
Fixed some compiler warnings when compiling with -Wextra Thanks to Jan Jaeger's excellent bug report, made some changes that should make it easier to build ShellInABox for OpenWRT. git-svn-id: https://shellinabox.googlecode.com/svn/trunk@202 0da03de8-d603-11dd-86c2-0f8696b7b6f9
- Loading branch information
1 parent
5a75b2f
commit 9b0a937
Showing
29 changed files
with
583 additions
and
140 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
Copyright (C) 2008-2009 Markus Gutschke <[email protected]> | ||
Copyright (C) 2008-2010 Markus Gutschke <[email protected]> | ||
|
||
This program is free software; you can redistribute it and/or modify | ||
it under the terms of the GNU General Public License version 2 as | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,12 @@ | ||
2010-03-29 Markus Gutschke <[email protected]> | ||
|
||
* Started working on support for WebSockets. | ||
|
||
* Fixed some compiler warnings when compiling with -Wextra | ||
|
||
* Thanks to Jan Jaeger's excellent bug report, made some changes | ||
that should make it easier to build ShellInABox for OpenWRT. | ||
|
||
2009-12-10 Markus Gutschke <[email protected]> | ||
|
||
* Add .note.GNU-stack to all object files so that the generated | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ AC_PREREQ(2.57) | |
|
||
dnl This is the one location where the authoritative version number is stored | ||
AC_INIT(shellinabox, 2.10, [email protected]) | ||
VCS_REVISION=200 | ||
VCS_REVISION=202 | ||
AC_SUBST(VCS_REVISION) | ||
AC_DEFINE_UNQUOTED(VCS_REVISION, "${VCS_REVISION}", | ||
[Most recent revision number in the version control system]) | ||
|
@@ -55,6 +55,12 @@ AC_TRY_LINK([#include <pthread.h> | |
[AC_DEFINE(HAVE_SIGWAIT, 1, | ||
Define to 1 if you have a working sigwait)]) | ||
|
||
dnl Not every system has support for isnan() | ||
AC_TRY_LINK([#include <math.h>], | ||
[isnan(0.0);], | ||
[AC_DEFINE(HAVE_ISNAN, 1, | ||
Define to 1 if you have support for isnan)]) | ||
|
||
dnl On some systems, calling /bin/login does not work. Disable the LOGIN | ||
dnl feature, if the user tells us that it does not do the right thing. | ||
AC_ARG_ENABLE(login, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,7 @@ It was downloaded from http://shellinabox.com/ | |
|
||
Upstream Author: [email protected] | ||
|
||
Copyright (c) 2008-2009, Markus Gutschke | ||
Copyright (c) 2008-2010, Markus Gutschke | ||
All rights reserved. | ||
|
||
This program is free software; you can redistribute it and/or modify | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
// VT100.js -- JavaScript based terminal emulator | ||
// Copyright (C) 2008-2009 Markus Gutschke <[email protected]> | ||
// Copyright (C) 2008-2010 Markus Gutschke <[email protected]> | ||
// | ||
// This program is free software; you can redistribute it and/or modify | ||
// it under the terms of the GNU General Public License version 2 as | ||
|
@@ -1955,8 +1955,8 @@ VT100.prototype.toggleBell = function() { | |
}; | ||
|
||
VT100.prototype.about = function() { | ||
alert("VT100 Terminal Emulator " + "2.10 (revision 200)" + | ||
"\nCopyright 2008-2009 by Markus Gutschke\n" + | ||
alert("VT100 Terminal Emulator " + "2.10 (revision 202)" + | ||
"\nCopyright 2008-2010 by Markus Gutschke\n" + | ||
"For more information check http://shellinabox.com"); | ||
}; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
// http.h -- Library for implementing embedded custom HTTP servers | ||
// Copyright (C) 2008-2009 Markus Gutschke <[email protected]> | ||
// Copyright (C) 2008-2010 Markus Gutschke <[email protected]> | ||
// | ||
// This program is free software; you can redistribute it and/or modify | ||
// it under the terms of the GNU General Public License version 2 as | ||
|
@@ -56,7 +56,13 @@ | |
#define HTTP_SUSPEND 3 | ||
#define HTTP_PARTIAL_REPLY 4 | ||
|
||
#define WS_START_OF_FRAME 0x0100 | ||
#define WS_END_OF_FRAME 0x0200 | ||
#define WS_CONNECTION_OPENED 0xFF00 | ||
#define WS_CONNECTION_CLOSED 0x7F00 | ||
|
||
#define NO_MSG "\001" | ||
#define BINARY_MSG "\001%d%p" | ||
|
||
#define NOINTR(x) ({ int i__; while ((i__ = (x)) < 0 && errno == EINTR); i__;}) | ||
|
||
|
@@ -77,6 +83,9 @@ void serverRegisterHttpHandler(Server *server, const char *url, | |
void serverRegisterStreamingHttpHandler(Server *server, const char *url, | ||
int (*handler)(HttpConnection *, void *), | ||
void *arg); | ||
void serverRegisterWebSocketHandler(Server *server, const char *url, | ||
int (*handler)(HttpConnection *, void *, int, const char *, int), | ||
void *arg); | ||
ServerConnection *serverAddConnection(Server *server, int fd, | ||
int (*handleConnection)(ServerConnection *, | ||
void *arg, short *events, | ||
|
@@ -109,6 +118,10 @@ void *httpSetPrivate(HttpConnection *http, void *private); | |
void httpSendReply(HttpConnection *http, int code, | ||
const char *msg, const char *fmt, ...) | ||
__attribute__((format(printf, 4, 5))); | ||
void httpSendWebSocketTextMsg(HttpConnection *http, int type, const char *fmt, | ||
...) __attribute__((format(printf, 3, 4))); | ||
void httpSendWebSocketBinaryMsg(HttpConnection *http, int type, | ||
const void *buf, int len); | ||
void httpExitLoop(HttpConnection *http, int exitAll); | ||
Server *httpGetServer(const HttpConnection *http); | ||
ServerConnection *httpGetServerConnection(const HttpConnection *); | ||
|
Oops, something went wrong.