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:
parent
069bdbc331
commit
d327a0dd5a
@ -153,8 +153,10 @@ caps_create_sha1_str(xmpp_stanza_t * const query)
|
||||
g_string_append(s, "<");
|
||||
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;
|
||||
@ -176,7 +178,7 @@ caps_create_sha1_str(xmpp_stanza_t * const query)
|
||||
g_slist_free_full(identities, free);
|
||||
g_slist_free_full(features, free);
|
||||
g_slist_free_full(form_names, free);
|
||||
g_hash_table_destroy(forms);
|
||||
//g_hash_table_destroy(forms);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
@ -553,7 +553,7 @@ stanza_create_form(xmpp_stanza_t * const stanza)
|
||||
char *var = xmpp_stanza_get_attribute(child, "var");
|
||||
|
||||
// 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");
|
||||
char *value_text = xmpp_stanza_get_text(value);
|
||||
result->form_type = strdup(value_text);
|
||||
|
Loading…
Reference in New Issue
Block a user