Refactoring, work on mod_load
FossilOrigin-Name: ae3ed889283aac53bbbe900b6859605b153f90b91430d231767343bcf05447a8
This commit is contained in:
@ -93,15 +93,11 @@ extern struct cw_Mod * cw_get_mod_ac(const char *name);
|
||||
|
||||
|
||||
extern void test_sets();
|
||||
#include "cw/file.h"
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
int rc = 0;
|
||||
|
||||
/* parse arguments */
|
||||
@ -124,7 +120,8 @@ int main(int argc, char *argv[])
|
||||
developers is turned on ;) */
|
||||
DBGX("Attention! %s", "DBG X is ON!");
|
||||
|
||||
cw_mod_add_dynamic("../../lib/actube","capwap");
|
||||
cw_mod_set_mod_path("../../lib/actube");
|
||||
cw_mod_load("capwap");
|
||||
|
||||
exit(0);
|
||||
|
||||
|
@ -573,11 +573,15 @@ static int conf_read_mods(cfg_t *cfg){
|
||||
conf_mods = malloc(sizeof(struct cw_Mod *)*(n+1));
|
||||
|
||||
cw_dbg(DBG_INFO,"Mods directory: %s",conf_mods_dir);
|
||||
cw_mod_set_mod_path(conf_mods_dir);
|
||||
|
||||
for (i=0; i < n; i++){
|
||||
char *modname = cfg_getnstr(cfg, CFG_ENTRY_MODS, i);
|
||||
|
||||
struct cw_Mod * mod = cw_mod_add_dynamic(conf_mods_dir,modname);
|
||||
|
||||
printf("Modname: %s\n",modname);
|
||||
|
||||
|
||||
struct cw_Mod * mod = cw_mod_load(modname);
|
||||
if (!mod)
|
||||
return 0;
|
||||
|
||||
|
Reference in New Issue
Block a user