about summary refs log tree commit diff stats
path: root/src/xmpp/connection.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/xmpp/connection.c')
-rw-r--r--src/xmpp/connection.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/xmpp/connection.c b/src/xmpp/connection.c
index 6c5e7323..1d142e3f 100644
--- a/src/xmpp/connection.c
+++ b/src/xmpp/connection.c
@@ -393,6 +393,27 @@ connection_free_uuid(char *uuid)
 }
 
 char*
+connection_create_stanza_id(char *prefix)
+{
+    char *result = NULL;
+    GString *result_str = g_string_new("");
+    char *uuid = connection_create_uuid();
+
+    if (prefix) {
+        g_string_printf(result_str, "prof_%s_%s", prefix, uuid);
+    } else {
+        g_string_printf(result_str, "prof_%s", uuid);
+    }
+
+    connection_free_uuid(uuid);
+
+    result = result_str->str;
+    g_string_free(result_str, FALSE);
+
+    return result;
+}
+
+char*
 connection_get_domain(void)
 {
     return conn.domain;