zabbix-agent2/src/libs/zbxdbcache/dbsync.c
/******************************************************************************
 *                                                                            *
 * Function: dbsync_prepare                                                   *
 *                                                                            *
 * Purpose: prepares changeset                                                *
 *                                                                            *
 * Parameter: sync             - [IN] the changeset                           *
 *            columns_num      - [IN] the number of columns in the changeset  *
 *            preproc_row_func - [IN] the callback function used to retrieve  *
 *                                    associated hostids (can be NULL if      *
 *                                    user macros are not resolved during     *
 *                                    synchronization process)                *
 *                                                                            *
 ******************************************************************************/
dbsync_prepare

Purpose: prepares changeset

Parameter: sync             - [IN] the changeset
columns_num      - [IN] the number of columns in the changeset
preproc_row_func - [IN] the callback function used to retrieve
associated hostids (can be NULL if
user macros are not resolved during
synchronization process)
dbsync_prepare Purpose : prepares changeset Parameter : sync - [ IN ] the changeset columns_num - [ IN ] the number of columns in the changeset preproc_row_func - [ IN ] the callback function used to retrieve associated hostids ( can be NULL if user macros are not resolved during synchronization process )
static void	dbsync_prepare(zbx_dbsync_t *sync, int columns_num, zbx_dbsync_preproc_row_func_t preproc_row_func)
{
	sync->columns_num = columns_num;
	sync->preproc_row_func = preproc_row_func;
	sync->row = (char **)zbx_malloc(NULL, sizeof(char *) * columns_num);
	memset(sync->row, 0, sizeof(char *) * columns_num);
}
static void dbsync_prepare ( zbx_dbsync_t * sync , int columns_num , zbx_dbsync_preproc_row_func_t preproc_row_func ) { sync -> columns_num = columns_num ; sync -> preproc_row_func = preproc_row_func ; sync -> row = ( char * * ) zbx_malloc ( NULL , sizeof ( char * ) * columns_num ) ; memset ( sync -> row , 0 , sizeof ( char * ) * columns_num ) ; }
Function: dbsync_prepare                                                   
                                                                            
 Purpose: prepares changeset                                                
                                                                            
 Parameter: sync             - [IN] the changeset                           
            columns_num      - [IN] the number of columns in the changeset  
            preproc_row_func - [IN] the callback function used to retrieve  
                                    associated hostids (can be NULL if      
                                    user macros are not resolved during     
                                    synchronization process)
Function : dbsync_prepare Purpose : prepares changeset Parameter : sync - [ IN ] the changeset columns_num - [ IN ] the number of columns in the changeset preproc_row_func - [ IN ] the callback function used to retrieve associated hostids ( can be NULL if user macros are not resolved during synchronization process )