From d8a6890873e819991e3436bbbf4ccfdc0c844336 Mon Sep 17 00:00:00 2001 From: Michael Santos Date: Thu, 9 Mar 2023 07:10:54 -0500 Subject: [PATCH] 0.14.6: disable strophe stream management libstrophe 0.12 supports (and enables by default) stream management. The xmppipe session disconnects when strophe and xmppipe both try to handle the stream acknowledgement. * disable strophe stream management * TODO: if strophe SM is available, disable xmppipe SM --- src/xmppipe.c | 6 +++++- src/xmppipe.h | 4 ++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/xmppipe.c b/src/xmppipe.c index 2af6df4..ced11e9 100644 --- a/src/xmppipe.c +++ b/src/xmppipe.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2015-2022, Michael Santos +/* Copyright (c) 2015-2023, Michael Santos * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -78,6 +78,10 @@ int main(int argc, char **argv) { int ch = 0; +#ifdef XMPP_CONN_FLAG_DISABLE_SM + flags |= XMPP_CONN_FLAG_DISABLE_SM; +#endif + if (setvbuf(stdout, NULL, _IOLBF, 0) < 0) err(EXIT_FAILURE, "setvbuf"); diff --git a/src/xmppipe.h b/src/xmppipe.h index dd6a0bc..ff9595e 100644 --- a/src/xmppipe.h +++ b/src/xmppipe.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2015-2022, Michael Santos +/* Copyright (c) 2015-2023, Michael Santos * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -27,7 +27,7 @@ #include "strtonum.h" #endif -#define XMPPIPE_VERSION "0.14.5" +#define XMPPIPE_VERSION "0.14.6" #define XMPPIPE_RESOURCE "xmppipe" #define XMPPIPE_STREQ(a, b) (strcmp((a), (b)) == 0)