mutex uuid creation

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@16067 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale
2009-12-28 22:04:50 +00:00
parent 638790af30
commit 0c63f02f75
3 changed files with 10 additions and 2 deletions
+3
View File
@@ -34,6 +34,7 @@
#ifndef WIN32
#include <switch_private.h>
#endif
#include "private/switch_core_pvt.h"
/* apr headers*/
#include <apr.h>
@@ -882,11 +883,13 @@ SWITCH_DECLARE(void) switch_uuid_format(char *buffer, const switch_uuid_t *uuid)
SWITCH_DECLARE(void) switch_uuid_get(switch_uuid_t *uuid)
{
switch_mutex_lock(runtime.uuid_mutex);
#ifndef WIN32
apr_uuid_get((apr_uuid_t *) uuid);
#else
UuidCreate((UUID*)uuid);
#endif
switch_mutex_unlock(runtime.uuid_mutex);
}
SWITCH_DECLARE(switch_status_t) switch_uuid_parse(switch_uuid_t *uuid, const char *uuid_str)