[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* *There is currently no beta releases of Parsee*
## Alpha ## 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, Fixes some media metadata things, replaces the build system,
tries out avatar support some more and speeds up Parsee a tad tries out avatar support some more and speeds up Parsee a tad
bit. bit.
#### New things #### New things
- Start dealing with some basic PEP and vCard-based avatars. - Start dealing with some basic PEP and vCard-based avatar
- Allows experimental MbedTLS through a specific Cytoplasm support from both sides.
patch. - Banning Parsee from a XMPP MUC effectively unlinks it from
- Banning Parsee from a XMPP MUC effectively unlinks it. the MUC.
- Start adding basic documentation to Parsee - Start adding basic documentation to Parsee, through the
wiki page.
- Add MUC whitelists for plumbing, alongside a `whitelist` tool - 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 #### Bugfixes
- Adds more information to media events so that clients can - 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 - Start fixing bug where Parsee takes several seconds to send
a message coming from XMPP with MbedTLS(it is still slow and a message coming from XMPP with MbedTLS(it is still slow and
unstable) 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 #### Deprecated features
- The old `build.c` and `Makefile`s used for building are removed, - The old `build.c` and `Makefile`s used for building are removed,
and replaced by the `configure.c` C file(/script via TCC). and replaced by the `configure.c` C file(/script via TCC).
### v0.1.0[tomboyish-bridges-adventure] <9/9/2024> ### v0.1.0[tomboyish-bridges-adventure] <9/9/2024>
Nothing much to say, but this is the first alpha release Nothing much to say, but this is the first alpha release
of Parsee. May occasionally deadlock. of Parsee. May occasionally deadlock.

View file

@ -588,7 +588,7 @@ ParseeUnlinkRoom(ParseeData *data, char *chat_id)
bool bool
ParseeIsMUCWhitelisted(ParseeData *data, char *muc) ParseeIsMUCWhitelisted(ParseeData *data, char *muc)
{ {
char *server, *serv_start; char *server, *serv_start, *postserv;
DbRef *ref; DbRef *ref;
bool ret; bool ret;
if (!data || !muc) if (!data || !muc)
@ -604,9 +604,10 @@ ParseeIsMUCWhitelisted(ParseeData *data, char *muc)
serv_start = strchr(muc, '@'); serv_start = strchr(muc, '@');
serv_start = serv_start ? serv_start : muc; serv_start = serv_start ? serv_start : muc;
server = StrDuplicate(serv_start + 1); 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, ref = DbLockIntent(data->db,

View file

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