more on mods.
FossilOrigin-Name: 92539795329743de76ef8a9a362dccad314b19682f4045ace4a10c432f6f1425
This commit is contained in:
@ -930,11 +930,11 @@ extern int cw_send_configuration_update_response(struct conn *conn, int seqnum,
|
||||
struct radioinfo *radioinfo);
|
||||
*/
|
||||
|
||||
#define cw_addelem_ac_name(dst,name) \
|
||||
cw_addelem(dst,CW_ELEM_AC_NAME,name,strlen((char*)(name)))
|
||||
//#define cw_addelem_ac_name(dst,name) \
|
||||
// cw_addelem(dst,CW_ELEM_AC_NAME,name,strlen((char*)(name)))
|
||||
|
||||
#define cw_addelem_session_id(dst,sessid)\
|
||||
cw_addelem_bstr(dst,CW_ELEM_SESSION_ID,sessid)
|
||||
//#define cw_addelem_session_id(dst,sessid)\
|
||||
// cw_addelem_bstr(dst,CW_ELEM_SESSION_ID,sessid)
|
||||
|
||||
|
||||
|
||||
|
14
src/cw/cw.h
14
src/cw/cw.h
@ -24,13 +24,25 @@
|
||||
* see #lw_put_byte
|
||||
*/
|
||||
#define cw_put_byte lw_put_byte
|
||||
|
||||
/**
|
||||
* Put a word to an output buffer.
|
||||
* see #lw_put_word
|
||||
*/
|
||||
#define cw_put_word lw_put_word
|
||||
|
||||
/**
|
||||
* Put a dword
|
||||
* see #lw_put_dword
|
||||
*/
|
||||
#define cw_put_dword lw_put_dword
|
||||
|
||||
/**
|
||||
* Put some bytes
|
||||
* See #lw_put_data
|
||||
*/
|
||||
#define cw_put_data lw_put_data
|
||||
|
||||
#define cw_put_bstr lw_put_bstr
|
||||
#define cw_put_bstr16 lw_put_bstr16
|
||||
|
||||
@ -65,6 +77,8 @@ extern int cw_in_check_generic_resp(struct conn *conn, struct cw_action_in *a,
|
||||
uint8_t * data, int len, struct sockaddr *from);
|
||||
|
||||
|
||||
extern int cw_in_vendor_specific_payload(struct conn *conn, struct cw_action_in *a,
|
||||
uint8_t * data, int len,struct sockaddr *from);
|
||||
|
||||
|
||||
/**
|
||||
|
@ -10,28 +10,30 @@
|
||||
|
||||
/**
|
||||
* Default handler for Vendor Specific Payload message elements.
|
||||
*/
|
||||
int cw_in_vendor_specific_payload(struct conn *conn,struct cw_action_in * a,uint8_t *data,int len,struct sockaddr *from)
|
||||
*/
|
||||
int cw_in_vendor_specific_payload(struct conn *conn, struct cw_action_in *a,
|
||||
uint8_t * data, int len, struct sockaddr *from)
|
||||
{
|
||||
|
||||
cw_action_in_t as,*af;
|
||||
cw_action_in_t as, *af;
|
||||
as = *a;
|
||||
|
||||
as.vendor_id = cw_get_dword(data);
|
||||
as.elem_id = cw_get_word(data+4);
|
||||
as.elem_id = cw_get_word(data + 4);
|
||||
|
||||
|
||||
af = cw_actionlist_in_get(conn->actions->in,&as);
|
||||
af = cw_actionlist_in_get(conn->actions->in, &as);
|
||||
|
||||
if (!af) {
|
||||
cw_dbg(DBG_WARN,"Can't handle Vendor Specific Payload %s/%d, in msg %d (%s) in %s state.",
|
||||
cw_strvendor(as.vendor_id),
|
||||
as.elem_id,as.msg_id,cw_strmsg(as.msg_id),cw_strstate(as.capwap_state));
|
||||
cw_dbg(DBG_WARN,
|
||||
"Can't handle Vendor Specific Payload %s/%d, in msg %d (%s) in %s state.",
|
||||
cw_strvendor(as.vendor_id), as.elem_id, as.msg_id,
|
||||
cw_strmsg(as.msg_id), cw_strstate(as.capwap_state));
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (af->start) {
|
||||
int afrc = af->start(conn,af,data+6,len-6,from);
|
||||
int afrc = af->start(conn, af, data + 6, len - 6, from);
|
||||
if (af->mand && afrc) {
|
||||
/* add found mandatory message element
|
||||
to mand list */
|
||||
@ -42,4 +44,3 @@ int cw_in_vendor_specific_payload(struct conn *conn,struct cw_action_in * a,uint
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -19,6 +19,7 @@ int cw_out_radio_operational_states(struct conn *conn, struct cw_action_out *a,
|
||||
|
||||
MAVLITER_DEFINE(it,conn->radios);
|
||||
mavliter_foreach(&it){
|
||||
|
||||
mbag_item_t * radioitem = mavliter_get(&it);
|
||||
mbag_item_t *ositem = mbag_get(radioitem->data,CW_RADIO_OPER_STATE);
|
||||
if (!ositem){
|
||||
|
Reference in New Issue
Block a user