diff options
Diffstat (limited to 'HTTPcode.c')
| -rw-r--r-- | HTTPcode.c | 24 |
1 files changed, 16 insertions, 8 deletions
@@ -17,7 +17,6 @@ You should have received a copy of the GNU General Public License along with LinBPQ/BPQ32. If not, see http://www.gnu.org/licenses
*/
-
//#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
#define _CRT_SECURE_NO_DEPRECATE
@@ -71,6 +70,8 @@ BOOL SHA1PasswordHash(char * String, char * Hash); char * byte_base64_encode(char *str, int len);
int APIProcessHTTPMessage(char * response, char * Method, char * URL, char * request, BOOL LOCAL, BOOL COOKIE);
int RHPProcessHTTPMessage(struct ConnectionInfo * conn, char * response, char * Method, char * URL, char * request, BOOL LOCAL, BOOL COOKIE);
+unsigned char * Compressit(unsigned char * In, int Len, int * OutLen);
+int doinflate(unsigned char * source, unsigned char * dest, int Len, int destlen, int * outLen);
extern struct ROUTE * NEIGHBOURS;
extern int ROUTE_LEN;
@@ -143,7 +144,7 @@ char Tail[] = "</body></html>"; char RouteHddr[] = "<h2 align=center>Routes</h2><table align=center border=2 style=font-family:monospace bgcolor=white>"
"<tr><th>Port</th><th>Call</th><th>Quality</th><th>Node Count</th><th>Frame Count</th><th>Retries</th><th>Percent</th><th>Maxframe</th><th>Frack</th><th>Last Heard</th><th>Queued</th><th>Rem Qual</th></tr>";
-char RouteLine[] = "<tr><td>%s%d</td><td>%s%c</td><td>%d</td><td>%d</td><td>%d</td><td>%d</td><td>%d%</td><td>%d</td><td>%d</td><td>%02d:%02d</td><td>%d</td><td>%d</td></tr>";
+char RouteLine[] = "<tr><td>%s%d</td><td>%s%s</td><td>%d</td><td>%d</td><td>%d</td><td>%d</td><td>%d%</td><td>%d</td><td>%d</td><td>%02d:%02d</td><td>%d</td><td>%d</td></tr>";
char xNodeHddr[] = "<align=center><form align=center method=get action=/Node/Nodes.html>"
"<table align=center bgcolor=white>"
"<tr><td><input type=submit class='btn' name=a value=\"Nodes Sorted by Alias\"></td><td>"
@@ -2412,7 +2413,10 @@ doHeader: if (Session == 0)
Session = &Dummy;
- Session->TNC = LOCAL; // TNC is only used on Web Terminal Sessions so can reuse as LOCAL flag
+ if (LOCAL)
+ Session->TNC = (struct TNCINFO *)(uintptr_t)1; // TNC is only used on Web Terminal Sessions so can reuse as LOCAL flag
+ else
+ Session->TNC = 0;
WriteFile(hPipe, Session, sizeof (struct HTTPConnectionInfo), &InputLen, NULL);
WriteFile(hPipe, MsgPtr, MsgLen, &InputLen, NULL);
@@ -3796,7 +3800,7 @@ doHeader: int MaxRoutes = MAXNEIGHBOURS;
int count;
char Normcall[10];
- char locked;
+ char locked[4] = " ";
int NodeCount;
int Percent = 0;
int Iframes, Retries;
@@ -3812,10 +3816,14 @@ doHeader: int len = ConvFromAX25(Routes->NEIGHBOUR_CALL, Normcall);
Normcall[len]=0;
- if ((Routes->NEIGHBOUR_FLAG & 1) == 1)
- locked = '!';
+ if (Routes->NEIGHBOUR_FLAG == LOCKEDBYCONFIG)
+ strcpy(locked, "!");
+ else if (Routes->NEIGHBOUR_FLAG == LOCKEDBYSYSOP)
+ strcpy(locked, "!!");
+ else if (Routes->NEIGHBOUR_FLAG == LOCKEDBYSYSOP + LOCKEDBYCONFIG)
+ strcpy(locked, "!!!");
else
- locked = ' ';
+ strcpy(locked, " ");
NodeCount = COUNTNODES(Routes);
@@ -4322,7 +4330,7 @@ int ProcessMailAPISignon(struct TCPINFO * TCP, char * MsgPtr, char * Appl, char {
int ReplyLen = 0;
char * input = strstr(MsgPtr, "\r\n\r\n"); // End of headers
- char * user, * password, * Key;
+ char * user, * password;
struct HTTPConnectionInfo * NewSession;
int i;
struct UserRec * USER;
|
