FS-3391 --resolve Segmentation fault on mod_dingaling when receiving a discovery from the server

This commit is contained in:
Jeff Lenk 2011-07-03 22:35:44 -05:00
parent b6826180f3
commit 2e651c8fd0

View File

@ -607,7 +607,9 @@ static int on_disco_default(void *user_data, ikspak *pak)
int all = 0; int all = 0;
iks_insert_attrib(iq, "from", handle->login); iks_insert_attrib(iq, "from", handle->login);
if (pak->from) {
iks_insert_attrib(iq, "to", pak->from->full); iks_insert_attrib(iq, "to", pak->from->full);
}
iks_insert_attrib(iq, "id", pak->id); iks_insert_attrib(iq, "id", pak->id);
iks_insert_attrib(iq, "type", "result"); iks_insert_attrib(iq, "type", "result");