[FIX/CI] Make the C compiler less stupid

(You may notice that the dates for these commits are off. I'm
currently writing them without an Internet connection, and the
device I'm writing this through doesn't have an RTC. Oops!)
This commit is contained in:
LDA 2024-10-20 15:12:08 +02:00
commit 44d6df3be8
3 changed files with 29 additions and 12 deletions

View file

@ -13,17 +13,22 @@ commit done between releases.
*There is currently no beta releases of Parsee*
## Alpha
### v0.2.0[star-of-hope] <X/X/XXXX>
### v0.2.0[star-of-hope] <X/X/2024?>
Fixes some media metadata things, replaces the build system,
tries out avatar support some more and speeds up Parsee a tad
bit.
#### New things
- Start dealing with some basic PEP and vCard-based avatars.
- Allows experimental MbedTLS through a specific Cytoplasm
patch.
- Banning Parsee from a XMPP MUC effectively unlinks it.
- Start adding basic documentation to Parsee
- Start dealing with some basic PEP and vCard-based avatar
support from both sides.
- Banning Parsee from a XMPP MUC effectively unlinks it from
the MUC.
- Start adding basic documentation to Parsee, through the
wiki page.
- Add MUC whitelists for plumbing, alongside a `whitelist` tool
- Add (yet unused) parameter for setting the max stanza size
allowed.
- Allows experimental MbedTLS through a specific Cytoplasm
patch (though still unstable AND slow).
#### Bugfixes
- Adds more information to media events so that clients can
@ -34,10 +39,20 @@ Android's weird rendering.
- Start fixing bug where Parsee takes several seconds to send
a message coming from XMPP with MbedTLS(it is still slow and
unstable)
- Fix issue where the XMPP server would kill Parsee if avatars
are too large.
- Refactor some of the code to abstract sending stanzas down
the wire to a specific function, thus allowing us to check
for certain conditions more easily(for example, verifying the
size on the fly, or having extensions being able to postprocess
the stanza).
- Parsee now stops when a stream error is received, instead of
being in a limbo state.
#### Deprecated features
- The old `build.c` and `Makefile`s used for building are removed,
and replaced by the `configure.c` C file(/script via TCC).
### v0.1.0[tomboyish-bridges-adventure] <9/9/2024>
Nothing much to say, but this is the first alpha release
of Parsee. May occasionally deadlock.

View file

@ -588,7 +588,7 @@ ParseeUnlinkRoom(ParseeData *data, char *chat_id)
bool
ParseeIsMUCWhitelisted(ParseeData *data, char *muc)
{
char *server, *serv_start;
char *server, *serv_start, *postserv;
DbRef *ref;
bool ret;
if (!data || !muc)
@ -604,9 +604,10 @@ ParseeIsMUCWhitelisted(ParseeData *data, char *muc)
serv_start = strchr(muc, '@');
serv_start = serv_start ? serv_start : muc;
server = StrDuplicate(serv_start + 1);
if (strchr(server, '/'))
postserv = server ? strchr(server, '/') : NULL;
if (postserv) /* GCC doesn't know strchr is pure. */
{
*(strchr(server, '/')) = '\0';
*postserv = '\0';
}
ref = DbLockIntent(data->db,

View file

@ -121,7 +121,7 @@ ParseeVerifyAllStanza(ParseeData *args, XMLElement *stanza)
bool
ServerHasXEP421(ParseeData *data, char *from)
{
char *server = NULL, *parsee;
char *server = NULL, *postserv, *parsee;
XMLElement *disco;
bool ret = false;
if (!data || !from)
@ -140,9 +140,10 @@ ServerHasXEP421(ParseeData *data, char *from)
}
server = StrDuplicate(server);
if (strchr(server, '/'))
postserv = server ? strchr(server, '/') : NULL;
if (postserv)
{
*(strchr(server, '/')) = '\0';
*postserv = '\0';
}
parsee = ParseeJID(data);