typo
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2185 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
765ee43280
commit
4395e55493
|
@ -206,7 +206,7 @@ SWITCH_DECLARE(unsigned int) switch_core_session_runing(switch_core_session_t *s
|
||||||
\return a void pointer to the allocated memory
|
\return a void pointer to the allocated memory
|
||||||
\note this memory never goes out of scope until the core is destroyed
|
\note this memory never goes out of scope until the core is destroyed
|
||||||
*/
|
*/
|
||||||
SWITCH_DECLARE(void *) switch_core_permenant_alloc(switch_size_t memory);
|
SWITCH_DECLARE(void *) switch_core_permanent_alloc(switch_size_t memory);
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\brief Allocate memory directly from a memory pool
|
\brief Allocate memory directly from a memory pool
|
||||||
|
@ -226,11 +226,11 @@ SWITCH_DECLARE(void *) switch_core_alloc(switch_memory_pool_t *pool, switch_size
|
||||||
SWITCH_DECLARE(void *) switch_core_session_alloc(switch_core_session_t *session, switch_size_t memory);
|
SWITCH_DECLARE(void *) switch_core_session_alloc(switch_core_session_t *session, switch_size_t memory);
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\brief Copy a string using permenant memory allocation
|
\brief Copy a string using permanent memory allocation
|
||||||
\param todup the string to duplicate
|
\param todup the string to duplicate
|
||||||
\return a pointer to the newly duplicated string
|
\return a pointer to the newly duplicated string
|
||||||
*/
|
*/
|
||||||
SWITCH_DECLARE(char *) switch_core_permenant_strdup(char *todup);
|
SWITCH_DECLARE(char *) switch_core_permanent_strdup(char *todup);
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\brief Copy a string using memory allocation from a session's pool
|
\brief Copy a string using memory allocation from a session's pool
|
||||||
|
|
|
@ -287,7 +287,7 @@ static switch_status_t setup_formats(void)
|
||||||
|
|
||||||
sfinfo.channels = 1;
|
sfinfo.channels = 1;
|
||||||
len = ((major_count + (exlen + 2)) * sizeof(char *));
|
len = ((major_count + (exlen + 2)) * sizeof(char *));
|
||||||
supported_formats = switch_core_permenant_alloc(len);
|
supported_formats = switch_core_permanent_alloc(len);
|
||||||
|
|
||||||
len = 0;
|
len = 0;
|
||||||
for (m = 0; m < major_count; m++) {
|
for (m = 0; m < major_count; m++) {
|
||||||
|
|
|
@ -857,9 +857,9 @@ SWITCH_DECLARE(void *) switch_core_session_alloc(switch_core_session_t *session,
|
||||||
}
|
}
|
||||||
|
|
||||||
/* **ONLY** alloc things with these functions that **WILL NOT** need
|
/* **ONLY** alloc things with these functions that **WILL NOT** need
|
||||||
to be freed *EVER* ie this is for *PERMENANT* memory allocation */
|
to be freed *EVER* ie this is for *PERMANENT* memory allocation */
|
||||||
|
|
||||||
SWITCH_DECLARE(void *) switch_core_permenant_alloc(switch_size_t memory)
|
SWITCH_DECLARE(void *) switch_core_permanent_alloc(switch_size_t memory)
|
||||||
{
|
{
|
||||||
void *ptr = NULL;
|
void *ptr = NULL;
|
||||||
assert(runtime.memory_pool != NULL);
|
assert(runtime.memory_pool != NULL);
|
||||||
|
@ -874,7 +874,7 @@ SWITCH_DECLARE(void *) switch_core_permenant_alloc(switch_size_t memory)
|
||||||
return ptr;
|
return ptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
SWITCH_DECLARE(char *) switch_core_permenant_strdup(char *todup)
|
SWITCH_DECLARE(char *) switch_core_permanent_strdup(char *todup)
|
||||||
{
|
{
|
||||||
char *duped = NULL;
|
char *duped = NULL;
|
||||||
switch_size_t len;
|
switch_size_t len;
|
||||||
|
|
|
@ -270,7 +270,7 @@ static switch_status_t switch_loadable_module_load_file(char *filename, switch_l
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((module = switch_core_permenant_alloc(sizeof(switch_loadable_module_t))) == 0) {
|
if ((module = switch_core_permanent_alloc(sizeof(switch_loadable_module_t))) == 0) {
|
||||||
err = "Could not allocate memory\n";
|
err = "Could not allocate memory\n";
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -283,7 +283,7 @@ static switch_status_t switch_loadable_module_load_file(char *filename, switch_l
|
||||||
return SWITCH_STATUS_GENERR;
|
return SWITCH_STATUS_GENERR;
|
||||||
}
|
}
|
||||||
|
|
||||||
module->filename = switch_core_permenant_strdup(filename);
|
module->filename = switch_core_permanent_strdup(filename);
|
||||||
module->module_interface = module_interface;
|
module->module_interface = module_interface;
|
||||||
module->switch_module_load = load_func_ptr;
|
module->switch_module_load = load_func_ptr;
|
||||||
|
|
||||||
|
@ -365,7 +365,7 @@ SWITCH_DECLARE(switch_status_t) switch_loadable_module_build_dynamic(char *filen
|
||||||
const char *err = NULL;
|
const char *err = NULL;
|
||||||
switch_loadable_module_interface_t *module_interface = NULL;
|
switch_loadable_module_interface_t *module_interface = NULL;
|
||||||
|
|
||||||
if ((module = switch_core_permenant_alloc(sizeof(switch_loadable_module_t))) == 0) {
|
if ((module = switch_core_permanent_alloc(sizeof(switch_loadable_module_t))) == 0) {
|
||||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CONSOLE, "Couldn't allocate memory\n");
|
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CONSOLE, "Couldn't allocate memory\n");
|
||||||
return SWITCH_STATUS_GENERR;
|
return SWITCH_STATUS_GENERR;
|
||||||
}
|
}
|
||||||
|
@ -384,7 +384,7 @@ SWITCH_DECLARE(switch_status_t) switch_loadable_module_build_dynamic(char *filen
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((module = switch_core_permenant_alloc(sizeof(switch_loadable_module_t))) == 0) {
|
if ((module = switch_core_permanent_alloc(sizeof(switch_loadable_module_t))) == 0) {
|
||||||
err = "Could not allocate memory\n";
|
err = "Could not allocate memory\n";
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -397,7 +397,7 @@ SWITCH_DECLARE(switch_status_t) switch_loadable_module_build_dynamic(char *filen
|
||||||
return SWITCH_STATUS_GENERR;
|
return SWITCH_STATUS_GENERR;
|
||||||
}
|
}
|
||||||
|
|
||||||
module->filename = switch_core_permenant_strdup(filename);
|
module->filename = switch_core_permanent_strdup(filename);
|
||||||
module->module_interface = module_interface;
|
module->module_interface = module_interface;
|
||||||
module->switch_module_load = load_func_ptr;
|
module->switch_module_load = load_func_ptr;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue