mirror of
https://forge.fsky.io/lda/Parsee.git
synced 2026-03-13 21:25:11 +00:00
[WIP/FIX] Lock write operations to XMPP
I *think* that fixes stream errors with two threads writing at once. Even if it doesn't, I think it's always a nice-to-have.
This commit is contained in:
parent
42d69226f0
commit
37155316b2
4 changed files with 32 additions and 0 deletions
|
|
@ -3,9 +3,14 @@
|
|||
|
||||
#include <Cytoplasm/Stream.h>
|
||||
|
||||
#include <pthread.h>
|
||||
|
||||
#include <XML.h>
|
||||
|
||||
typedef struct XMPPComponent {
|
||||
/* A lock for all write operations */
|
||||
pthread_mutex_t write_lock;
|
||||
|
||||
char *host;
|
||||
Stream *stream;
|
||||
} XMPPComponent;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue