fix AC compilation
This commit is contained in:
parent
e8241b2d3f
commit
40071fb06d
@ -31,26 +31,29 @@ static struct ac_json_ieee80211_ops* ac_json_80211_message_elements[] = {
|
||||
};
|
||||
|
||||
/* */
|
||||
static struct ac_json_ieee80211_ops* ac_json_80211_getops_by_capwaptype(uint16_t type) {
|
||||
static struct ac_json_ieee80211_ops *
|
||||
ac_json_80211_getops_by_capwaptype(const struct capwap_message_element_id type)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < CAPWAP_80211_MESSAGE_ELEMENTS_COUNT; i++) {
|
||||
if (ac_json_80211_message_elements[i] && (ac_json_80211_message_elements[i]->type == type)) {
|
||||
if (ac_json_80211_message_elements[i] &&
|
||||
memcmp(&ac_json_80211_message_elements[i]->type, &type, sizeof(type)) == 0)
|
||||
return ac_json_80211_message_elements[i];
|
||||
}
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* */
|
||||
static struct ac_json_ieee80211_ops* ac_json_80211_getops_by_jsontype(char* type) {
|
||||
static struct ac_json_ieee80211_ops* ac_json_80211_getops_by_jsontype(char* type)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < CAPWAP_80211_MESSAGE_ELEMENTS_COUNT; i++) {
|
||||
if (ac_json_80211_message_elements[i] && !strcmp(ac_json_80211_message_elements[i]->json_type, type)) {
|
||||
if (ac_json_80211_message_elements[i] &&
|
||||
strcmp(ac_json_80211_message_elements[i]->json_type, type) == 0)
|
||||
return ac_json_80211_message_elements[i];
|
||||
}
|
||||
}
|
||||
|
||||
return NULL;
|
||||
@ -94,7 +97,7 @@ void ac_json_ieee80211_free(struct ac_json_ieee80211_wtpradio* wtpradio) {
|
||||
}
|
||||
|
||||
if (item->iearray) {
|
||||
struct capwap_message_elements_ops* ieops = capwap_get_message_element_ops(CAPWAP_ELEMENT_80211_IE);
|
||||
const struct capwap_message_elements_ops* ieops = capwap_get_message_element_ops(CAPWAP_ELEMENT_80211_IE);
|
||||
|
||||
for (j = 0; j < item->iearray->count; j++) {
|
||||
ieops->free(*(struct capwap_80211_ie_element**)capwap_array_get_item_pointer(item->iearray, j));
|
||||
@ -167,18 +170,20 @@ void ac_json_ieee80211_free(struct ac_json_ieee80211_wtpradio* wtpradio) {
|
||||
}
|
||||
|
||||
/* */
|
||||
int ac_json_ieee80211_addmessageelement(struct ac_json_ieee80211_wtpradio* wtpradio, uint16_t type, void* data, int overwrite) {
|
||||
int ac_json_ieee80211_addmessageelement(struct ac_json_ieee80211_wtpradio *wtpradio,
|
||||
const struct capwap_message_element_id id,
|
||||
void *data, int overwrite)
|
||||
{
|
||||
struct ac_json_ieee80211_ops* ops;
|
||||
|
||||
ASSERT(wtpradio != NULL);
|
||||
ASSERT(IS_80211_MESSAGE_ELEMENTS(type));
|
||||
ASSERT(IS_80211_MESSAGE_ELEMENTS(id));
|
||||
ASSERT(data != NULL);
|
||||
|
||||
/* */
|
||||
ops = ac_json_80211_getops_by_capwaptype(type);
|
||||
if (!ops) {
|
||||
ops = ac_json_80211_getops_by_capwaptype(id);
|
||||
if (!ops)
|
||||
return 0;
|
||||
}
|
||||
|
||||
return ops->add_message_element(wtpradio, data, overwrite);
|
||||
}
|
||||
@ -189,21 +194,27 @@ int ac_json_ieee80211_parsingmessageelement(struct ac_json_ieee80211_wtpradio* w
|
||||
|
||||
ASSERT(wtpradio != NULL);
|
||||
ASSERT(messageelement != NULL);
|
||||
ASSERT(IS_80211_MESSAGE_ELEMENTS(messageelement->type));
|
||||
ASSERT(IS_80211_MESSAGE_ELEMENTS(messageelement->id));
|
||||
|
||||
if (messageelement->category == CAPWAP_MESSAGE_ELEMENT_SINGLE) {
|
||||
if (!ac_json_ieee80211_addmessageelement(wtpradio, messageelement->type, messageelement->data, 0)) {
|
||||
switch (messageelement->category) {
|
||||
case CAPWAP_MESSAGE_ELEMENT_SINGLE:
|
||||
if (!ac_json_ieee80211_addmessageelement(wtpradio, messageelement->id,
|
||||
messageelement->data, 0))
|
||||
return 0;
|
||||
}
|
||||
} else if (messageelement->category == CAPWAP_MESSAGE_ELEMENT_ARRAY) {
|
||||
struct capwap_array* items = (struct capwap_array*)messageelement->data;
|
||||
break;
|
||||
|
||||
for (i = 0; i < items->count; i++) {
|
||||
if (!ac_json_ieee80211_addmessageelement(wtpradio, messageelement->type, *(void**)capwap_array_get_item_pointer(items, i), 0)) {
|
||||
case CAPWAP_MESSAGE_ELEMENT_ARRAY: {
|
||||
struct capwap_array* items =
|
||||
(struct capwap_array*)messageelement->data;
|
||||
|
||||
for (i = 0; i < items->count; i++)
|
||||
if (!ac_json_ieee80211_addmessageelement(wtpradio, messageelement->id,
|
||||
*(void**)capwap_array_get_item_pointer(items, i), 0))
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -10,7 +10,7 @@ static void* ac_json_80211_addwlan_createmessageelement(struct json_object* json
|
||||
static int ac_json_80211_addwlan_addmessageelement(struct ac_json_ieee80211_wtpradio* wtpradio, void* data, int overwrite) {
|
||||
struct capwap_80211_addwlan_element* addwlan = (struct capwap_80211_addwlan_element*)data;
|
||||
struct ac_json_ieee80211_item* item = &wtpradio->items[addwlan->radioid - 1];
|
||||
struct capwap_message_elements_ops* ops = capwap_get_message_element_ops(CAPWAP_ELEMENT_80211_ADD_WLAN);
|
||||
const struct capwap_message_elements_ops* ops = capwap_get_message_element_ops(CAPWAP_ELEMENT_80211_ADD_WLAN);
|
||||
|
||||
if (item->addwlan) {
|
||||
if (!overwrite) {
|
||||
|
@ -64,7 +64,7 @@ static void* ac_json_80211_antenna_createmessageelement(struct json_object* json
|
||||
static int ac_json_80211_antenna_addmessageelement(struct ac_json_ieee80211_wtpradio* wtpradio, void* data, int overwrite) {
|
||||
struct capwap_80211_antenna_element* antenna = (struct capwap_80211_antenna_element*)data;
|
||||
struct ac_json_ieee80211_item* item = &wtpradio->items[antenna->radioid - 1];
|
||||
struct capwap_message_elements_ops* ops = capwap_get_message_element_ops(CAPWAP_ELEMENT_80211_ANTENNA);
|
||||
const struct capwap_message_elements_ops* ops = capwap_get_message_element_ops(CAPWAP_ELEMENT_80211_ANTENNA);
|
||||
|
||||
if (item->antenna) {
|
||||
if (!overwrite) {
|
||||
|
@ -10,7 +10,7 @@ static void* ac_json_80211_assignbssid_createmessageelement(struct json_object*
|
||||
static int ac_json_80211_assignbssid_addmessageelement(struct ac_json_ieee80211_wtpradio* wtpradio, void* data, int overwrite) {
|
||||
struct capwap_80211_assignbssid_element* assignbssid = (struct capwap_80211_assignbssid_element*)data;
|
||||
struct ac_json_ieee80211_item* item = &wtpradio->items[assignbssid->radioid - 1];
|
||||
struct capwap_message_elements_ops* ops = capwap_get_message_element_ops(CAPWAP_ELEMENT_80211_ASSIGN_BSSID);
|
||||
const struct capwap_message_elements_ops *ops = capwap_get_message_element_ops(CAPWAP_ELEMENT_80211_ASSIGN_BSSID);
|
||||
|
||||
if (item->assignbssid) {
|
||||
if (!overwrite) {
|
||||
|
@ -10,7 +10,7 @@ static void* ac_json_80211_deletewlan_createmessageelement(struct json_object* j
|
||||
static int ac_json_80211_deletewlan_addmessageelement(struct ac_json_ieee80211_wtpradio* wtpradio, void* data, int overwrite) {
|
||||
struct capwap_80211_deletewlan_element* deletewlan = (struct capwap_80211_deletewlan_element*)data;
|
||||
struct ac_json_ieee80211_item* item = &wtpradio->items[deletewlan->radioid - 1];
|
||||
struct capwap_message_elements_ops* ops = capwap_get_message_element_ops(CAPWAP_ELEMENT_80211_DELETE_WLAN);
|
||||
const struct capwap_message_elements_ops *ops = capwap_get_message_element_ops(CAPWAP_ELEMENT_80211_DELETE_WLAN);
|
||||
|
||||
if (item->deletewlan) {
|
||||
if (!overwrite) {
|
||||
|
@ -50,7 +50,7 @@ static void* ac_json_80211_directsequencecontrol_createmessageelement(struct jso
|
||||
static int ac_json_80211_directsequencecontrol_addmessageelement(struct ac_json_ieee80211_wtpradio* wtpradio, void* data, int overwrite) {
|
||||
struct capwap_80211_directsequencecontrol_element* directsequencecontrol = (struct capwap_80211_directsequencecontrol_element*)data;
|
||||
struct ac_json_ieee80211_item* item = &wtpradio->items[directsequencecontrol->radioid - 1];
|
||||
struct capwap_message_elements_ops* ops = capwap_get_message_element_ops(CAPWAP_ELEMENT_80211_DIRECTSEQUENCECONTROL);
|
||||
const struct capwap_message_elements_ops *ops = capwap_get_message_element_ops(CAPWAP_ELEMENT_80211_DIRECTSEQUENCECONTROL);
|
||||
|
||||
if (item->directsequencecontrol) {
|
||||
if (!overwrite) {
|
||||
|
@ -11,7 +11,7 @@ static int ac_json_80211_ie_addmessageelement(struct ac_json_ieee80211_wtpradio*
|
||||
struct capwap_80211_ie_element** ieclone;
|
||||
struct capwap_80211_ie_element* ie = (struct capwap_80211_ie_element*)data;
|
||||
struct ac_json_ieee80211_item* item = &wtpradio->items[ie->radioid - 1];
|
||||
struct capwap_message_elements_ops* ops = capwap_get_message_element_ops(CAPWAP_ELEMENT_80211_IE);
|
||||
const struct capwap_message_elements_ops *ops = capwap_get_message_element_ops(CAPWAP_ELEMENT_80211_IE);
|
||||
|
||||
if (!item->iearray) {
|
||||
item->iearray = capwap_array_create(sizeof(struct capwap_80211_ie_element*), 0, 0);
|
||||
|
@ -77,7 +77,7 @@ static void* ac_json_80211_macoperation_createmessageelement(struct json_object*
|
||||
static int ac_json_80211_macoperation_addmessageelement(struct ac_json_ieee80211_wtpradio* wtpradio, void* data, int overwrite) {
|
||||
struct capwap_80211_macoperation_element* macoperation = (struct capwap_80211_macoperation_element*)data;
|
||||
struct ac_json_ieee80211_item* item = &wtpradio->items[macoperation->radioid - 1];
|
||||
struct capwap_message_elements_ops* ops = capwap_get_message_element_ops(CAPWAP_ELEMENT_80211_MACOPERATION);
|
||||
const struct capwap_message_elements_ops *ops = capwap_get_message_element_ops(CAPWAP_ELEMENT_80211_MACOPERATION);
|
||||
|
||||
if (item->macoperation) {
|
||||
if (!overwrite) {
|
||||
|
@ -10,7 +10,7 @@ static void* ac_json_80211_miccountermeasures_createmessageelement(struct json_o
|
||||
static int ac_json_80211_miccountermeasures_addmessageelement(struct ac_json_ieee80211_wtpradio* wtpradio, void* data, int overwrite) {
|
||||
struct capwap_80211_miccountermeasures_element* miccountermeasures = (struct capwap_80211_miccountermeasures_element*)data;
|
||||
struct ac_json_ieee80211_item* item = &wtpradio->items[miccountermeasures->radioid - 1];
|
||||
struct capwap_message_elements_ops* ops = capwap_get_message_element_ops(CAPWAP_ELEMENT_80211_MIC_COUNTERMEASURES);
|
||||
const struct capwap_message_elements_ops *ops = capwap_get_message_element_ops(CAPWAP_ELEMENT_80211_MIC_COUNTERMEASURES);
|
||||
|
||||
if (item->miccountermeasures) {
|
||||
if (!overwrite) {
|
||||
|
@ -50,7 +50,7 @@ static void* ac_json_80211_multidomaincapability_createmessageelement(struct jso
|
||||
static int ac_json_80211_multidomaincapability_addmessageelement(struct ac_json_ieee80211_wtpradio* wtpradio, void* data, int overwrite) {
|
||||
struct capwap_80211_multidomaincapability_element* multidomaincapability = (struct capwap_80211_multidomaincapability_element*)data;
|
||||
struct ac_json_ieee80211_item* item = &wtpradio->items[multidomaincapability->radioid - 1];
|
||||
struct capwap_message_elements_ops* ops = capwap_get_message_element_ops(CAPWAP_ELEMENT_80211_MULTIDOMAINCAPABILITY);
|
||||
const struct capwap_message_elements_ops *ops = capwap_get_message_element_ops(CAPWAP_ELEMENT_80211_MULTIDOMAINCAPABILITY);
|
||||
|
||||
if (item->multidomaincapability) {
|
||||
if (!overwrite) {
|
||||
|
@ -50,7 +50,7 @@ static void* ac_json_80211_ofdmcontrol_createmessageelement(struct json_object*
|
||||
static int ac_json_80211_ofdmcontrol_addmessageelement(struct ac_json_ieee80211_wtpradio* wtpradio, void* data, int overwrite) {
|
||||
struct capwap_80211_ofdmcontrol_element* ofdmcontrol = (struct capwap_80211_ofdmcontrol_element*)data;
|
||||
struct ac_json_ieee80211_item* item = &wtpradio->items[ofdmcontrol->radioid - 1];
|
||||
struct capwap_message_elements_ops* ops = capwap_get_message_element_ops(CAPWAP_ELEMENT_80211_OFDMCONTROL);
|
||||
const struct capwap_message_elements_ops *ops = capwap_get_message_element_ops(CAPWAP_ELEMENT_80211_OFDMCONTROL);
|
||||
|
||||
if (item->ofdmcontrol) {
|
||||
if (!overwrite) {
|
||||
|
@ -41,7 +41,7 @@ static void* ac_json_80211_rateset_createmessageelement(struct json_object* json
|
||||
static int ac_json_80211_rateset_addmessageelement(struct ac_json_ieee80211_wtpradio* wtpradio, void* data, int overwrite) {
|
||||
struct capwap_80211_rateset_element* rateset = (struct capwap_80211_rateset_element*)data;
|
||||
struct ac_json_ieee80211_item* item = &wtpradio->items[rateset->radioid - 1];
|
||||
struct capwap_message_elements_ops* ops = capwap_get_message_element_ops(CAPWAP_ELEMENT_80211_RATESET);
|
||||
const struct capwap_message_elements_ops *ops = capwap_get_message_element_ops(CAPWAP_ELEMENT_80211_RATESET);
|
||||
|
||||
if (item->rateset) {
|
||||
if (!overwrite) {
|
||||
|
@ -10,7 +10,7 @@ static void* ac_json_80211_rsnaerrorreport_createmessageelement(struct json_obje
|
||||
static int ac_json_80211_rsnaerrorreport_addmessageelement(struct ac_json_ieee80211_wtpradio* wtpradio, void* data, int overwrite) {
|
||||
struct capwap_80211_rsnaerrorreport_element* rsnaerrorreport = (struct capwap_80211_rsnaerrorreport_element*)data;
|
||||
struct ac_json_ieee80211_item* item = &wtpradio->items[rsnaerrorreport->radioid - 1];
|
||||
struct capwap_message_elements_ops* ops = capwap_get_message_element_ops(CAPWAP_ELEMENT_80211_RSNA_ERROR_REPORT);
|
||||
const struct capwap_message_elements_ops *ops = capwap_get_message_element_ops(CAPWAP_ELEMENT_80211_RSNA_ERROR_REPORT);
|
||||
|
||||
if (item->rsnaerrorreport) {
|
||||
if (!overwrite) {
|
||||
|
@ -10,7 +10,7 @@ static void* ac_json_80211_statistics_createmessageelement(struct json_object* j
|
||||
static int ac_json_80211_statistics_addmessageelement(struct ac_json_ieee80211_wtpradio* wtpradio, void* data, int overwrite) {
|
||||
struct capwap_80211_statistics_element* statistics = (struct capwap_80211_statistics_element*)data;
|
||||
struct ac_json_ieee80211_item* item = &wtpradio->items[statistics->radioid - 1];
|
||||
struct capwap_message_elements_ops* ops = capwap_get_message_element_ops(CAPWAP_ELEMENT_80211_STATISTICS);
|
||||
const struct capwap_message_elements_ops *ops = capwap_get_message_element_ops(CAPWAP_ELEMENT_80211_STATISTICS);
|
||||
|
||||
if (item->statistics) {
|
||||
if (!overwrite) {
|
||||
|
@ -41,7 +41,7 @@ static void* ac_json_80211_supportedrates_createmessageelement(struct json_objec
|
||||
static int ac_json_80211_supportedrates_addmessageelement(struct ac_json_ieee80211_wtpradio* wtpradio, void* data, int overwrite) {
|
||||
struct capwap_80211_supportedrates_element* supportedrates = (struct capwap_80211_supportedrates_element*)data;
|
||||
struct ac_json_ieee80211_item* item = &wtpradio->items[supportedrates->radioid - 1];
|
||||
struct capwap_message_elements_ops* ops = capwap_get_message_element_ops(CAPWAP_ELEMENT_80211_SUPPORTEDRATES);
|
||||
const struct capwap_message_elements_ops *ops = capwap_get_message_element_ops(CAPWAP_ELEMENT_80211_SUPPORTEDRATES);
|
||||
|
||||
if (item->supportedrates) {
|
||||
if (!overwrite) {
|
||||
|
@ -32,7 +32,7 @@ static void* ac_json_80211_txpower_createmessageelement(struct json_object* json
|
||||
static int ac_json_80211_txpower_addmessageelement(struct ac_json_ieee80211_wtpradio* wtpradio, void* data, int overwrite) {
|
||||
struct capwap_80211_txpower_element* txpower = (struct capwap_80211_txpower_element*)data;
|
||||
struct ac_json_ieee80211_item* item = &wtpradio->items[txpower->radioid - 1];
|
||||
struct capwap_message_elements_ops* ops = capwap_get_message_element_ops(CAPWAP_ELEMENT_80211_TXPOWER);
|
||||
const struct capwap_message_elements_ops *ops = capwap_get_message_element_ops(CAPWAP_ELEMENT_80211_TXPOWER);
|
||||
|
||||
if (item->txpower) {
|
||||
if (!overwrite) {
|
||||
|
@ -41,7 +41,7 @@ static void* ac_json_80211_txpowerlevel_createmessageelement(struct json_object*
|
||||
static int ac_json_80211_txpowerlevel_addmessageelement(struct ac_json_ieee80211_wtpradio* wtpradio, void* data, int overwrite) {
|
||||
struct capwap_80211_txpowerlevel_element* txpowerlevel = (struct capwap_80211_txpowerlevel_element*)data;
|
||||
struct ac_json_ieee80211_item* item = &wtpradio->items[txpowerlevel->radioid - 1];
|
||||
struct capwap_message_elements_ops* ops = capwap_get_message_element_ops(CAPWAP_ELEMENT_80211_TXPOWERLEVEL);
|
||||
const struct capwap_message_elements_ops *ops = capwap_get_message_element_ops(CAPWAP_ELEMENT_80211_TXPOWERLEVEL);
|
||||
|
||||
if (item->txpowerlevel) {
|
||||
if (!overwrite) {
|
||||
|
@ -10,7 +10,7 @@ static void* ac_json_80211_updatewlan_createmessageelement(struct json_object* j
|
||||
static int ac_json_80211_updatewlan_addmessageelement(struct ac_json_ieee80211_wtpradio* wtpradio, void* data, int overwrite) {
|
||||
struct capwap_80211_updatewlan_element* updatewlan = (struct capwap_80211_updatewlan_element*)data;
|
||||
struct ac_json_ieee80211_item* item = &wtpradio->items[updatewlan->radioid - 1];
|
||||
struct capwap_message_elements_ops* ops = capwap_get_message_element_ops(CAPWAP_ELEMENT_80211_UPDATE_WLAN);
|
||||
const struct capwap_message_elements_ops *ops = capwap_get_message_element_ops(CAPWAP_ELEMENT_80211_UPDATE_WLAN);
|
||||
|
||||
if (item->updatewlan) {
|
||||
if (!overwrite) {
|
||||
|
@ -48,7 +48,7 @@ static void* ac_json_80211_wtpqos_createmessageelement(struct json_object* jsonp
|
||||
static int ac_json_80211_wtpqos_addmessageelement(struct ac_json_ieee80211_wtpradio* wtpradio, void* data, int overwrite) {
|
||||
struct capwap_80211_wtpqos_element* wtpqos = (struct capwap_80211_wtpqos_element*)data;
|
||||
struct ac_json_ieee80211_item* item = &wtpradio->items[wtpqos->radioid - 1];
|
||||
struct capwap_message_elements_ops* ops = capwap_get_message_element_ops(CAPWAP_ELEMENT_80211_WTP_QOS);
|
||||
const struct capwap_message_elements_ops *ops = capwap_get_message_element_ops(CAPWAP_ELEMENT_80211_WTP_QOS);
|
||||
|
||||
if (item->wtpqos) {
|
||||
if (!overwrite) {
|
||||
|
@ -86,7 +86,7 @@ static void* ac_json_80211_wtpradioconf_createmessageelement(struct json_object*
|
||||
static int ac_json_80211_wtpradioconf_addmessageelement(struct ac_json_ieee80211_wtpradio* wtpradio, void* data, int overwrite) {
|
||||
struct capwap_80211_wtpradioconf_element* wtpradioconf = (struct capwap_80211_wtpradioconf_element*)data;
|
||||
struct ac_json_ieee80211_item* item = &wtpradio->items[wtpradioconf->radioid - 1];
|
||||
struct capwap_message_elements_ops* ops = capwap_get_message_element_ops(CAPWAP_ELEMENT_80211_WTP_RADIO_CONF);
|
||||
const struct capwap_message_elements_ops *ops = capwap_get_message_element_ops(CAPWAP_ELEMENT_80211_WTP_RADIO_CONF);
|
||||
|
||||
if (item->wtpradioconf) {
|
||||
if (!overwrite) {
|
||||
|
@ -42,7 +42,7 @@ static void* ac_json_80211_wtpradiofailalarm_createmessageelement(struct json_ob
|
||||
static int ac_json_80211_wtpradiofailalarm_addmessageelement(struct ac_json_ieee80211_wtpradio* wtpradio, void* data, int overwrite) {
|
||||
struct capwap_80211_wtpradiofailalarm_element* wtpradiofailalarm = (struct capwap_80211_wtpradiofailalarm_element*)data;
|
||||
struct ac_json_ieee80211_item* item = &wtpradio->items[wtpradiofailalarm->radioid - 1];
|
||||
struct capwap_message_elements_ops* ops = capwap_get_message_element_ops(CAPWAP_ELEMENT_80211_WTP_RADIO_FAIL_ALARM);
|
||||
const struct capwap_message_elements_ops *ops = capwap_get_message_element_ops(CAPWAP_ELEMENT_80211_WTP_RADIO_FAIL_ALARM);
|
||||
|
||||
if (item->wtpradiofailalarm) {
|
||||
if (!overwrite) {
|
||||
|
@ -32,7 +32,7 @@ static void* ac_json_80211_wtpradioinformation_createmessageelement(struct json_
|
||||
static int ac_json_80211_wtpradioinformation_addmessageelement(struct ac_json_ieee80211_wtpradio* wtpradio, void* data, int overwrite) {
|
||||
struct capwap_80211_wtpradioinformation_element* wtpradioinformation = (struct capwap_80211_wtpradioinformation_element*)data;
|
||||
struct ac_json_ieee80211_item* item = &wtpradio->items[wtpradioinformation->radioid - 1];
|
||||
struct capwap_message_elements_ops* ops = capwap_get_message_element_ops(CAPWAP_ELEMENT_80211_WTPRADIOINFORMATION);
|
||||
const struct capwap_message_elements_ops *ops = capwap_get_message_element_ops(CAPWAP_ELEMENT_80211_WTPRADIOINFORMATION);
|
||||
|
||||
if (item->wtpradioinformation) {
|
||||
if (!overwrite) {
|
||||
|
@ -222,7 +222,7 @@ static struct ac_soap_response* ac_dfa_state_configure_parsing_request(struct ac
|
||||
struct capwap_message_element_itemlist* messageelement = (struct capwap_message_element_itemlist*)search->item;
|
||||
|
||||
/* Parsing only IEEE 802.11 message element */
|
||||
if (IS_80211_MESSAGE_ELEMENTS(messageelement->type)) {
|
||||
if (IS_80211_MESSAGE_ELEMENTS(messageelement->id)) {
|
||||
if (!ac_json_ieee80211_parsingmessageelement(&wtpradio, messageelement)) {
|
||||
json_object_put(jsonparam);
|
||||
return NULL;
|
||||
|
@ -91,7 +91,7 @@ static struct ac_soap_response* ac_dfa_state_datacheck_parsing_request(struct ac
|
||||
struct capwap_message_element_itemlist* messageelement = (struct capwap_message_element_itemlist*)search->item;
|
||||
|
||||
/* Parsing only IEEE 802.11 message element */
|
||||
if (IS_80211_MESSAGE_ELEMENTS(messageelement->type)) {
|
||||
if (IS_80211_MESSAGE_ELEMENTS(messageelement->id)) {
|
||||
if (!ac_json_ieee80211_parsingmessageelement(&wtpradio, messageelement)) {
|
||||
json_object_put(jsonparam);
|
||||
return NULL;
|
||||
|
@ -240,7 +240,7 @@ static struct ac_soap_response* ac_dfa_state_join_parsing_request(struct ac_sess
|
||||
struct capwap_message_element_itemlist* messageelement = (struct capwap_message_element_itemlist*)search->item;
|
||||
|
||||
/* Parsing only IEEE 802.11 message element */
|
||||
if (IS_80211_MESSAGE_ELEMENTS(messageelement->type)) {
|
||||
if (IS_80211_MESSAGE_ELEMENTS(messageelement->id)) {
|
||||
if (!ac_json_ieee80211_parsingmessageelement(&wtpradio, messageelement)) {
|
||||
json_object_put(jsonparam);
|
||||
return NULL;
|
||||
|
@ -61,7 +61,7 @@ struct ac_json_ieee80211_wtpradio {
|
||||
/* */
|
||||
struct ac_json_ieee80211_ops {
|
||||
/* Message Element Type */
|
||||
uint16_t type;
|
||||
struct capwap_message_element_id type;
|
||||
|
||||
/* Message Element JSON Type */
|
||||
char* json_type;
|
||||
@ -79,7 +79,9 @@ void ac_json_ieee80211_init(struct ac_json_ieee80211_wtpradio* wtpradio);
|
||||
void ac_json_ieee80211_free(struct ac_json_ieee80211_wtpradio* wtpradio);
|
||||
|
||||
/* */
|
||||
int ac_json_ieee80211_addmessageelement(struct ac_json_ieee80211_wtpradio* wtpradio, uint16_t type, void* data, int overwrite);
|
||||
int ac_json_ieee80211_addmessageelement(struct ac_json_ieee80211_wtpradio *wtpradio,
|
||||
const struct capwap_message_element_id id,
|
||||
void *data, int overwrite);
|
||||
int ac_json_ieee80211_parsingmessageelement(struct ac_json_ieee80211_wtpradio* wtpradio, struct capwap_message_element_itemlist* messageelement);
|
||||
int ac_json_ieee80211_parsingjson(struct ac_json_ieee80211_wtpradio* wtpradio, struct json_object* jsonroot);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user