Skip to content

Commit ed545c7

Browse files
committed
Depend on libstrophe-0.10.0+
libstrophe-0.10.0 introduces global timed handlers which we use for re-connection logic.
1 parent 764572f commit ed545c7

File tree

3 files changed

+3
-11
lines changed

3 files changed

+3
-11
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Build requirements
2323

2424
xmppconsole has only 1 required dependency:
2525

26-
* [libstrophe](https://github.com/strophe/libstrophe)
26+
* [libstrophe](https://github.com/strophe/libstrophe) version 0.10.0 or higher
2727

2828
You will need the following dependencies in order to build optional UI modules.
2929

configure.ac

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@ AC_CONFIG_FILES([Makefile])
66
AC_PROG_CC
77
AM_PROG_CC_C_O
88

9-
PKG_CHECK_MODULES([libstrophe], [libstrophe >= 0.9.0],
9+
PKG_CHECK_MODULES([libstrophe], [libstrophe >= 0.10.0],
1010
[
1111
LIBS="$libstrophe_LIBS $LIBS"
1212
CFLAGS="$CFLAGS $libstrophe_CFLAGS"
1313
],
14-
[AC_MSG_ERROR([libstrophe is required])])
14+
[AC_MSG_ERROR([libstrophe 0.10.0 or higher is required])])
1515

1616
#
1717
# Ncurses UI module

src/xmppconsole.c

-8
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,6 @@
3737
#include <string.h>
3838
#include <strophe.h>
3939

40-
/* #define HAVE_NEW_LIBSTROPHE 1 */
41-
4240
#define XC_RECONNECT_TIMER 3000
4341

4442
static int xc_reconnect_cb(xmpp_ctx_t *xmpp_ctx, void *userdata);
@@ -66,11 +64,9 @@ static void xc_conn_handler(xmpp_conn_t *conn,
6664
if (signalled || xc_ui_is_done(ctx->c_ui))
6765
xc_ui_quit(ctx->c_ui);
6866
else {
69-
#ifdef HAVE_NEW_LIBSTROPHE
7067
xmpp_global_timed_handler_add(ctx->c_ctx,
7168
xc_reconnect_cb,
7269
XC_RECONNECT_TIMER, ctx);
73-
#endif /* HAVE_NEW_LIBSTROPHE */
7470
}
7571
}
7672
}
@@ -193,12 +189,8 @@ int main(int argc, char **argv)
193189
xc_ui_ctx_set(&ui, &ctx);
194190
rc = xc_connect(xmpp_conn, &ctx);
195191
if (rc != 0) {
196-
#ifdef HAVE_NEW_LIBSTROPHE
197192
xmpp_global_timed_handler_add(xmpp_ctx, xc_reconnect_cb,
198193
XC_RECONNECT_TIMER, &ctx);
199-
#else
200-
(void)xc_reconnect_cb;
201-
#endif /* HAVE_NEW_LIBSTROPHE */
202194
}
203195

204196
g_ctx = &ctx;

0 commit comments

Comments
 (0)