diff options
author | James Booth <boothj5@gmail.com> | 2015-03-29 00:21:18 +0000 |
---|---|---|
committer | James Booth <boothj5@gmail.com> | 2015-03-29 00:21:18 +0000 |
commit | 24a45e5292b1aaf0977d2af801827f5738a6b9c1 (patch) | |
tree | fd3e7a4317c5333c250c05a81a25765879dd9b5b /src/xmpp/iq.c | |
parent | fac2b2cf665e72f0f7fe66232952401274d51ee7 (diff) | |
download | profani-tty-24a45e5292b1aaf0977d2af801827f5738a6b9c1.tar.gz |
Set members only property when getting room features
Diffstat (limited to 'src/xmpp/iq.c')
-rw-r--r-- | src/xmpp/iq.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/xmpp/iq.c b/src/xmpp/iq.c index 028c586e..573a50ef 100644 --- a/src/xmpp/iq.c +++ b/src/xmpp/iq.c @@ -178,14 +178,14 @@ iq_disco_info_request(gchar *jid) } void -iq_room_info_request(gchar *room) +iq_room_info_request(const char * const room) { xmpp_conn_t * const conn = connection_get_conn(); xmpp_ctx_t * const ctx = connection_get_ctx(); char *id = create_unique_id("room_disco_info"); xmpp_stanza_t *iq = stanza_create_disco_info_iq(ctx, id, room, NULL); - xmpp_id_handler_add(conn, _disco_info_response_handler, id, room); + xmpp_id_handler_add(conn, _disco_info_response_handler, id, strdup(room)); free(id); @@ -1362,6 +1362,7 @@ _disco_info_response_handler(xmpp_conn_t * const conn, xmpp_stanza_t * const sta char *error_message = stanza_get_error_message(stanza); if (room) { handle_room_info_error(room, error_message); + free(room); } else { handle_disco_info_error(from, error_message); } @@ -1422,6 +1423,10 @@ _disco_info_response_handler(xmpp_conn_t * const conn, xmpp_stanza_t * const sta g_slist_free_full(features, free); g_slist_free_full(identities, (GDestroyNotify)_identity_destroy); } + + if (room) { + free(room); + } return 1; } |