itemstro_set_strn fxed.
FossilOrigin-Name: 0d3215435efe23255dd6979b2ca074f6f98a92bdf825dafc05d36874ebaf35cb
This commit is contained in:
parent
79dd9cd531
commit
474763a3eb
@ -164,6 +164,7 @@ CAPWAPOBJS= \
|
|||||||
cw_strlist_get_str.o \
|
cw_strlist_get_str.o \
|
||||||
capwap_strings_msg.o \
|
capwap_strings_msg.o \
|
||||||
capwap_strings_state.o \
|
capwap_strings_state.o \
|
||||||
|
capwap_strings_vendor.o \
|
||||||
itemstore.o \
|
itemstore.o \
|
||||||
cw_in_vendor_specific_payload.o \
|
cw_in_vendor_specific_payload.o \
|
||||||
cw_in_wtp_name.o \
|
cw_in_wtp_name.o \
|
||||||
|
@ -709,8 +709,11 @@ struct cw_strlist {
|
|||||||
extern const char * cw_strlist_get_str(struct cw_strlist *s,int id);
|
extern const char * cw_strlist_get_str(struct cw_strlist *s,int id);
|
||||||
|
|
||||||
|
|
||||||
|
/* Constants to string conversion lists */
|
||||||
extern struct cw_strlist capwap_strings_msg[];
|
extern struct cw_strlist capwap_strings_msg[];
|
||||||
extern struct cw_strlist capwap_strings_state[];
|
extern struct cw_strlist capwap_strings_state[];
|
||||||
|
extern struct cw_strlist capwap_strings_vendor[];
|
||||||
|
|
||||||
|
|
||||||
#define cw_strmsg(id) cw_strlist_get_str(capwap_strings_msg,id)
|
#define cw_strmsg(id) cw_strlist_get_str(capwap_strings_msg,id)
|
||||||
#define cw_strstate(id) cw_strlist_get_str(capwap_strings_state,id)
|
#define cw_strstate(id) cw_strlist_get_str(capwap_strings_state,id)
|
||||||
|
@ -6,22 +6,9 @@
|
|||||||
|
|
||||||
int cw_in_wtp_name(struct conn *conn,struct cw_action * a,uint8_t *data,int len)
|
int cw_in_wtp_name(struct conn *conn,struct cw_action * a,uint8_t *data,int len)
|
||||||
{
|
{
|
||||||
int i;
|
|
||||||
|
|
||||||
printf("WTP Name: ");
|
|
||||||
for (i=0; i<len; i++) {
|
|
||||||
printf("%c",data[i]);
|
|
||||||
}
|
|
||||||
printf("\n");
|
|
||||||
|
|
||||||
if (len > 512){
|
if (len > 512){
|
||||||
cw_dbg(DBG_CW_RFC, "WTP Name too long, must not exceed 512, len is %d",len);
|
cw_dbg(DBG_CW_RFC, "WTP Name too long, must not exceed 512, len is %d",len);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
cw_itemstore_set_strn(conn->itemstore,CW_ITEM_WTP_NAME,(const char*)data,len);
|
cw_itemstore_set_strn(conn->itemstore,CW_ITEM_WTP_NAME,(const char*)data,len);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user