summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorWill Thompson <will.thompson@collabora.co.uk>2012-11-27 15:40:29 +0000
committerWill Thompson <will.thompson@collabora.co.uk>2012-11-27 15:41:05 +0000
commit6bc2931e859d9c23b8d81fede23c0a962514dfae (patch)
treed249428952c3dd8b850c46f378dff897a82ece7f /src
parent6dacd571ae133e9f8ada918e6222b79c932e0788 (diff)
Don't use add_child_with_content with NULL/"" content
This is harmless, but looks messy. It's leftover clutter from the loudmouth era.
Diffstat (limited to 'src')
-rw-r--r--src/ft-channel.c4
-rw-r--r--src/jingle-content.c2
-rw-r--r--src/jingle-media-rtp.c4
-rw-r--r--src/jingle-session.c4
-rw-r--r--src/jingle-share.c12
-rw-r--r--src/jingle-transport-google.c2
-rw-r--r--src/jingle-transport-iceudp.c2
-rw-r--r--src/jingle-transport-rawudp.c2
-rw-r--r--src/muc-channel.c2
-rw-r--r--src/search-channel.c6
-rw-r--r--src/util.c2
11 files changed, 21 insertions, 21 deletions
diff --git a/src/ft-channel.c b/src/ft-channel.c
index 69451ec80..43860f576 100644
--- a/src/ft-channel.c
+++ b/src/ft-channel.c
@@ -1256,7 +1256,7 @@ offer_bytestream (GabbleFileTransferChannel *self, const gchar *jid,
wocky_node_add_child_with_content (file_node, "desc", self->priv->description);
/* we support resume */
- wocky_node_add_child_with_content (file_node, "range", NULL);
+ wocky_node_add_child (file_node, "range");
result = gabble_bytestream_factory_negotiate_stream (
conn->bytestream_factory, msg, stream_id,
@@ -1655,7 +1655,7 @@ augment_si_reply (WockyNode *si,
WockyNode *range;
gchar *offset_str;
- range = wocky_node_add_child_with_content (file, "range", NULL);
+ range = wocky_node_add_child (file, "range");
offset_str = g_strdup_printf ("%" G_GUINT64_FORMAT,
self->priv->initial_offset);
wocky_node_set_attribute (range, "offset", offset_str);
diff --git a/src/jingle-content.c b/src/jingle-content.c
index 0c8fd7837..a57e2cf4e 100644
--- a/src/jingle-content.c
+++ b/src/jingle-content.c
@@ -835,7 +835,7 @@ gabble_jingle_content_produce_node (GabbleJingleContent *c,
}
else
{
- content_node = wocky_node_add_child_with_content (parent, "content", NULL);
+ content_node = wocky_node_add_child (parent, "content");
wocky_node_set_attributes (content_node,
"name", priv->name,
"senders", produce_senders (priv->senders),
diff --git a/src/jingle-media-rtp.c b/src/jingle-media-rtp.c
index 63284e8fc..65ad46b50 100644
--- a/src/jingle-media-rtp.c
+++ b/src/jingle-media-rtp.c
@@ -883,7 +883,7 @@ _produce_extra_param (gpointer key, gpointer value, gpointer user_data)
gchar *param_name = key;
gchar *param_value = value;
- param = wocky_node_add_child_with_content (pt_node, "parameter", NULL);
+ param = wocky_node_add_child (pt_node, "parameter");
wocky_node_set_attribute (param, "name", param_name);
wocky_node_set_attribute (param, "value", param_value);
}
@@ -931,7 +931,7 @@ produce_payload_type (GabbleJingleContent *content,
WockyNode *pt_node;
gchar buf[16];
- pt_node = wocky_node_add_child_with_content (desc_node, "payload-type", NULL);
+ pt_node = wocky_node_add_child (desc_node, "payload-type");
/* id: required */
sprintf (buf, "%d", p->id);
diff --git a/src/jingle-session.c b/src/jingle-session.c
index 4a9cea944..67fc3c4ff 100644
--- a/src/jingle-session.c
+++ b/src/jingle-session.c
@@ -823,7 +823,7 @@ fire_idle_content_reject (GabbleJingleSession *sess, const gchar *name,
g_debug ("name = %s, initiator = %s", name, creator);
- node = wocky_node_add_child_with_content (sess_node, "content", NULL);
+ node = wocky_node_add_child (sess_node, "content");
wocky_node_set_attributes (node,
"name", name, "creator", creator, NULL);
@@ -2131,7 +2131,7 @@ gabble_jingle_session_terminate (GabbleJingleSession *sess,
WockyNode *r = wocky_node_add_child_with_content (session_node, "reason",
NULL);
- wocky_node_add_child_with_content (r, reason_elt, NULL);
+ wocky_node_add_child (r, reason_elt);
if (text != NULL && *text != '\0')
wocky_node_add_child_with_content (r, "text", text);
diff --git a/src/jingle-share.c b/src/jingle-share.c
index 2e9698c3a..b5fd9c659 100644
--- a/src/jingle-share.c
+++ b/src/jingle-share.c
@@ -461,7 +461,7 @@ produce_description (GabbleJingleContent *content, WockyNode *content_node)
desc_node = wocky_node_add_child_ns (content_node, "description",
NS_GOOGLE_SESSION_SHARE);
- manifest_node = wocky_node_add_child_with_content (desc_node, "manifest", NULL);
+ manifest_node = wocky_node_add_child (desc_node, "manifest");
for (i = priv->manifest->entries; i; i = i->next)
{
@@ -471,9 +471,9 @@ produce_description (GabbleJingleContent *content, WockyNode *content_node)
gchar *size_str, *width_str, *height_str;
if (m->folder)
- file_node = wocky_node_add_child_with_content (manifest_node, "folder", NULL);
+ file_node = wocky_node_add_child (manifest_node, "folder");
else
- file_node = wocky_node_add_child_with_content (manifest_node, "file", NULL);
+ file_node = wocky_node_add_child (manifest_node, "file");
if (m->size > 0)
{
@@ -486,7 +486,7 @@ produce_description (GabbleJingleContent *content, WockyNode *content_node)
if (m->image &&
(m->image_width > 0 || m->image_height > 0))
{
- image_node = wocky_node_add_child_with_content (file_node, "image", NULL);
+ image_node = wocky_node_add_child (file_node, "image");
if (m->image_width > 0)
{
width_str = g_strdup_printf ("%d", m->image_width);
@@ -503,8 +503,8 @@ produce_description (GabbleJingleContent *content, WockyNode *content_node)
}
}
- protocol_node = wocky_node_add_child_with_content (desc_node, "protocol", NULL);
- http_node = wocky_node_add_child_with_content (protocol_node, "http", NULL);
+ protocol_node = wocky_node_add_child (desc_node, "protocol");
+ http_node = wocky_node_add_child (protocol_node, "http");
url_node = wocky_node_add_child_with_content (http_node, "url",
priv->manifest->source_url);
wocky_node_set_attribute (url_node, "name", "source-path");
diff --git a/src/jingle-transport-google.c b/src/jingle-transport-google.c
index 491036d48..1e6d888d4 100644
--- a/src/jingle-transport-google.c
+++ b/src/jingle-transport-google.c
@@ -434,7 +434,7 @@ transmit_candidates (GabbleJingleTransportGoogle *transport,
g_assert_not_reached ();
}
- cnode = wocky_node_add_child_with_content (trans_node, "candidate", NULL);
+ cnode = wocky_node_add_child (trans_node, "candidate");
wocky_node_set_attributes (cnode,
"address", c->address,
"port", port_str,
diff --git a/src/jingle-transport-iceudp.c b/src/jingle-transport-iceudp.c
index cd7f3a1e3..e7eb41f70 100644
--- a/src/jingle-transport-iceudp.c
+++ b/src/jingle-transport-iceudp.c
@@ -479,7 +479,7 @@ inject_candidates (GabbleJingleTransportIface *obj,
"pwd", c->password,
NULL);
- cnode = wocky_node_add_child_with_content (transport_node, "candidate", NULL);
+ cnode = wocky_node_add_child (transport_node, "candidate");
wocky_node_set_attributes (cnode,
"ip", c->address,
"port", port_str,
diff --git a/src/jingle-transport-rawudp.c b/src/jingle-transport-rawudp.c
index 17b1b1f8f..711cc6888 100644
--- a/src/jingle-transport-rawudp.c
+++ b/src/jingle-transport-rawudp.c
@@ -310,7 +310,7 @@ inject_candidates (GabbleJingleTransportIface *obj,
sprintf (port_str, "%d", c->port);
sprintf (comp_str, "%d", c->component);
- cnode = wocky_node_add_child_with_content (transport_node, "candidate", NULL);
+ cnode = wocky_node_add_child (transport_node, "candidate");
wocky_node_set_attributes (cnode,
"ip", c->address,
"port", port_str,
diff --git a/src/muc-channel.c b/src/muc-channel.c
index c93c262e9..a685b07cf 100644
--- a/src/muc-channel.c
+++ b/src/muc-channel.c
@@ -3312,7 +3312,7 @@ gabble_muc_channel_send_invite (GabbleMucChannel *self,
if (continue_)
{
- wocky_node_add_child_with_content (invite_node, "continue", NULL);
+ wocky_node_add_child (invite_node, "continue");
}
DEBUG ("sending MUC invitation for room %s to contact %s with reason "
diff --git a/src/search-channel.c b/src/search-channel.c
index 8ce5edfd9..0c253ba92 100644
--- a/src/search-channel.c
+++ b/src/search-channel.c
@@ -885,7 +885,7 @@ build_extended_query (GabbleSearchChannel *self,
wocky_node_set_attribute (x, "type", "submit");
/* add FORM_TYPE */
- field = wocky_node_add_child_with_content (x, "field", "");
+ field = wocky_node_add_child (x, "field");
wocky_node_set_attributes (field,
"type", "hidden",
"var", "FORM_TYPE",
@@ -902,7 +902,7 @@ build_extended_query (GabbleSearchChannel *self,
g_assert (xmpp_field != NULL);
- field = wocky_node_add_child_with_content (x, "field", "");
+ field = wocky_node_add_child (x, "field");
wocky_node_set_attribute (field, "var", xmpp_field);
wocky_node_add_child_with_content (field, "value", value);
@@ -915,7 +915,7 @@ build_extended_query (GabbleSearchChannel *self,
{
xmpp_field = g_ptr_array_index (self->priv->boolean_keys, i);
- field = wocky_node_add_child_with_content (x, "field", "");
+ field = wocky_node_add_child (x, "field");
wocky_node_set_attributes (field,
"var", xmpp_field,
"type", "boolean",
diff --git a/src/util.c b/src/util.c
index 9b7086054..099f7d8fb 100644
--- a/src/util.c
+++ b/src/util.c
@@ -502,7 +502,7 @@ set_child_from_property (gpointer key,
return;
}
- child = wocky_node_add_child_with_content (data->node, data->prop, "");
+ child = wocky_node_add_child (data->node, data->prop);
if (G_VALUE_TYPE (gvalue) == G_TYPE_STRING)
{