mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-08-13 17:38:59 +00:00
add event system
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@128 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
@@ -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");
|
||||
|
Reference in New Issue
Block a user