summaryrefslogtreecommitdiff
path: root/net.c
diff options
context:
space:
mode:
Diffstat (limited to 'net.c')
-rw-r--r--net.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/net.c b/net.c
index 970ede8..e5d8285 100644
--- a/net.c
+++ b/net.c
@@ -71,10 +71,18 @@ static int roster_handler(xmpp_conn_t *conn, xmpp_stanza_t *stanza,
return 1;
}
-static void conn_handler(xmpp_conn_t *conn, xmpp_conn_event_t status,int error,
- xmpp_stream_error_t *stream_error, void *userdata) {
+static void conn_handler(xmpp_conn_t* conn, xmpp_conn_event_t status,int error,
+ xmpp_stream_error_t* stream_error, void* userdata) {
// FIXME handle error and stream_error (this could be a major bug)
+ // this implements at least debugging:
+ if (error != 0) {
+ fprintf(stderr, "conn_handler got error=%d\n", error);
+ }
+ if (stream_error != NULL) {
+ fprintf(stderr, "conn_handler got stream_error of type %d\n",
+ stream_error->type);
+ }
switch (status) {