Commit graph

175 commits

Author SHA1 Message Date
c8cd2cebb7 Implement DbDelete() 2022-12-15 02:39:58 +00:00
abb4a9cf20 More work on registration endpoint. 2022-12-15 01:48:49 +00:00
d48b6fc456 Add username check logic 2022-12-14 21:23:20 +00:00
5080d066ab Remove some debug statements; make route error more specific. 2022-12-14 18:41:01 +00:00
e37e6f1bb8 Fix some memory bugs. 2022-12-14 18:19:20 +00:00
5880cf3ea0 Check paths for /available and /(email|msisdn)/requestToken 2022-12-14 16:21:01 +00:00
0305ef183d Begin work on RouteRegister 2022-12-14 15:40:23 +00:00
e7e25cade5 Fix an instance of setting response headers after they were sent. 2022-12-14 15:02:10 +00:00
708a840ec0 Fix memory leak when attempting to parse something that isn't JSON. 2022-12-14 14:54:06 +00:00
ede060ef59 Add ASCII logo! 2022-12-13 17:09:05 +00:00
aaa97f8752 Format code 2022-12-13 13:24:54 +00:00
e17b64dcb2 Document Routes 2022-12-12 17:34:59 +00:00
e7030ec57a Document Matrix.h 2022-12-12 16:59:13 +00:00
fe2c4de1b6 Remove unused variable. I thought I'd use it but I probably won't. 2022-12-11 00:19:17 +00:00
d56aaa921d Fully abstract route paths, move them to Routes.h. 2022-12-11 00:14:22 +00:00
323dad1f8b Document TelodendriaConfig 2022-12-10 23:34:32 +00:00
152d444e32 Fix /_matrix/client/versions and remove logging in RouteLogin 2022-12-10 16:01:58 +00:00
8acc21db7c Add RouteLogin() 2022-12-10 15:41:33 +00:00
3b636a9d22 Update routing slightly, apply #35 to new RouteLogin 2022-12-10 15:41:19 +00:00
fb5a8e4587 Convert configuration file to JSON 2022-12-09 23:57:30 +00:00
d0c81a8136 Fix potential memory leak if duplicate keys exist in a JSON object. 2022-12-06 21:26:33 +00:00
01a6d71101 Remove Constants.h 2022-11-30 18:30:39 +00:00
5771e615d7 Document CanonicalJson 2022-11-30 18:23:25 +00:00
439e14a410 Format header 2022-11-30 17:59:19 +00:00
5610cafe46 Document Json 2022-11-30 17:54:10 +00:00
6900d0649e Begin working on Util man page 2022-11-25 21:54:57 +00:00
8045c583ba Write man page for Log 2022-11-25 16:40:47 +00:00
70bdf81df7 Fix references to old LOG_ constants 2022-11-24 18:51:07 +00:00
399939654a Fix a few areas where obscure compilers sometimes choke 2022-11-23 17:31:57 +00:00
7544a97c7d Format source code, add .exrc 2022-11-23 14:56:31 +00:00
84f311ae09 Don't make assumptions about where the config file is. 2022-11-23 14:31:05 +00:00
520b062dbb Should probably make sure this succeeds. 2022-11-23 00:44:29 +00:00
b155d0dbe4 ftruncate() technically lives in unistd.h
It should be included to prevent warnings on some compilers.
2022-11-22 22:31:36 +00:00
7f883fc92e Remove debugging statements... whoops!
I'm usually pretty good about this.
2022-11-21 21:09:05 +00:00
973e826e57 Fix bug in floating objects to mostRecent 2022-11-21 21:07:40 +00:00
40e5c1ef2a Fix some bugs in DbCreate() regarding UtilMkdir() 2022-11-21 20:59:22 +00:00
789baf33a1 Make Db interfaces take varargs.
This makes it much more flexible, at the expense of making it a little
more fragile. I can think of a number of scenarios where we'll have
paths that have variables in multiple spots, and I don't want to do
sprintf() magic every time I need to access an object at one of those
paths.
2022-11-21 20:31:37 +00:00
a0304f4062 Move where we open the database 2022-11-21 16:39:38 +00:00
0c6c1e5b19 Notify the user about the minimum max-cache instead of silently setting it. 2022-11-21 16:22:50 +00:00
cd584c1e93 Lock objects on disk if they're locked in memory.
This requires hanging onto an open file handle, and doesn't require
explicit unlocking, because POSIX says files are unlocked when their
descriptors are closed.
2022-11-21 16:13:11 +00:00
0fa2da8177 Don't chroot() on OpenBSD (pledge() causes it to trap here) 2022-11-20 13:19:56 +00:00
07f4ecd2d7 Make a number of improvements to cache handling.
- Items that are too big for the cache are now no longer immediately
  evicted; everything else is. This is probably not desirable, but it is
  not unexpected.
- Multithreading now should work as expected; DbRefs are locked before
  they are updated from the disk, and they are not evicted from the cache
  if they are locked by another thread.
- The cache may be no smaller than 1024 bytes. Previously the caller of
  DbOpen() could choose to disable the cache, and provisions were made in
  the code to support this, but this is now no longer possible because
  without the cache, there would be no way to know what files were open,
  which could lead to a race condition if two threads open the same file.
2022-11-18 22:17:56 +00:00
045c6d8644 Cache eviction 2022-11-18 20:42:08 +00:00
e7ad166877 Fix some memory leaks in Db 2022-11-18 19:36:15 +00:00
f6851de75f Fix a few bugs in JsonDecode(). It should now properly decode objects. 2022-11-18 14:51:44 +00:00
2e6c129263 Fix a mutex bug in Db and some memory errors in Json 2022-11-17 23:51:45 +00:00
d26fad4619 Add UtilMkdir() to recursively make directories 2022-11-17 22:57:29 +00:00
9597894356 Fix some warnings on GCC.
These aren't really anything to be concerned about, but making GCC feel good
about my code makes me feel better about my code.
2022-11-17 19:33:59 +00:00
46cc1df385 Do some Db work 2022-11-15 18:20:05 +00:00
a356403cfd Finish DbComputeSize() 2022-11-12 18:26:31 +00:00