fred-mod-eppd-2.14.1
Functions
Functions for memory allocation.

A memory allocated by these functions is automatically freed when processing of request is finished. More...

Functions

void * epp_malloc (void *pool, unsigned size)
 Allocate memory from memory pool. More...
 
void * epp_calloc (void *pool, unsigned size)
 Allocate memory from memory pool and prezero it. More...
 
char * epp_strdup (void *pool, const char *str)
 Duplicate string from argument, the memory will be allocated from memory pool. More...
 
char * epp_strcat (void *pool, const char *str1, const char *str2)
 Concatenate two strings in arguments, the memory will be allocated from memory pool. More...
 
char * epp_sprintf (void *pool, const char *fmt,...)
 Print formatted string. More...
 

Detailed Description

A memory allocated by these functions is automatically freed when processing of request is finished.

Function Documentation

void* epp_calloc ( void *  pool,
unsigned  size 
)

Allocate memory from memory pool and prezero it.

Parameters
poolMemory pool.
sizeNumber of bytes to allocate.
Returns
Pointer to allocated memory.

Allocate memory from memory pool and prezero it.

This function is exported in header file to be used by other modules which are not aware of apache pools.

Parameters
poolApache pool pointer.
sizeSize of chunk to allocate.
Returns
Allocated chunk.

Referenced by epp_parse_command(), info_keyset_data_copy(), info_nsset_data_copy(), parse_check(), parse_create_contact(), parse_create_domain(), parse_create_keyset(), parse_create_nsset(), parse_delete(), parse_ext_enumval_create(), parse_ext_enumval_renew(), parse_ext_enumval_update(), parse_extension(), parse_info(), parse_infoKey(), parse_login(), parse_poll(), parse_renew(), parse_sendAuthInfo(), parse_test(), parse_transfer(), parse_update_contact(), parse_update_domain(), parse_update_keyset(), and parse_update_nsset().

void* epp_malloc ( void *  pool,
unsigned  size 
)

Allocate memory from memory pool.

Parameters
poolMemory pool.
sizeNumber of bytes to allocate.
Returns
Pointer to allocated memory.

Allocate memory from memory pool.

This function is exported in header file to be used by other modules which are not aware of apache pools.

Parameters
poolApache pool pointer.
sizeSize of chunk to allocate.
Returns
Allocated chunk.

Referenced by epilog_failure(), epp_call_check(), epp_call_creditinfo(), epp_call_info_contact(), epp_call_poll_req(), epp_parse_command(), info_domain_data_copy(), info_keyset_data_copy(), info_nsset_data_copy(), new_error_item(), and q_add().

char* epp_sprintf ( void *  pool,
const char *  fmt,
  ... 
)

Print formatted string.

Parameters
poolMemory pool.
fmtFormat of string.
Returns
Formatted string allocated from pool.

Print formatted string.

This function is exported in header file to be used by other modules which are not aware of apache pools.

Parameters
poolApache pool pointer.
fmtFormat of string.
Returns
Formatted string allocated from pool.
char* epp_strcat ( void *  pool,
const char *  str1,
const char *  str2 
)

Concatenate two strings in arguments, the memory will be allocated from memory pool.

In case of memory allocation failure or if one of arguments is NULL the function returns NULL.

Parameters
poolMemory pool.
str1String which will be the first one.
str2String which will be appended.
Returns
Pointer to new string.

Concatenate two strings in arguments, the memory will be allocated from memory pool.

This function is exported in header file to be used by other modules which are not aware of apache pools.

Parameters
poolApache pool pointer.
str1First concatenated string.
str2Second concatenated string.
Returns
Duplicated string.

Referenced by epp_call_dummy().

char* epp_strdup ( void *  pool,
const char *  str 
)

Duplicate string from argument, the memory will be allocated from memory pool.

Parameters
poolMemory pool.
strString which is going to be duplicated.
Returns
Pointer duplicated string.

Duplicate string from argument, the memory will be allocated from memory pool.

This function is exported in header file to be used by other modules which are not aware of apache pools.

Parameters
poolApache pool pointer.
strString which is going to be duplicated.
Returns
Duplicated string.

Referenced by create_dummy_answer(), epp_gen_greeting(), epp_gen_response(), epp_getSubtree(), get_bad_xml(), parse_poll(), unwrap_str(), unwrap_str_req(), xpath_get1(), xpath_get_attr(), and xpath_getn().