get uuid from apr-utils for channel events

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@190 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale
2005-12-22 01:57:32 +00:00
parent 98a797a2f2
commit e60fbc2267
6 changed files with 23 additions and 18 deletions

View File

@@ -74,6 +74,7 @@ struct switch_core_session {
switch_mutex_t *mutex;
switch_thread_cond_t *cond;
char uuid_str[SWITCH_UUID_FORMATTED_LENGTH+1];
void *private;
};
@@ -179,6 +180,11 @@ SWITCH_DECLARE(switch_status) switch_core_do_perl(char *txt)
#endif
SWITCH_DECLARE(char *) switch_core_session_get_uuid(switch_core_session *session)
{
return session->uuid_str;
}
SWITCH_DECLARE(switch_status) switch_core_session_set_read_codec(switch_core_session *session, switch_codec *codec)
{
assert(session != NULL);
@@ -1490,6 +1496,7 @@ SWITCH_DECLARE(switch_core_session *) switch_core_session_request(const switch_e
{
switch_memory_pool *usepool;
switch_core_session *session;
switch_uuid_t uuid;
assert(endpoint_interface != NULL);
@@ -1517,6 +1524,9 @@ SWITCH_DECLARE(switch_core_session *) switch_core_session_request(const switch_e
/* The session *IS* the pool you may not alter it because you have no idea how
its all private it will be passed to the thread run function */
switch_uuid_get(&uuid);
switch_uuid_format(session->uuid_str, &uuid);
session->pool = usepool;
session->endpoint_interface = endpoint_interface;