[ADD/WIP] Start unifying DMs and MUCs

I really need to dispatch XMPP stanza management.
This commit is contained in:
LDA 2024-07-03 14:40:26 +02:00
commit 5f2c3a9cb8
10 changed files with 570 additions and 87 deletions

View file

@ -8,6 +8,7 @@
static HttpServer *server = NULL;
static pthread_t xmpp_thr;
static bool valid = true;
static XMPPComponent *jabber = NULL;
static void
@ -34,6 +35,7 @@ SignalHandler(int signal)
Log(LOG_INFO, "Killing thread...");
XMPPKillThread(jabber, "killer");
pthread_join(xmpp_thr, NULL);
valid = false;
Log(LOG_INFO, "Stopping server...");
HttpServerStop(server);
break;
@ -50,6 +52,8 @@ ParseeInitialiseSignals(HttpServer *s, pthread_t xmpp, XMPPComponent *j)
xmpp_thr = xmpp;
jabber = j;
valid = true;
sigAction.sa_handler = SignalHandler;
sigfillset(&sigAction.sa_mask);
sigAction.sa_flags = SA_RESTART;