libubx/ubx.c
void ubx_node_cleanup(ubx_node_info_t *ni)
{
	int cnt;
	ubx_module_t *m = NULL, *mtmp = NULL;

	logf_debug(ni, "node %s", ni->name);

	ubx_node_clear(ni);

	/* cleanup all modules. */
	HASH_ITER(hh, ni->modules, m, mtmp) {
		logf_debug(ni, "unloading module %s", m->id);
		ubx_module_cleanup(ni, m->id);
	}

	cnt = ubx_num_types(ni);
	if (cnt > 0)
		logf_warn(ni, "not has types after cleanup");

	cnt = ubx_num_blocks(ni);
	if (cnt > 0)
		logf_warn(ni, "%d blocks after cleanup", cnt);

	/* close all modules. */
	HASH_ITER(hh, ni->modules, m, mtmp) {
		logf_debug(ni, "unloading module %s", m->id);
		ubx_module_close(ni, m->id);
	}

	cnt = ubx_num_modules(ni);
	if (cnt > 0)
		logf_warn(ni, "%d modules after cleanup", cnt);

	ni->cur_seqid = 0;
}
/**
 * ubx_node_cleanup - cleanup a node
 *
 * This function will run ubx_node_clear and then unload all
 * modules. The node is empty but still valid afterwards.
 *
 * @param ni
 */
cleanup a node
This function will run ubx_node_clear and then unload all
modules. The node is empty but still valid afterwards.

@param ni
cleanup a node This function will run ubx_node_clear and then unload all modules . The node is empty but still valid afterwards . @param ni
void ubx_node_cleanup(ubx_node_info_t *ni)
{
	int cnt;
	ubx_module_t *m = NULL, *mtmp = NULL;
	logf_debug(ni, "node %s", ni->name);
	ubx_node_clear(ni);
	HASH_ITER(hh, ni->modules, m, mtmp) {
		logf_debug(ni, "unloading module %s", m->id);
		ubx_module_cleanup(ni, m->id);
	}
	cnt = ubx_num_types(ni);
	if (cnt > 0)
		logf_warn(ni, "not has types after cleanup");
	cnt = ubx_num_blocks(ni);
	if (cnt > 0)
		logf_warn(ni, "%d blocks after cleanup", cnt);
	HASH_ITER(hh, ni->modules, m, mtmp) {
		logf_debug(ni, "unloading module %s", m->id);
		ubx_module_close(ni, m->id);
	}
	cnt = ubx_num_modules(ni);
	if (cnt > 0)
		logf_warn(ni, "%d modules after cleanup", cnt);
	ni->cur_seqid = 0;
}
void ubx_node_cleanup ( ubx_node_info_t * ni ) { int cnt ; ubx_module_t * m = NULL , * mtmp = NULL ; logf_debug ( ni , " " , ni -> name ) ; ubx_node_clear ( ni ) ; HASH_ITER ( hh , ni -> modules , m , mtmp ) { logf_debug ( ni , " " , m -> id ) ; ubx_module_cleanup ( ni , m -> id ) ; } cnt = ubx_num_types ( ni ) ; if ( cnt > 0 ) logf_warn ( ni , " " ) ; cnt = ubx_num_blocks ( ni ) ; if ( cnt > 0 ) logf_warn ( ni , " " , cnt ) ; HASH_ITER ( hh , ni -> modules , m , mtmp ) { logf_debug ( ni , " " , m -> id ) ; ubx_module_close ( ni , m -> id ) ; } cnt = ubx_num_modules ( ni ) ; if ( cnt > 0 ) logf_warn ( ni , " " , cnt ) ; ni -> cur_seqid = 0 ; }
ubx_node_cleanup - cleanup a node
 This function will run ubx_node_clear and then unload all
 modules.
ubx_node_cleanup - cleanup a node This function will run ubx_node_clear and then unload all modules .
/* cleanup all modules. */ /* close all modules. */