From 302a4b3247f62988de8668229f9bac6e60eb1889 Mon Sep 17 00:00:00 2001 From: "7u83@mail.ru" <7u83@mail.ru@noemail.net> Date: Tue, 28 Apr 2015 12:29:55 +0000 Subject: [PATCH] Updates Radio Oper State before sending the message. FossilOrigin-Name: 22bd2eaceba40b09743b72e66d14bc0659a5e7c620506aa193b50a545b2a105d --- src/wtp/changestate.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/wtp/changestate.c b/src/wtp/changestate.c index 9ce76b04..fbe94eed 100644 --- a/src/wtp/changestate.c +++ b/src/wtp/changestate.c @@ -1,15 +1,22 @@ #include "capwap/capwap.h" #include "capwap/conn.h" -#include "wtp_interface.h" +#include "capwap/radio.h" +#include "wtp_interface.h" int changestate() { struct conn * conn = get_conn(); - int rc = cw_send_request(conn,CW_MSG_CHANGE_STATE_EVENT_REQUEST); + /* Update operational states, so they will be included + in the change Change State Event Request message. */ + cw_radio_update_oper_states(conn->radios,0); + + + /* Change State ... */ + int rc = cw_send_request(conn,CW_MSG_CHANGE_STATE_EVENT_REQUEST); if ( !cw_rcok(rc) ) { cw_strresult(rc); return 0;