Example #1
0
static int reload_module(void) {
	msgs_unhook(&default_msgs, impvbaw_exec);
	msgs_unhook(impvbaw_msgs, mm_impvbaw_exec);
	config_destroy(cfg);
	table_clear(contracts);
	table_clear(expiries);
	table_clear(optns);
	table_clear(spots);
	load_config();
	if (msgs_hook(&default_msgs, impvbaw_exec, impvbaw_msgs) == -1)
		return MODULE_LOAD_FAILURE;
	if (msgs_hook(impvbaw_msgs, mm_impvbaw_exec, NULL) == -1)
		return MODULE_LOAD_FAILURE;
	return MODULE_LOAD_SUCCESS;
}
Example #2
0
File: app_pd.c Project: ArkShen/xcb
static int unload_module(void) {
	msgs_unhook(&default_msgs, pd_exec);
	dlist_free(&pairs);
	table_free(&contracts);
	config_destroy(cfg);
	return unregister_application(app);
}
Example #3
0
static int reload_module(void) {
	msgs_unhook(&default_msgs, ema_exec);
	free_prices(contracts);
	map_clear(contracts);
	load_config();
	if (msgs_hook(&default_msgs, ema_exec, NULL) == -1)
		return MODULE_LOAD_FAILURE;
	return MODULE_LOAD_SUCCESS;
}
Example #4
0
static int reload_module(void) {
	msgs_unhook(&default_msgs, csi300_exec);
	config_destroy(cfg);
	table_clear(contracts);
	load_config();
	if (msgs_hook(&default_msgs, csi300_exec, NULL) == -1)
		return MODULE_LOAD_FAILURE;
	return MODULE_LOAD_SUCCESS;
}
Example #5
0
static int unload_module(void) {
	int res;

	if (check_msgs(impvbaw_msgs) == -1)
		return MODULE_LOAD_FAILURE;
	stop_msgs(impvbaw_msgs);
	msgs_unhook(&default_msgs, impvbaw_exec);
	msgs_unhook(impvbaw_msgs, mm_impvbaw_exec);
	msgs_free(impvbaw_msgs);
	config_destroy(cfg);
	table_free(&contracts);
	table_free(&expiries);
	table_free(&optns);
	table_free(&spots);
	res  = unregister_application(app);
	res |= unregister_application(app2);
	return res;
}
Example #6
0
static int unload_module(void) {
	msgs_unhook(&default_msgs, ema_exec);
	free_prices(contracts);
	map_destroy(contracts);
	return unregister_application(app);
}
Example #7
0
static int unload_module(void) {
	msgs_unhook(&default_msgs, hello_exec);
	return unregister_application(app);
}