Commit graph

121 commits

Author SHA1 Message Date
6dcfa7dc02 Remove send-patch and tp. See #20. 2023-09-09 16:58:47 -04:00
fd28f97449 Finish remaining issues in TODO.txt and add docs/ROADMAP.md. 2023-09-05 21:30:09 -04:00
5f3220372e Implement filter validation by using j2s. 2023-08-05 13:46:23 +00:00
539fde773f Fix CanonicalJson and ArraySort. 2023-06-21 02:37:56 +00:00
8f0d197480 Bump version: v0.3.0 -> v0.4.0 2023-06-16 16:01:19 +00:00
2f946848cb Telodendria Bot can now send messages again.
The problem here is that some Matrix homeservers reject requests that don't
have a Content-Length. http was not sending a Content-Length because it was
reading from standard input. By reading from an actual file, we can actually
easily get the size of the file to send as the Content-Length.
2023-06-12 14:01:56 +00:00
88f73a6131 Fix a few segfaults in http and json. 2023-05-29 22:48:50 +00:00
51b9e2eaed Clean Cytoplasm when td clean is run. 2023-05-21 13:34:05 +00:00
f2f972bb9d Fix memory leaks in hdoc. 2023-05-15 22:38:52 +00:00
4043285413 Telodendria and all tools now use the Cytoplasm runtime stub.
This reduces the amount of manual work programs have to do, and gives us
some free features, like automatic leak reports in all tools.
2023-05-14 22:15:48 +00:00
8021cff122 Make Telodendria use Cytoplasm.
This commit removes all the duplicate code and makes Telodendria use the
new Cytoplasm library.
2023-05-14 19:35:23 +00:00
609890654e Fix handling of STATIC and broken compilation on GNU systems. 2023-05-10 03:32:56 +00:00
3d9a7664b1 Add support for building static and shared libraries. 2023-05-06 17:04:35 +00:00
f1f66c6331 Fix the Makefile by sourcing tools/env.sh if TELODENDRIA_ENV is unset. 2023-04-30 01:47:27 +00:00
abbbfe4d7f Replace all usages of curl in tp, document tp and tt. 2023-04-29 23:28:33 +00:00
e0c94d7bd2 Site now pulls built man pages. 2023-04-29 18:39:01 +00:00
a00ded6d06 Add support for parsing global variables, not just function declarations. 2023-04-27 20:04:15 +00:00
9292f1d9da Add docs recipe for generating documentation from the headers.
Note that since all the headers are not documented yet, this will fail
because an undocumented function is a fatal error in hdoc.
2023-04-27 18:39:05 +00:00
9880aac674 Split format recipe into format and license.
Format formats only C source code. License applies the license file to
C source code *and* header files.
2023-04-27 18:03:32 +00:00
fdcf7ec065 Update changelog, add LD_EXTRA variable in td. 2023-04-26 01:43:32 +00:00
d933d12e1b Make Rand use a provided Mersenne Twister.
This implementation is loosely inspired by the original paper on the
Mersenne Twister, and borrows code from a public-domain implementation of
it, adapting it to fit the style of Telodendria's code, and fixing a few
bugs regarding the size of the data type used.

Neither C nor POSIX provide a good, thread-safe pseudorandom number
generator. The OpenBSD linker started complaining about the use of
rand_r(), and no standard alternative presented itself as worthy of
consideration, so I finally decided it was time to roll my own PRNG.
2023-04-25 21:28:55 +00:00
0cca38115a Move configuration to database, add process control API, fix memory leaks. 2023-04-19 00:33:38 +00:00
3192063340 Fix broken tt script. 2023-04-07 14:20:22 +00:00
e0c8530b12 Clean up http client enough to replace curl in send-patch. 2023-04-01 02:46:07 +00:00
aeb49f80e5 Add support for OpenSSL. This is a good demo of how easy it is to support TLS libraries. 2023-03-24 02:41:01 +00:00
007e639b0c Don't require the TLS_ in the environment variable.
It's redundant.
2023-03-24 00:25:44 +00:00
e13442c122 Fix strange behavior in TlsLibreSSL.
tls_read() and tls_write() may return TLS_WANT_POLLIN or TLS_WANT_POLLOUT
if data isn't ready to be read or written yet. We have to account for this
by converting it to EAGAIN, which is how a typical read() or write()
function should behave.

Also installed a SIGPIPE handler; we do not want to be terminated by
SIGPIPE, and it's safe to ignore this signal because it should be
handled thoroughly in the code.
2023-03-23 16:39:15 +00:00
b8d00bc8bf Make td run warn if Memory.txt gets created. 2023-03-22 14:57:57 +00:00
6561b5bae1 Add TLS build support to td. 2023-03-22 01:17:42 +00:00
d1b4ecff48 Apparently the order of LDFLAGS matters to some compilers.
Also don't to -pg in debug mode, because that's not supported on all
compilers either.
2023-03-22 00:13:27 +00:00
5289c16e2b Convert all code to new Stream API.
Also made a number of improvmements to tt, making it compatible with more
shells.
2023-03-18 14:32:09 +00:00
5dbaf3c223 Apply #65, remove printf() in Db, and make tt show login messages. 2023-03-15 13:36:49 +00:00
62cd1cdc98 Misc changes. 2023-03-12 03:37:57 +00:00
3037f12907 Add tt and http-debug-server tools. 2023-03-10 18:48:52 +00:00
2d9b706f38 Fix I/O in JsonConsumeWhitespace() and UtilStreamCopy().
These functions previously operated on the assumption that fgetc() would
block; however it will not block on HttpServer streams because those are
non-blocking. They now check error conditions properly before failing
prematurely.
2023-03-10 18:46:03 +00:00
8ead9cc93a Apply #63, make some general bug fixes. 2023-03-10 03:24:04 +00:00
ca053a12b1 Break out main() into Main.c, fix some compile warnings on Cygwin. 2023-03-09 02:46:04 +00:00
012c334ee5 Make send-patch use json instead of jq. 2023-03-09 00:06:15 +00:00
20ebeb9c32 Switch tp from using jq to json; format td 2023-03-08 22:47:40 +00:00
19e89110cd Bump version number to v0.3.0 2023-03-08 03:46:38 +00:00
8d75d8a023 Add simple HTTP CLI tool that uses the HttpClient API.
You might be asking why I would just write a simple curl replacement
when curl does the job just fine. Well, the most immediate reason is
to test the HttpClient API, but since Telodendria's goal is to not
be dependent on any third-party code if at all possible, it makes
sense to have a simple HTTP client to use not only for testing
Telodendria, but also for configuring it. When we move the
configuration to the database, we'll ship a script that uses this
tool to allow admins to easily submit API requests.

Do not be concerned that HttpClient does not support TLS yet. TLS
support is necessary for federation to work, so it is coming
eventually.
2023-03-08 03:30:36 +00:00
fc8fbc9a70 I forgot to set the date in the changelog. 2023-03-07 00:51:16 +00:00
17734c90e8 This is unnecessary. 2023-03-06 23:54:55 +00:00
154e5b82df Looks like CVS is being weird with Mdocdate strings. 2023-03-06 23:51:55 +00:00
7750963c29 Something weird is going on here. 2023-03-06 23:49:30 +00:00
8c2ed1c8f1 Apply #59 2023-03-04 15:34:44 +00:00
55b3728e7e Bake the platform name into the version number.
This is helpful as we're porting to different operating systems. I guess
it just makes the porting effort more satisfying. Seeing this header
makes me happy:

Server: Telodendria/0.2.0-Haiku
2023-03-01 03:19:21 +00:00
2b77681763 Move getent check to common.sh 2023-03-01 03:11:10 +00:00
dd1b26bad8 Only use getent if the command can be found. 2023-03-01 03:09:46 +00:00
755d08946a Add some more obscure platforms to td build script. 2023-03-01 03:08:53 +00:00