Initial commit.
FossilOrigin-Name: 01cef7709d75705c88707ee944abbb6788b7de930a0d28ecdffc35316a4ec288
This commit is contained in:
parent
b68642eec4
commit
5d056c4c50
15
src/capwap/cwmsg_addelem_radio_operational_state.c
Normal file
15
src/capwap/cwmsg_addelem_radio_operational_state.c
Normal file
@ -0,0 +1,15 @@
|
||||
|
||||
|
||||
#include "capwap.h"
|
||||
#include "cwmsg.h"
|
||||
#include "radioinfo.h"
|
||||
|
||||
void cwmsg_addelem_radio_operational_state(struct cwmsg * cwmsg, struct radioinfo * ri)
|
||||
{
|
||||
uint8_t s[3];
|
||||
s[0]=ri->rid;
|
||||
s[1]=ri->state;
|
||||
s[2]=ri->cause;
|
||||
|
||||
cwmsg_addelem(cwmsg,CWMSGELEM_RADIO_OPERATIONAL_STATE,s,3);
|
||||
}
|
19
src/capwap/cwsend_change_state_event_response.c
Normal file
19
src/capwap/cwsend_change_state_event_response.c
Normal file
@ -0,0 +1,19 @@
|
||||
|
||||
#include "cwmsg.h"
|
||||
#include "capwap.h"
|
||||
#include "cw_log.h"
|
||||
#include "sock.h"
|
||||
|
||||
void cwsend_change_state_event_response(struct conn * conn,int seqnum, struct radioinfo * radioinfo)
|
||||
{
|
||||
cw_dbg(DBG_CW_MSG,"Sending change state response to %s, seq = %d",sock_addr2str(&conn->addr),seqnum);
|
||||
|
||||
struct cwmsg * cwmsg = &conn->resp_msg;
|
||||
cwmsg_init(cwmsg,conn->resp_buffer,CWMSG_CHANGE_STATE_EVENT_RESPONSE,seqnum,NULL);
|
||||
|
||||
cwmsg_addelem_result_code(cwmsg,0);
|
||||
cwmsg_addelem_radio_operational_state(cwmsg,radioinfo);
|
||||
|
||||
conn_send_response(conn,cwmsg,seqnum);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user