Mercurial > ~mikael > mcabber > hg
comparison mcabber/mcabber/xmpp.c @ 2167:634cc23e8c1c
Use a #define for the xep-297 protocol namespace
author | franky |
---|---|
date | Fri, 17 Oct 2014 22:42:07 +0200 |
parents | f51c341a9da5 |
children | e3b66c8ead4f |
comparison
equal
deleted
inserted
replaced
2166:f51c341a9da5 | 2167:634cc23e8c1c |
---|---|
1099 if (x) { | 1099 if (x) { |
1100 carbons = TRUE; | 1100 carbons = TRUE; |
1101 // Parse a message that is send to one of our other resources | 1101 // Parse a message that is send to one of our other resources |
1102 if (!g_strcmp0(x->name, "received")) { | 1102 if (!g_strcmp0(x->name, "received")) { |
1103 // Go 1 level deeper to the forwarded message | 1103 // Go 1 level deeper to the forwarded message |
1104 x = lm_message_node_find_xmlns(x, "urn:xmpp:forward:0"); | 1104 x = lm_message_node_find_xmlns(x, NS_FORWARD); |
1105 x = lm_message_node_get_child(x, "message"); | 1105 x = lm_message_node_get_child(x, "message"); |
1106 | 1106 |
1107 from = lm_message_node_get_attribute(x, "from"); | 1107 from = lm_message_node_get_attribute(x, "from"); |
1108 if (!from) { | 1108 if (!from) { |
1109 scr_LogPrint(LPRINT_LOGNORM, "Malformed carbon copy!"); | 1109 scr_LogPrint(LPRINT_LOGNORM, "Malformed carbon copy!"); |
1123 handle_state_events(from, res, x); | 1123 handle_state_events(from, res, x); |
1124 | 1124 |
1125 scr_LogPrint(LPRINT_DEBUG, "Received incoming carbon from <%s>", from); | 1125 scr_LogPrint(LPRINT_DEBUG, "Received incoming carbon from <%s>", from); |
1126 | 1126 |
1127 } else if (!g_strcmp0(x->name, "sent")) { | 1127 } else if (!g_strcmp0(x->name, "sent")) { |
1128 x = lm_message_node_find_xmlns(x, "urn:xmpp:forward:0"); | 1128 x = lm_message_node_find_xmlns(x, NS_FORWARD); |
1129 x = lm_message_node_get_child(x, "message"); | 1129 x = lm_message_node_get_child(x, "message"); |
1130 | 1130 |
1131 const char *to= lm_message_node_get_attribute(x, "to"); | 1131 const char *to= lm_message_node_get_attribute(x, "to"); |
1132 if (!to) { | 1132 if (!to) { |
1133 scr_LogPrint(LPRINT_LOGNORM, "Malformed carbon copy!"); | 1133 scr_LogPrint(LPRINT_LOGNORM, "Malformed carbon copy!"); |