[MOD/FIX] Separate XMPP thread, fix EINVAL issue

threading is good actually. please hmu if you ever trigger the
achievement.
This commit is contained in:
LDA 2024-07-17 22:55:25 +02:00
commit 143bdf0a5a
21 changed files with 2314 additions and 1764 deletions

View file

@ -15,7 +15,7 @@ Command *
CommandParse(char *cmd)
{
Command *ret;
char *end_data, *cur, *namestart;
char *end_data, *cur, *namestart = NULL;
char *key = NULL, *val = NULL;
size_t len;
CommandState state = STATE_WHITE;
@ -60,7 +60,7 @@ CommandParse(char *cmd)
}
break;
case STATE_NAME:
if (c == '=')
if (c == '=' && namestart)
{
len = cur - namestart;
key = Malloc(len + 1);