Got rid of conn->actions

But there are now a lot of TODO XXX

FossilOrigin-Name: 48a574ca77230265480a3054d8f6009d6074a476dd0d39c8544f5fb972ecb615
This commit is contained in:
7u83@mail.ru
2018-02-26 17:28:12 +00:00
parent 33cc9e3af9
commit 6ebf54dbbd
23 changed files with 166 additions and 142 deletions

View File

@ -123,13 +123,22 @@ static cw_msgdef_t messages[] = {
{&_AC_DESCRIPTOR,1},
{0,0},
}
}
},
{0,0,0,0}
};
int capwap_register_msg_set(struct cw_MsgSet * set){
struct cw_MsgSet * capwap_register_msg_set(struct cw_MsgSet * set, int mode){
printf("Register Message set %p\n",set);
if (mode != CW_MOD_MODE_CAPWAP)
return NULL;
cw_msgset_add(set,messages);
printf("Done Addin gmessages");
exit(0);
}
void test_sets(){

View File

@ -28,5 +28,8 @@ extern struct mbag_item * capwap_out_get_capwap_timers(struct conn *conn,struct
extern int capwap_out_ac_ip_list(struct conn *conn, struct cw_action_out *a, uint8_t * dst);
struct cw_MsgSet * capwap_register_msg_set(struct cw_MsgSet * set, int mode);
#endif

View File

@ -18,8 +18,6 @@ extern int capwap_register_actions_ac(struct cw_actiondef *def);
static int init()
{
cw_dbg(DBG_MOD, "Initialiazing mod_capwap.");
// int rc = capwap_register_actions_ac(&actions);
// cw_dbg(DBG_INFO, "Initialized mod capwap with %d actions", rc);
return 0;
}
@ -46,7 +44,8 @@ static struct cw_Mod capwap_ac = {
.name = "capwap",
.init = init,
.detect = detect,
.register_actions = register_actions
.register_actions = register_actions,
.register_messages = capwap_register_msg_set
};
struct cw_Mod *mod_capwap_ac()

View File

@ -30,7 +30,7 @@ static int detect(struct conn *conn, const uint8_t * rawmsg, int rawlen, int ele
if (mode != CW_MOD_MODE_CAPWAP)
return 0;
conn->detected = 1;
conn->actions = &actions;
//conn->actions = &actions;
return 1;
}