Playing round with a new state machine concept.

FossilOrigin-Name: b15d1beded51369384764d634c232711fc37027a08e25ad22b5ed0e841b9e574
This commit is contained in:
7u83@mail.ru
2015-03-30 05:56:42 +00:00
parent 88aa7793a2
commit e74e8772f8
29 changed files with 189 additions and 54 deletions

View File

@ -357,6 +357,13 @@ static void wtpman_run_discovery(void *arg)
struct cwrmsg * cwrmsg;
extern cw_actionlist_t the_tree;
wtpman->conn->capwap_state=CW_STATE_DISCOVERY;
wtpman->conn->msgtr=the_tree;
time_t timer = cw_timer_start(10);
cwrmsg = wtpman_wait_for_message(wtpman, timer);
@ -559,9 +566,13 @@ static int wtpman_join(void *arg,time_t timer)
{
struct wtpman * wtpman = (struct wtpman *)arg;
extern cw_actionlist_t the_tree;
wtpman->conn->msgtr=the_tree;
wtpman->conn->capwap_state=CW_STATE_JOIN;
/* timer = cw_timer_start(wtpman->conn->wait_join); */
int join_msgs[] = { CWMSG_JOIN_REQUEST, -1 };
int join_msgs[] = { CW_MSG_JOIN_REQUEST, -1 };
struct cwrmsg * cwrmsg;
cwrmsg = conn_wait_for_request(wtpman->conn, join_msgs, timer);