Commit graph

347 commits

Author SHA1 Message Date
665da9d33e Fix port binding error. 2022-08-24 14:37:32 -04:00
8801afaeb2 Properly initialize and destroy the mutex 2022-08-24 11:25:16 -04:00
be001fb17a Make HttpServer utilize Queue. 2022-08-24 10:06:14 -04:00
ab4afe1587 Add basic Queue implementation. 2022-08-24 09:06:27 -04:00
315589cd1b Accept #29 2022-08-21 12:35:16 -04:00
538412d1c2 Apply #26 2022-08-12 21:30:03 -04:00
30ae6586b2 Accept #28, with modifications. 2022-08-12 19:32:06 -04:00
af03988db7 Poll the socket for data events. 2022-08-11 21:19:52 -04:00
d9c944871a Abstract socket creation and binding behind the HttpServer API. 2022-08-11 20:13:10 -04:00
e94212b080 Bind to socket; HTTP server event thread; signal handling. 2022-08-11 19:40:13 -04:00
9cf2266ece Make TelodendriaConfigParse() actually validate the listenPort.
I want to already have a valid port number by the time we need to bind
to it.
2022-08-11 11:50:35 -04:00
4304a28302 TelodendriaConfigParse() doesn't modify the LogConfig.
Also pledge() and unveil() as soon as possible, to avoid the log file
breaking out.
2022-08-10 21:13:05 -04:00
9ae05e84f2 Implement user validation. 2022-08-10 11:58:39 -04:00
2324d9982f Format code. 2022-08-09 21:05:10 -04:00
d9e355edb9 Relocate free() in HashMap to a sensible location. 2022-08-09 21:02:57 -04:00
560624ba98 Fix memory leak in HashMap 2022-08-09 20:23:25 -04:00
76937a57a4 Check return value of fgets() in Json.c 2022-08-09 20:18:13 -04:00
a24d9b6c29 Fix memory error? 2022-08-09 20:10:45 -04:00
cdd7808642 Prototype the configuration file parser.
Right now there's a nasty memory bug I need to fix. Will have to run this
through valgrind.
2022-08-09 20:05:41 -04:00
9d496c29ac Finish initial draft of JSON parser. 2022-08-09 13:19:14 -04:00
7630294cb7 Basic implementation of JsonTokenSeek() 2022-08-02 21:47:27 -04:00
f48f7c088c Begin prototyping JsonDecode 2022-08-02 16:58:15 -04:00
fa0bd9a7c6 Apply #14 2022-07-29 15:36:21 -04:00
8e8ac04505 Start documenting the headers. 2022-07-29 12:32:52 -04:00
1087069416 Fix some invalid structures. 2022-07-29 12:32:46 -04:00
787a891cb8 JsonValueFree() should take care of strings too. 2022-07-28 22:21:49 -04:00
b3e71c32fd Update license text. 2022-07-28 12:00:52 -04:00
e519621d25 recipe_format now updates source code headers.
Note that it does depend on new source code files *having* a header,
even if it's just a blank block comment.
2022-07-28 11:46:57 -04:00
c991d93444 Add license headers to all source files. 2022-07-28 11:15:04 -04:00
6b8d0f6d5f Add canonical Json implementation. 2022-07-27 17:28:05 -04:00
c143136097 Implement JsonFree(), make string handling UTF-8 aware. 2022-07-27 17:27:34 -04:00
39af3c2194 Add ArraySort() 2022-07-27 15:31:34 -04:00
4c7ec4af56 Add UtilUtf8Encode() and UtilServerTs() 2022-07-27 13:47:20 -04:00
987b1653f1 Add UtilUtf8Encode() and UtilServerTs()
Also updated Json.c to use UtilUtf8Encode() when decoding JSON strings.
2022-07-27 13:47:12 -04:00
90ed321caa Fix typo in Json.c 2022-07-27 11:30:46 -04:00
bf0eb4543e Fix error in Log.c where we were comparing different types. 2022-07-27 09:53:53 -04:00
bc849819d9 Make HashMap and Json conform to C89.
Clang on OpenBSD didn't catch this, but GCC on Linux did.
2022-07-27 09:47:22 -04:00
4e0543b028 Add proper JSON string encoding and decoding. 2022-07-26 13:08:46 -04:00
644733c74e Add a static JsonEncodeString() method.
Right now it just calls fprintf(), but in the future, it will
properly encode a string for JSON output.
2022-07-26 09:10:17 -04:00
8689c95b68 Begin work on Json library. Have a working JsonEncode() 2022-07-25 22:56:14 -04:00
90c4709823 Fix HashMapIterate not resetting the iterator at the right place. 2022-07-25 22:55:22 -04:00
ace2682dec Rework HashMapIterate to be more flexible.
We now get the keys, and we don't have to operate within the confines
of a callback function.
2022-07-25 21:31:09 -04:00
580b036d26 Add key to bucket, make iteratorFunc in HashMapIterate take it. 2022-07-25 16:26:30 -04:00
3437c5db2c Format headers as well.
indent(1) does a weird thing with prototype functions, but it's good
enough for me, as long as it's consistent.
2022-07-25 15:25:06 -04:00
aabb2a0203 Run indent(1) on all C source files. 2022-07-25 15:18:35 -04:00
768430f614 Update link in log header. 2022-07-23 00:50:12 -04:00
d102ba8676 Initial revision 2022-07-22 20:19:12 -04:00