diff options
author | James Booth <boothj5@gmail.com> | 2015-10-12 23:37:11 +0100 |
---|---|---|
committer | James Booth <boothj5@gmail.com> | 2015-10-12 23:37:11 +0100 |
commit | 6e28df66e89943e42243d0a36734b7b7b5310c2f (patch) | |
tree | 356e84cb7f2745f54deae03f62756131b4b1bf66 /src/command | |
parent | de15d47be4bb43f039a27bbd39dc41fd7e10ad59 (diff) | |
download | profani-tty-6e28df66e89943e42243d0a36734b7b7b5310c2f.tar.gz |
Use libstrophe/libmesode uuid generator
Diffstat (limited to 'src/command')
-rw-r--r-- | src/command/commands.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/src/command/commands.c b/src/command/commands.c index eb4aa03f..7df1477a 100644 --- a/src/command/commands.c +++ b/src/command/commands.c @@ -38,7 +38,6 @@ #include <stdlib.h> #include <errno.h> #include <assert.h> -#include <uuid/uuid.h> #include <glib.h> #include "chat_session.h" @@ -2267,22 +2266,18 @@ cmd_join(ProfWin *window, const char * const command, gchar **args) } if (args[0] == NULL) { - uuid_t uuid; - uuid_generate(uuid); - char *uuid_str = malloc(sizeof(char) * 37); - uuid_unparse_lower(uuid, uuid_str); - char *account_name = jabber_get_account_name(); ProfAccount *account = accounts_get_account(account_name); GString *room_str = g_string_new(""); - g_string_append_printf(room_str, "private-chat-%s@%s", uuid_str, account->muc_service); + char *uuid = jabber_create_uuid(); + g_string_append_printf(room_str, "private-chat-%s@%s", uuid, account->muc_service); + jabber_free_uuid(uuid); presence_join_room(room_str->str, account->muc_nick, NULL); muc_join(room_str->str, account->muc_nick, NULL, FALSE); g_string_free(room_str, TRUE); - free(uuid_str); account_free(account); return TRUE; |