1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-06-23 21:45:30 +00:00

Renamed generate_unique_id -> create_unique_id

This commit is contained in:
James Booth 2014-06-15 21:49:34 +01:00
parent efc833a202
commit 1c62d7fda8
6 changed files with 16 additions and 16 deletions

View File

@ -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;

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -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) {

View File

@ -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);