2016-03-03 19:51:42 +01:00
|
|
|
#include "cw/capwap.h"
|
2016-03-20 15:55:41 +01:00
|
|
|
#include "cw/capwap_items.h"
|
2016-03-03 19:51:42 +01:00
|
|
|
#include "cw/conn.h"
|
|
|
|
#include "cw/radio.h"
|
2015-04-19 16:50:44 +02:00
|
|
|
|
2015-04-28 14:29:55 +02:00
|
|
|
#include "wtp_interface.h"
|
2015-04-19 16:50:44 +02:00
|
|
|
|
|
|
|
int changestate()
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
struct conn * conn = get_conn();
|
|
|
|
|
2015-04-28 14:29:55 +02:00
|
|
|
/* Update operational states, so they will be included
|
|
|
|
in the change Change State Event Request message. */
|
2016-04-18 07:40:30 +02:00
|
|
|
// cw_radio_update_oper_states(conn->radios,0);
|
2015-04-28 14:29:55 +02:00
|
|
|
|
2016-03-20 15:55:41 +01:00
|
|
|
mbag_set_dword(conn->outgoing,CW_ITEM_RESULT_CODE,0);
|
|
|
|
|
|
|
|
|
2015-04-28 14:29:55 +02:00
|
|
|
|
|
|
|
/* Change State ... */
|
2018-03-05 10:06:18 +01:00
|
|
|
int rc = cw_send_request(conn,CAPWAP_MSG_CHANGE_STATE_EVENT_REQUEST);
|
2018-03-09 15:38:21 +01:00
|
|
|
if ( !cw_result_is_ok(rc) ) {
|
2015-04-19 16:50:44 +02:00
|
|
|
cw_strresult(rc);
|
2015-04-26 12:36:53 +02:00
|
|
|
return 0;
|
2015-04-19 16:50:44 +02:00
|
|
|
}
|
|
|
|
|
2015-04-26 12:36:53 +02:00
|
|
|
return 1;
|
2015-04-19 16:50:44 +02:00
|
|
|
}
|
|
|
|
|