diff --git a/src/xmppipe.c b/src/xmppipe.c index ced11e9..9fc8620 100644 --- a/src/xmppipe.c +++ b/src/xmppipe.c @@ -439,17 +439,24 @@ void handle_connection(xmpp_conn_t *const conn, const xmpp_conn_event_t status, xmppipe_state_t *state = userdata; switch (status) { +#ifdef XMPP_CONN_RAW_CONNECT + case XMPP_CONN_RAW_CONNECT: +#endif case XMPP_CONN_CONNECT: if (state->verbose) fprintf(stderr, "DEBUG: connected\n"); xmppipe_next_state(state, XMPPIPE_S_CONNECTED); break; - default: + case XMPP_CONN_DISCONNECT: xmppipe_next_state(state, XMPPIPE_S_DISCONNECTED); if (state->verbose) fprintf(stderr, "DEBUG: disconnected\n"); - errx(EXIT_FAILURE, "handle_connection: disconnected"); + break; + + default: + xmppipe_next_state(state, XMPPIPE_S_DISCONNECTED); + errx(EXIT_FAILURE, "handle_connection: disconnected (%d)", status); } } diff --git a/src/xmppipe.h b/src/xmppipe.h index ff9595e..0cad4fc 100644 --- a/src/xmppipe.h +++ b/src/xmppipe.h @@ -27,7 +27,7 @@ #include "strtonum.h" #endif -#define XMPPIPE_VERSION "0.14.6" +#define XMPPIPE_VERSION "0.14.7" #define XMPPIPE_RESOURCE "xmppipe" #define XMPPIPE_STREQ(a, b) (strcmp((a), (b)) == 0)