Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
A
asterisk
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Voice
asterisk
Commits
fcd8e9d6
Commit
fcd8e9d6
authored
6 years ago
by
Kevin Harwell
Committed by
Gerrit Code Review
6 years ago
Browse files
Options
Downloads
Plain Diff
Merge "uuid: Enable UUID in Solaris 11."
parents
017b7849
675e2ddb
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
include/asterisk/uuid.h
+5
-5
5 additions, 5 deletions
include/asterisk/uuid.h
main/uuid.c
+7
-7
7 additions, 7 deletions
main/uuid.c
with
12 additions
and
12 deletions
include/asterisk/uuid.h
+
5
−
5
View file @
fcd8e9d6
...
@@ -52,7 +52,7 @@ struct ast_uuid *ast_uuid_generate(void);
...
@@ -52,7 +52,7 @@ struct ast_uuid *ast_uuid_generate(void);
* \param size The size of the buffer. Must be at least AST_UUID_STR_LEN.
* \param size The size of the buffer. Must be at least AST_UUID_STR_LEN.
* \return The UUID string (a pointer to buf)
* \return The UUID string (a pointer to buf)
*/
*/
char
*
ast_uuid_to_str
(
const
struct
ast_uuid
*
uuid
,
char
*
buf
,
size_t
size
);
char
*
ast_uuid_to_str
(
struct
ast_uuid
*
uuid
,
char
*
buf
,
size_t
size
);
/*!
/*!
* \brief Generate a UUID string.
* \brief Generate a UUID string.
...
@@ -75,7 +75,7 @@ char *ast_uuid_generate_str(char *buf, size_t size);
...
@@ -75,7 +75,7 @@ char *ast_uuid_generate_str(char *buf, size_t size);
* \retval NULL Failed to convert
* \retval NULL Failed to convert
* \retval non-NULL The heap-allocated converted UUID
* \retval non-NULL The heap-allocated converted UUID
*/
*/
struct
ast_uuid
*
ast_str_to_uuid
(
const
char
*
str
);
struct
ast_uuid
*
ast_str_to_uuid
(
char
*
str
);
/*!
/*!
* \brief Make a copy of a UUID
* \brief Make a copy of a UUID
...
@@ -87,7 +87,7 @@ struct ast_uuid *ast_str_to_uuid(const char *str);
...
@@ -87,7 +87,7 @@ struct ast_uuid *ast_str_to_uuid(const char *str);
* \retval NULL Failed to copy
* \retval NULL Failed to copy
* \retval non-NULL The heap-allocated duplicate UUID
* \retval non-NULL The heap-allocated duplicate UUID
*/
*/
struct
ast_uuid
*
ast_uuid_copy
(
const
struct
ast_uuid
*
src
);
struct
ast_uuid
*
ast_uuid_copy
(
struct
ast_uuid
*
src
);
/*!
/*!
* \brief Compare two UUIDs
* \brief Compare two UUIDs
...
@@ -98,7 +98,7 @@ struct ast_uuid *ast_uuid_copy(const struct ast_uuid *src);
...
@@ -98,7 +98,7 @@ struct ast_uuid *ast_uuid_copy(const struct ast_uuid *src);
* \retval 0 left and right are the same
* \retval 0 left and right are the same
* \retval >0 left is lexicographically greater than right
* \retval >0 left is lexicographically greater than right
*/
*/
int
ast_uuid_compare
(
const
struct
ast_uuid
*
left
,
const
struct
ast_uuid
*
right
);
int
ast_uuid_compare
(
struct
ast_uuid
*
left
,
struct
ast_uuid
*
right
);
/*!
/*!
* \brief Clear a UUID by setting it to be a nil UUID (all 0s)
* \brief Clear a UUID by setting it to be a nil UUID (all 0s)
...
@@ -114,5 +114,5 @@ void ast_uuid_clear(struct ast_uuid *uuid);
...
@@ -114,5 +114,5 @@ void ast_uuid_clear(struct ast_uuid *uuid);
* \retval 0 The UUID is not nil
* \retval 0 The UUID is not nil
* \retval non-zero The UUID is nil
* \retval non-zero The UUID is nil
*/
*/
int
ast_uuid_is_nil
(
const
struct
ast_uuid
*
uuid
);
int
ast_uuid_is_nil
(
struct
ast_uuid
*
uuid
);
#endif
#endif
This diff is collapsed.
Click to expand it.
main/uuid.c
+
7
−
7
View file @
fcd8e9d6
...
@@ -133,11 +133,11 @@ struct ast_uuid *ast_uuid_generate(void)
...
@@ -133,11 +133,11 @@ struct ast_uuid *ast_uuid_generate(void)
return
uuid
;
return
uuid
;
}
}
char
*
ast_uuid_to_str
(
const
struct
ast_uuid
*
uuid
,
char
*
buf
,
size_t
size
)
char
*
ast_uuid_to_str
(
struct
ast_uuid
*
uuid
,
char
*
buf
,
size_t
size
)
{
{
ast_assert
(
size
>=
AST_UUID_STR_LEN
);
ast_assert
(
size
>=
AST_UUID_STR_LEN
);
uuid_unparse
_lower
(
uuid
->
uu
,
buf
);
uuid_unparse
(
uuid
->
uu
,
buf
);
return
buf
;
return
ast_str_to_lower
(
buf
)
;
}
}
char
*
ast_uuid_generate_str
(
char
*
buf
,
size_t
size
)
char
*
ast_uuid_generate_str
(
char
*
buf
,
size_t
size
)
...
@@ -148,7 +148,7 @@ char *ast_uuid_generate_str(char *buf, size_t size)
...
@@ -148,7 +148,7 @@ char *ast_uuid_generate_str(char *buf, size_t size)
return
ast_uuid_to_str
(
&
uuid
,
buf
,
size
);
return
ast_uuid_to_str
(
&
uuid
,
buf
,
size
);
}
}
struct
ast_uuid
*
ast_str_to_uuid
(
const
char
*
str
)
struct
ast_uuid
*
ast_str_to_uuid
(
char
*
str
)
{
{
struct
ast_uuid
*
uuid
=
ast_malloc
(
sizeof
(
*
uuid
));
struct
ast_uuid
*
uuid
=
ast_malloc
(
sizeof
(
*
uuid
));
int
res
;
int
res
;
...
@@ -165,7 +165,7 @@ struct ast_uuid *ast_str_to_uuid(const char *str)
...
@@ -165,7 +165,7 @@ struct ast_uuid *ast_str_to_uuid(const char *str)
return
uuid
;
return
uuid
;
}
}
struct
ast_uuid
*
ast_uuid_copy
(
const
struct
ast_uuid
*
src
)
struct
ast_uuid
*
ast_uuid_copy
(
struct
ast_uuid
*
src
)
{
{
struct
ast_uuid
*
dst
=
ast_malloc
(
sizeof
(
*
dst
));
struct
ast_uuid
*
dst
=
ast_malloc
(
sizeof
(
*
dst
));
...
@@ -176,7 +176,7 @@ struct ast_uuid *ast_uuid_copy(const struct ast_uuid *src)
...
@@ -176,7 +176,7 @@ struct ast_uuid *ast_uuid_copy(const struct ast_uuid *src)
return
dst
;
return
dst
;
}
}
int
ast_uuid_compare
(
const
struct
ast_uuid
*
left
,
const
struct
ast_uuid
*
right
)
int
ast_uuid_compare
(
struct
ast_uuid
*
left
,
struct
ast_uuid
*
right
)
{
{
return
uuid_compare
(
left
->
uu
,
right
->
uu
);
return
uuid_compare
(
left
->
uu
,
right
->
uu
);
}
}
...
@@ -186,7 +186,7 @@ void ast_uuid_clear(struct ast_uuid *uuid)
...
@@ -186,7 +186,7 @@ void ast_uuid_clear(struct ast_uuid *uuid)
uuid_clear
(
uuid
->
uu
);
uuid_clear
(
uuid
->
uu
);
}
}
int
ast_uuid_is_nil
(
const
struct
ast_uuid
*
uuid
)
int
ast_uuid_is_nil
(
struct
ast_uuid
*
uuid
)
{
{
return
uuid_is_null
(
uuid
->
uu
);
return
uuid_is_null
(
uuid
->
uu
);
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment