Fix bugs, WTP knows more config items now.
FossilOrigin-Name: ee618e9a725b03b6db1e34d17dd352488a0507acf8588fba20a55bfffb668353
This commit is contained in:
@ -45,23 +45,18 @@ bstr_t get_base_rmac()
|
||||
int handle_update_req(struct conn *conn, struct cw_action_in *a, uint8_t * data,
|
||||
int len,struct sockaddr *from)
|
||||
{
|
||||
printf("There was an config update request\n");
|
||||
MAVLITER_DEFINE(it,conn->incomming);
|
||||
printf("Here are the results\n");
|
||||
|
||||
mavliter_foreach(&it){
|
||||
mbag_item_t * item = mavliter_get(&it);
|
||||
|
||||
printf("MBAG ITEM GOT: %d\n",item->id);
|
||||
// printf("MBAG ITEM GOT: %d\n",item->id);
|
||||
if (item->id == CW_ITEM_WTP_NAME) {
|
||||
printf("Yea! WTP NAME\n");
|
||||
|
||||
printf("The name is %.*s\n",bstr16_len(item->data),bstr16_data(item->data));
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
cw_dbg(DBG_INFO,"Saving configuration ...");
|
||||
cfg_json_save();
|
||||
return 0;
|
||||
|
||||
@ -122,6 +117,15 @@ mavl_destroy(b);
|
||||
cw_register_actions_cipwap_wtp(&capwap_actions);
|
||||
cw_register_actions_capwap_80211_wtp(&capwap_actions);
|
||||
|
||||
|
||||
/*
|
||||
MAVLITER_DEFINE(it,capwap_actions.strelem);
|
||||
mavliter_foreach(&it){
|
||||
struct cw_str *s = mavliter_get(&it);
|
||||
|
||||
}
|
||||
*/
|
||||
|
||||
////cw_register_actions_capwap_80211_wtp(&capwap_actions);
|
||||
|
||||
conn->actions = &capwap_actions;
|
||||
@ -164,17 +168,18 @@ conn->config=mbag_create();
|
||||
|
||||
|
||||
cw_set_msg_end_callback(conn,CW_STATE_RUN,CW_MSG_CONFIGURATION_UPDATE_REQUEST,handle_update_req);
|
||||
cw_set_msg_end_callback(conn,CW_STATE_CONFIGURE,CW_MSG_CONFIGURATION_STATUS_RESPONSE,handle_update_req);
|
||||
|
||||
|
||||
|
||||
the_conn->strict_capwap=0;
|
||||
discovery();
|
||||
join();
|
||||
mavl_destroy(conn->incomming);
|
||||
conn->incomming=conn->config;
|
||||
configure();
|
||||
changestate();
|
||||
|
||||
mavl_destroy(conn->incomming);
|
||||
conn->incomming=conn->config;
|
||||
|
||||
run();
|
||||
|
||||
|
Reference in New Issue
Block a user