mod_register_actions now uses parameter mode.
FossilOrigin-Name: 7fccf33259836d6d1139d611825315e21428fbb88d7359d4176ef8ba258488fa
This commit is contained in:
@ -8,7 +8,7 @@
|
||||
#include "mod_capwap.h"
|
||||
|
||||
|
||||
static struct cw_actiondef actions;
|
||||
//static struct cw_actiondef actions;
|
||||
|
||||
|
||||
|
||||
@ -27,17 +27,26 @@ static int init()
|
||||
static int detect(struct conn *conn, const uint8_t * rawmsg, int rawlen, int elems_len,
|
||||
struct sockaddr *from, int mode)
|
||||
{
|
||||
if (mode != MOD_DETECT_CAPWAP)
|
||||
if (mode != MOD_MODE_CAPWAP)
|
||||
return 0;
|
||||
cw_dbg(DBG_MOD,"CAPWAP detected: yes");
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int register_actions(struct cw_actiondef *def, int mode)
|
||||
{
|
||||
if (mode != MOD_MODE_CAPWAP)
|
||||
return 0;
|
||||
return capwap_register_actions_ac(def);
|
||||
}
|
||||
|
||||
|
||||
|
||||
static struct mod_ac capwap_ac = {
|
||||
.name = "capwap",
|
||||
.init = init,
|
||||
.detect = detect,
|
||||
.register_actions = capwap_register_actions_ac
|
||||
.register_actions = register_actions
|
||||
};
|
||||
|
||||
struct mod_ac *mod_capwap_ac()
|
||||
|
@ -27,18 +27,25 @@ static int init()
|
||||
static int detect(struct conn *conn, const uint8_t * rawmsg, int rawlen, int elems_len,
|
||||
struct sockaddr *from, int mode)
|
||||
{
|
||||
if (mode != MOD_DETECT_CAPWAP)
|
||||
if (mode != MOD_MODE_CAPWAP)
|
||||
return 0;
|
||||
conn->detected = 1;
|
||||
conn->actions = &actions;
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int register_actions(struct cw_actiondef *def, int mode)
|
||||
{
|
||||
if (mode != MOD_MODE_CAPWAP)
|
||||
return 0;
|
||||
return capwap_register_actions_wtp(def);
|
||||
}
|
||||
|
||||
static struct mod_wtp capwap_wtp = {
|
||||
.name = "capwap",
|
||||
.init = init,
|
||||
.detect = detect,
|
||||
.register_actions = capwap_register_actions_wtp
|
||||
.register_actions=register_actions
|
||||
};
|
||||
|
||||
struct mod_wtp *mod_capwap_wtp()
|
||||
|
Reference in New Issue
Block a user