mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-03-31 02:33:44 +00:00
Windows UUID
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@16030 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
3f021b986f
commit
71cb806239
@ -870,17 +870,32 @@ SWITCH_DECLARE(switch_status_t) switch_socket_create_pollfd(switch_pollfd_t **po
|
|||||||
|
|
||||||
SWITCH_DECLARE(void) switch_uuid_format(char *buffer, const switch_uuid_t *uuid)
|
SWITCH_DECLARE(void) switch_uuid_format(char *buffer, const switch_uuid_t *uuid)
|
||||||
{
|
{
|
||||||
|
#ifndef WIN32
|
||||||
apr_uuid_format(buffer, (const apr_uuid_t *) uuid);
|
apr_uuid_format(buffer, (const apr_uuid_t *) uuid);
|
||||||
|
#else
|
||||||
|
RPC_CSTR buf;
|
||||||
|
UuidToString((const UUID*)uuid, &buf);
|
||||||
|
strcpy(buffer, (const char*)buf);
|
||||||
|
RpcStringFree(&buf);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
SWITCH_DECLARE(void) switch_uuid_get(switch_uuid_t *uuid)
|
SWITCH_DECLARE(void) switch_uuid_get(switch_uuid_t *uuid)
|
||||||
{
|
{
|
||||||
|
#ifndef WIN32
|
||||||
apr_uuid_get((apr_uuid_t *) uuid);
|
apr_uuid_get((apr_uuid_t *) uuid);
|
||||||
|
#else
|
||||||
|
UuidCreate((UUID*)uuid);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
SWITCH_DECLARE(switch_status_t) switch_uuid_parse(switch_uuid_t *uuid, const char *uuid_str)
|
SWITCH_DECLARE(switch_status_t) switch_uuid_parse(switch_uuid_t *uuid, const char *uuid_str)
|
||||||
{
|
{
|
||||||
return apr_uuid_parse((apr_uuid_t *) uuid, uuid_str);
|
#ifndef WIN32
|
||||||
|
apr_uuid_parse((apr_uuid_t *) uuid, uuid_str);
|
||||||
|
#else
|
||||||
|
return UuidFromString((RPC_CSTR)uuid_str, (UUID*)uuid);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
SWITCH_DECLARE(switch_status_t) switch_md5(unsigned char digest[SWITCH_MD5_DIGESTSIZE], const void *input, switch_size_t inputLen)
|
SWITCH_DECLARE(switch_status_t) switch_md5(unsigned char digest[SWITCH_MD5_DIGESTSIZE], const void *input, switch_size_t inputLen)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user