From a10a8fb335e5a817e1a9add49ee179394eea67c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anton=20Luka=20=C5=A0ijanec?= Date: Sun, 26 Dec 2021 19:52:31 +0100 Subject: fixed parser, fixed leak, O(log n) storage - tsearch(3) - 0.0.17 --- src/main.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/main.c') diff --git a/src/main.c b/src/main.c index 6576fb8..32c7e96 100644 --- a/src/main.c +++ b/src/main.c @@ -21,6 +21,9 @@ #include #include #include +#ifndef SC_OLD_STORAGE +#include +#endif #include #include unsigned char sc_hp[] = { /* html page null terminated format string, from file src/hp.html */ @@ -39,7 +42,7 @@ char sc_securitytxt[] = "# This content information is provided by the developer "Encryption: https://www.sijanec.eu/pgp-key.txt\n" "Expires: Thu, 31 Dec 2021 18:37:07 -0800\n" "Preferred-Languages: sl, en, de, hr\n"; -#define SC_HTTP_PORT 7327 /* SEAR on mobile keyboard */ +#define SC_HTTP_PORT (getenv("SC_PORT") ? atoi(getenv("SC_PORT")) : 7327) /* SEAR on mobile keyboard */ #define SC_HTTP_RBUFSIZE 4096 /* initial size of http read buffer, increasning by K */ #define SC_HTTP_USER_AGENT "Nokia WAP Gateway 4.1 CD1/ECD13_D/4.1.04)" /* so google and others sends a minimal response */ #define SC_HTTP_HEADERS "User-Agent: " SC_HTTP_USER_AGENT "\r\n" -- cgit v1.2.3