Mercurial > ~mikael > mcabber > hg
comparison mcabber/mcabber/xmpp.c @ 2303:4f3821bda633
LM: Use get_child in place of find_child
author | Mikael Berthe <mikael@lilotux.net> |
---|---|
date | Mon, 30 Jan 2017 18:46:15 +0100 |
parents | eb96666502f5 |
children | def5f64c253d |
comparison
equal
deleted
inserted
replaced
2302:245ec6d73380 | 2303:4f3821bda633 |
---|---|
1156 | 1156 |
1157 xenc = lm_message_node_find_xmlns(x, NS_ENCRYPTED); | 1157 xenc = lm_message_node_find_xmlns(x, NS_ENCRYPTED); |
1158 if (xenc && (p = lm_message_node_get_value(xenc)) != NULL) | 1158 if (xenc && (p = lm_message_node_get_value(xenc)) != NULL) |
1159 enc = p; | 1159 enc = p; |
1160 | 1160 |
1161 body = lm_message_node_get_child_value(x, "body"); | |
1162 subject = lm_message_node_get_child_value(x, "subject"); | |
1161 if (body && *body && !subject) | 1163 if (body && *body && !subject) |
1162 ns_signed = lm_message_node_find_xmlns(x, NS_SIGNED); | 1164 ns_signed = lm_message_node_find_xmlns(x, NS_SIGNED); |
1163 else | 1165 else |
1164 skip_process = TRUE; | 1166 skip_process = TRUE; |
1165 | 1167 |
1443 bjid = jidtodisp(from); | 1445 bjid = jidtodisp(from); |
1444 | 1446 |
1445 if (mstype == LM_MESSAGE_SUB_TYPE_ERROR) { | 1447 if (mstype == LM_MESSAGE_SUB_TYPE_ERROR) { |
1446 LmMessageNode *x; | 1448 LmMessageNode *x; |
1447 scr_LogPrint(LPRINT_LOGNORM, "Error presence packet from <%s>", bjid); | 1449 scr_LogPrint(LPRINT_LOGNORM, "Error presence packet from <%s>", bjid); |
1448 x = lm_message_node_find_child(m->node, "error"); | 1450 x = lm_message_node_get_child(m->node, "error"); |
1449 display_server_error(x, from); | 1451 display_server_error(x, from); |
1450 // Let's check it isn't a nickname conflict. | 1452 // Let's check it isn't a nickname conflict. |
1451 // XXX Note: We should handle the <conflict/> string condition. | 1453 // XXX Note: We should handle the <conflict/> string condition. |
1452 if ((p = lm_message_node_get_attribute(x, "code")) != NULL) { | 1454 if ((p = lm_message_node_get_attribute(x, "code")) != NULL) { |
1453 if (atoi(p) == 409) { | 1455 if (atoi(p) == 409) { |