diff options
author | Michael Vetter <jubalh@openmailbox.org> | 2018-08-30 11:01:28 +0200 |
---|---|---|
committer | Michael Vetter <jubalh@openmailbox.org> | 2018-08-30 11:17:04 +0200 |
commit | 6d807003296828d0dfdc685d5ff797f5301bbe6f (patch) | |
tree | 0cfcb5f14ddeacc7fa0848ecd11cfdcade83e8fa /src/xmpp/blocking.c | |
parent | f4fb61b0c83b0eea20f7b60fa83bc116fd103a84 (diff) | |
download | profani-tty-6d807003296828d0dfdc685d5ff797f5301bbe6f.tar.gz |
Move ID generation to xmpp folder
create_unique_id() was changed to use UUIDs instead of a counter in the last commit. Since now it depends on connection_create_uuid() which is in the xmpp subfolder the function should also be moved there. Renamed it to connection_create_stanza_id() and moved it to src/xmpp/connection.c. Discussion happened in https://github.com/boothj5/profanity/pull/1010
Diffstat (limited to 'src/xmpp/blocking.c')
-rw-r--r-- | src/xmpp/blocking.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/xmpp/blocking.c b/src/xmpp/blocking.c index 5d1c52b2..1be0d1b4 100644 --- a/src/xmpp/blocking.c +++ b/src/xmpp/blocking.c @@ -73,7 +73,7 @@ blocking_request(void) } blocked_ac = autocomplete_new(); - char *id = create_unique_id("blocked_list_request"); + char *id = connection_create_stanza_id("blocked_list_request"); iq_id_handler_add(id, _blocklist_result_handler, NULL, NULL); xmpp_ctx_t *ctx = connection_get_ctx(); @@ -115,7 +115,7 @@ blocked_add(char *jid) xmpp_ctx_t *ctx = connection_get_ctx(); - char *id = create_unique_id("block"); + char *id = connection_create_stanza_id("block"); xmpp_stanza_t *iq = xmpp_iq_new(ctx, STANZA_TYPE_SET, id); xmpp_stanza_t *block = xmpp_stanza_new(ctx); @@ -151,7 +151,7 @@ blocked_remove(char *jid) xmpp_ctx_t *ctx = connection_get_ctx(); - char *id = create_unique_id("unblock"); + char *id = connection_create_stanza_id("unblock"); xmpp_stanza_t *iq = xmpp_iq_new(ctx, STANZA_TYPE_SET, id); xmpp_stanza_t *block = xmpp_stanza_new(ctx); |