1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-11-03 19:37:16 -05:00

Fixed crash on receiving dataform

This commit is contained in:
James Booth 2013-02-03 17:19:10 +00:00
parent 069bdbc331
commit d327a0dd5a
2 changed files with 5 additions and 3 deletions

View File

@ -153,8 +153,10 @@ caps_create_sha1_str(xmpp_stanza_t * const query)
g_string_append(s, "<"); g_string_append(s, "<");
curr_value = g_slist_next(curr_value); curr_value = g_slist_next(curr_value);
} }
curr_field = g_slist_next(curr_value); curr_field = g_slist_next(curr_field);
} }
curr = g_slist_next(curr);
} }
EVP_MD_CTX mdctx; EVP_MD_CTX mdctx;
@ -176,7 +178,7 @@ caps_create_sha1_str(xmpp_stanza_t * const query)
g_slist_free_full(identities, free); g_slist_free_full(identities, free);
g_slist_free_full(features, free); g_slist_free_full(features, free);
g_slist_free_full(form_names, free); g_slist_free_full(form_names, free);
g_hash_table_destroy(forms); //g_hash_table_destroy(forms);
return result; return result;
} }

View File

@ -553,7 +553,7 @@ stanza_create_form(xmpp_stanza_t * const stanza)
char *var = xmpp_stanza_get_attribute(child, "var"); char *var = xmpp_stanza_get_attribute(child, "var");
// handle FORM_TYPE // handle FORM_TYPE
if (g_strcmp0(var, "FORM_TYPE")) { if (g_strcmp0(var, "FORM_TYPE") == 0) {
xmpp_stanza_t *value = xmpp_stanza_get_child_by_name(child, "value"); xmpp_stanza_t *value = xmpp_stanza_get_child_by_name(child, "value");
char *value_text = xmpp_stanza_get_text(value); char *value_text = xmpp_stanza_get_text(value);
result->form_type = strdup(value_text); result->form_type = strdup(value_text);