summaryrefslogtreecommitdiff
path: root/res/res_sorcery_config.c
diff options
context:
space:
mode:
Diffstat (limited to 'res/res_sorcery_config.c')
-rw-r--r--res/res_sorcery_config.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/res/res_sorcery_config.c b/res/res_sorcery_config.c
index 10347ea81..509538f5a 100644
--- a/res/res_sorcery_config.c
+++ b/res/res_sorcery_config.c
@@ -305,19 +305,12 @@ static void *sorcery_config_open(const char *data)
{
char *tmp = ast_strdupa(data), *filename = strsep(&tmp, ","), *option;
struct sorcery_config *config;
- struct ast_uuid *uuid;
if (ast_strlen_zero(filename) || !(config = ao2_alloc_options(sizeof(*config) + strlen(filename) + 1, sorcery_config_destructor, AO2_ALLOC_OPT_LOCK_NOLOCK))) {
return NULL;
}
- if (!(uuid = ast_uuid_generate())) {
- ao2_ref(config, -1);
- return NULL;
- }
-
- ast_uuid_to_str(uuid, config->uuid, AST_UUID_STR_LEN);
- ast_free(uuid);
+ ast_uuid_generate_str(config->uuid, sizeof(config->uuid));
ast_rwlock_init(&config->objects.lock);
config->buckets = DEFAULT_OBJECT_BUCKETS;