mirror of
https://forge.fsky.io/lda/Parsee.git
synced 2026-03-13 21:15:11 +00:00
[FIX] Kill Parsee on unexcepted stream closure
This commit is contained in:
parent
ff5f085b7f
commit
02a89270c0
6 changed files with 49 additions and 15 deletions
|
|
@ -60,6 +60,7 @@ typedef struct ParseeData {
|
|||
HttpRouter *router;
|
||||
CommandRouter *handler;
|
||||
|
||||
HttpServer *server;
|
||||
XMPPComponent *jabber;
|
||||
|
||||
Db *db;
|
||||
|
|
@ -69,6 +70,10 @@ typedef struct ParseeData {
|
|||
|
||||
HashMap *oid_servers;
|
||||
pthread_mutex_t oidl;
|
||||
|
||||
/* If Parsee was intentionally halted */
|
||||
bool halted;
|
||||
pthread_mutex_t halt_lock;
|
||||
} ParseeData;
|
||||
|
||||
typedef struct Argument {
|
||||
|
|
@ -285,7 +290,11 @@ extern bool ParseeGetDMOrigin(ParseeData *data, char *chat_id, char *ev, char **
|
|||
/* Sends presence requests for every MUC around as a fake JID */
|
||||
extern void ParseeSendPresence(ParseeData *);
|
||||
|
||||
extern bool ParseeInitialiseSignals(HttpServer *, pthread_t, XMPPComponent *);
|
||||
/** Initialises signal-handling code within Parsee.
|
||||
* --------------------
|
||||
* Modifies: the signal handler
|
||||
* Returns: whenever it has properly been setup */
|
||||
extern bool ParseeInitialiseSignals(ParseeData *data, pthread_t xmpp);
|
||||
|
||||
/* Job used to cleanup Parsee data that isn't necessary anymore. */
|
||||
extern void ParseeCleanup(void *data);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue