about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorJames Booth <boothj5@gmail.com>2014-06-15 21:49:34 +0100
committerJames Booth <boothj5@gmail.com>2014-06-15 21:49:34 +0100
commit1c62d7fda8d644b3f8c6bceefc99d1730026a057 (patch)
tree32e9b2233c3de4e1e1033e32d018855fd6a49366
parentefc833a20272eec3ffea2bfefc1805803857daa1 (diff)
downloadprofani-tty-1c62d7fda8d644b3f8c6bceefc99d1730026a057.tar.gz
Renamed generate_unique_id -> create_unique_id
-rw-r--r--src/common.c2
-rw-r--r--src/common.h2
-rw-r--r--src/xmpp/bookmark.c2
-rw-r--r--src/xmpp/presence.c6
-rw-r--r--src/xmpp/roster.c4
-rw-r--r--src/xmpp/stanza.c16
6 files changed, 16 insertions, 16 deletions
diff --git a/src/common.c b/src/common.c
index d52c388e..9ca152d3 100644
--- a/src/common.c
+++ b/src/common.c
@@ -397,7 +397,7 @@ xdg_get_data_home(void)
 }
 
 char *
-generate_unique_id(char *prefix)
+create_unique_id(char *prefix)
 {
     static unsigned long unique_id;
     char *result = NULL;
diff --git a/src/common.h b/src/common.h
index 7b98a2bc..5521d310 100644
--- a/src/common.h
+++ b/src/common.h
@@ -99,7 +99,7 @@ resource_presence_t resource_presence_from_string(const char * const str);
 contact_presence_t contact_presence_from_resource_presence(resource_presence_t resource_presence);
 
 char * p_sha1_hash(char *str);
-char * generate_unique_id(char *prefix);
+char * create_unique_id(char *prefix);
 
 int cmp_win_num(gconstpointer a, gconstpointer b);
 int get_next_available_win_num(GList *used);
diff --git a/src/xmpp/bookmark.c b/src/xmpp/bookmark.c
index 1a7196a1..083a5f54 100644
--- a/src/xmpp/bookmark.c
+++ b/src/xmpp/bookmark.c
@@ -401,7 +401,7 @@ _send_bookmarks(void)
 
     xmpp_stanza_t *iq = xmpp_stanza_new(ctx);
     xmpp_stanza_set_name(iq, STANZA_NAME_IQ);
-    char *id = generate_unique_id("bookmarks_update");
+    char *id = create_unique_id("bookmarks_update");
     xmpp_stanza_set_id(iq, id);
     free(id);
     xmpp_stanza_set_type(iq, STANZA_TYPE_SET);
diff --git a/src/xmpp/presence.c b/src/xmpp/presence.c
index a1cb0ab9..4585cc51 100644
--- a/src/xmpp/presence.c
+++ b/src/xmpp/presence.c
@@ -116,7 +116,7 @@ _presence_subscription(const char * const jid, const jabber_subscr_t action)
     }
 
     xmpp_stanza_t *presence = xmpp_stanza_new(ctx);
-    char *id = generate_unique_id("sub");
+    char *id = create_unique_id("sub");
     xmpp_stanza_set_id(presence, id);
     xmpp_stanza_set_name(presence, STANZA_NAME_PRESENCE);
     xmpp_stanza_set_type(presence, type);
@@ -208,7 +208,7 @@ _presence_update(const resource_presence_t presence_type, const char * const msg
     connection_set_priority(pri);
 
     xmpp_stanza_t *presence = stanza_create_presence(ctx);
-    char *id = generate_unique_id("presence");
+    char *id = create_unique_id("presence");
     xmpp_stanza_set_id(presence, id);
     stanza_attach_show(ctx, presence, show);
     stanza_attach_status(ctx, presence, msg);
@@ -625,7 +625,7 @@ _get_caps_key(xmpp_stanza_t * const stanza)
     if ((hash_type != NULL) && (strcmp(hash_type, "sha-1") == 0)) {
         log_debug("Hash type %s supported.", hash_type);
         caps_key = strdup(node);
-        id = generate_unique_id("caps");
+        id = create_unique_id("caps");
 
         _send_caps_request(node, caps_key, id, from);
         free(id);
diff --git a/src/xmpp/roster.c b/src/xmpp/roster.c
index e0c19971..2e566659 100644
--- a/src/xmpp/roster.c
+++ b/src/xmpp/roster.c
@@ -126,7 +126,7 @@ _roster_send_add_to_group(const char * const group, PContact contact)
 
     new_groups = g_slist_append(new_groups, strdup(group));
     // add an id handler to handle the response
-    char *unique_id = generate_unique_id(NULL);
+    char *unique_id = create_unique_id(NULL);
     GroupData *data = malloc(sizeof(GroupData));
     data->group = strdup(group);
     if (p_contact_name(contact) != NULL) {
@@ -175,7 +175,7 @@ _roster_send_remove_from_group(const char * const group, PContact contact)
     xmpp_ctx_t * const ctx = connection_get_ctx();
 
     // add an id handler to handle the response
-    char *unique_id = generate_unique_id(NULL);
+    char *unique_id = create_unique_id(NULL);
     GroupData *data = malloc(sizeof(GroupData));
     data->group = strdup(group);
     if (p_contact_name(contact) != NULL) {
diff --git a/src/xmpp/stanza.c b/src/xmpp/stanza.c
index 3f0b5015..5364e579 100644
--- a/src/xmpp/stanza.c
+++ b/src/xmpp/stanza.c
@@ -100,7 +100,7 @@ stanza_create_bookmarks_pubsub_add(xmpp_ctx_t *ctx, const char * const jid,
 {
     xmpp_stanza_t *stanza = xmpp_stanza_new(ctx);
     xmpp_stanza_set_name(stanza, STANZA_NAME_IQ);
-    char *id = generate_unique_id("bookmark_add");
+    char *id = create_unique_id("bookmark_add");
     xmpp_stanza_set_id(stanza, id);
     xmpp_stanza_set_type(stanza, STANZA_TYPE_SET);
 
@@ -196,7 +196,7 @@ stanza_create_chat_state(xmpp_ctx_t *ctx, const char * const recipient,
     xmpp_stanza_set_name(msg, STANZA_NAME_MESSAGE);
     xmpp_stanza_set_type(msg, STANZA_TYPE_CHAT);
     xmpp_stanza_set_attribute(msg, STANZA_ATTR_TO, recipient);
-    char *id = generate_unique_id(NULL);
+    char *id = create_unique_id(NULL);
     xmpp_stanza_set_id(msg, id);
     free(id);
 
@@ -220,7 +220,7 @@ stanza_create_message(xmpp_ctx_t *ctx, const char * const recipient,
     xmpp_stanza_set_name(msg, STANZA_NAME_MESSAGE);
     xmpp_stanza_set_type(msg, type);
     xmpp_stanza_set_attribute(msg, STANZA_ATTR_TO, recipient);
-    char *id = generate_unique_id(NULL);
+    char *id = create_unique_id(NULL);
     xmpp_stanza_set_id(msg, id);
     free(id);
 
@@ -324,7 +324,7 @@ stanza_create_invite(xmpp_ctx_t *ctx, const char * const room,
     message = xmpp_stanza_new(ctx);
     xmpp_stanza_set_name(message, STANZA_NAME_MESSAGE);
     xmpp_stanza_set_attribute(message, STANZA_ATTR_TO, contact);
-    char *id = generate_unique_id(NULL);
+    char *id = create_unique_id(NULL);
     xmpp_stanza_set_id(message, id);
     free(id);
 
@@ -350,7 +350,7 @@ stanza_create_room_join_presence(xmpp_ctx_t * const ctx,
     xmpp_stanza_t *presence = xmpp_stanza_new(ctx);
     xmpp_stanza_set_name(presence, STANZA_NAME_PRESENCE);
     xmpp_stanza_set_attribute(presence, STANZA_ATTR_TO, full_room_jid);
-    char *id = generate_unique_id("join");
+    char *id = create_unique_id("join");
     xmpp_stanza_set_id(presence, id);
     free(id);
 
@@ -381,7 +381,7 @@ stanza_create_room_newnick_presence(xmpp_ctx_t *ctx,
     const char * const full_room_jid)
 {
     xmpp_stanza_t *presence = xmpp_stanza_new(ctx);
-    char *id = generate_unique_id("sub");
+    char *id = create_unique_id("sub");
     xmpp_stanza_set_id(presence, id);
     free(id);
     xmpp_stanza_set_name(presence, STANZA_NAME_PRESENCE);
@@ -402,7 +402,7 @@ stanza_create_room_leave_presence(xmpp_ctx_t *ctx, const char * const room,
     xmpp_stanza_set_name(presence, STANZA_NAME_PRESENCE);
     xmpp_stanza_set_type(presence, STANZA_TYPE_UNAVAILABLE);
     xmpp_stanza_set_attribute(presence, STANZA_ATTR_TO, full_jid->str);
-    char *id = generate_unique_id("leave");
+    char *id = create_unique_id("leave");
     xmpp_stanza_set_id(presence, id);
     free(id);
 
@@ -516,7 +516,7 @@ stanza_create_ping_iq(xmpp_ctx_t *ctx)
     xmpp_stanza_t *iq = xmpp_stanza_new(ctx);
     xmpp_stanza_set_name(iq, STANZA_NAME_IQ);
     xmpp_stanza_set_type(iq, STANZA_TYPE_GET);
-    char *id = generate_unique_id("ping");
+    char *id = create_unique_id("ping");
     xmpp_stanza_set_id(iq, id);
     free(id);