add event system

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@128 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale
2005-12-13 19:53:29 +00:00
parent 611e80432e
commit 40824bc41a
9 changed files with 54 additions and 59 deletions

View File

@@ -422,6 +422,20 @@ SWITCH_DECLARE(char *) switch_core_session_strdup(switch_core_session *session,
return duped;
}
SWITCH_DECLARE(char *) switch_core_strdup(switch_memory_pool *pool, char *todup)
{
char *duped = NULL;
assert(pool != NULL);
assert(todup != NULL);
if (todup && (duped = apr_palloc(pool, strlen(todup)+1))) {
strcpy(duped, todup);
}
return duped;
}
SWITCH_DECLARE(void *) switch_core_session_get_private(switch_core_session *session)
{
assert(session != NULL);
@@ -1500,7 +1514,8 @@ SWITCH_DECLARE(switch_status) switch_core_init(void)
return SWITCH_STATUS_MEMERR;
}
switch_console_printf(SWITCH_CHANNEL_CONSOLE, "Allocated memory pool.\n");
switch_event_init(runtime.memory_pool);
#ifdef EMBED_PERL
if (! (my_perl = perl_alloc())) {
switch_console_printf(SWITCH_CHANNEL_CONSOLE, "Could not allocate perl intrepreter\n");