#include "openvas_uuid.h"
#include <glib.h>
#include <stdlib.h>
#include <uuid/uuid.h>
Go to the source code of this file.
◆ openvas_uuid_make()
char* openvas_uuid_make |
( |
void |
| ) |
|
Make a new universal identifier.
- Returns
- A newly allocated string holding the identifier, which the caller must free, or NULL on failure.
Definition at line 43 of file openvas_uuid.c.
50 if (uuid_is_null (uuid) == 1)
52 g_warning (
"%s: failed to generate UUID", __FUNCTION__);
57 id = g_malloc0 (
sizeof (
char) * 37);
60 g_warning (
"%s: Cannot export UUID to text: out of memory", __FUNCTION__);
65 uuid_unparse (uuid,
id);