Don't append the 'id'-tag in opening stream headers. [#30]
According to RFC 3920 (section 4.4) the id attribute SHOULD NOT be added
by the initiating party.
[#30 responsible:Hallski state:resolved milestone:Loudmouth 1.4.4 tagged:committed]
committer: Mikael Hallendal <micke@imendio.com>
--- a/loudmouth/lm-message.c Wed Oct 29 17:54:25 2008 +0100
+++ b/loudmouth/lm-message.c Wed Nov 05 23:29:44 2008 +0100
@@ -231,10 +231,12 @@
m->node = _lm_message_node_new (_lm_message_type_to_string (type));
- id = _lm_utils_generate_id ();
- lm_message_node_set_attribute (m->node, "id", id);
- g_free (id);
-
+ if (type != LM_MESSAGE_TYPE_STREAM) {
+ id = _lm_utils_generate_id ();
+ lm_message_node_set_attribute (m->node, "id", id);
+ g_free (id);
+ }
+
if (to) {
lm_message_node_set_attribute (m->node, "to", to);
}