2014-07-11 22:12:11 +02:00
|
|
|
|
|
|
|
#include "wtpinfo.h"
|
|
|
|
#include "capwap.h"
|
|
|
|
|
|
|
|
#include "cw_util.h"
|
|
|
|
#include "cw_log.h"
|
|
|
|
|
|
|
|
|
|
|
|
int wtpinfo_readelem_wtp_name(struct wtpinfo * wtpinfo, int type, uint8_t * msgelem, int len)
|
|
|
|
{
|
2015-03-29 15:36:23 +02:00
|
|
|
if (type != CW_ELEM_WTP_NAME)
|
2014-07-11 22:12:11 +02:00
|
|
|
return 0;
|
|
|
|
|
|
|
|
if (len>512){
|
2015-03-31 08:04:03 +02:00
|
|
|
cw_dbg(DBG_MSG_ERR,"Truncating WTP_NAME msgelem to 512, wrong size, type=%d,len=%d",type,len);
|
2014-07-11 22:12:11 +02:00
|
|
|
len=512;
|
|
|
|
}
|
|
|
|
|
|
|
|
cw_setstr(&wtpinfo->name,msgelem,len);
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
|