Improved handling of message elements parsed. Reduces the memory occupied but

it introduces a small overhead in retrieving of message elements parsed.
This commit is contained in:
vemax78
2013-06-09 17:41:52 +02:00
parent d9e02ded5a
commit 794a8e72d2
88 changed files with 1323 additions and 1027 deletions

View File

@ -115,10 +115,12 @@ static struct capwap_packet_txmng* ac_create_discovery_response(struct capwap_pa
capwap_packet_txmng_add_message_element(txmngpacket, CAPWAP_ELEMENT_ACDESCRIPTION, &g_ac.descriptor);
capwap_packet_txmng_add_message_element(txmngpacket, CAPWAP_ELEMENT_ACNAME, &g_ac.acname);
if (binding == CAPWAP_WIRELESS_BINDING_IEEE80211) {
for (i = 0; i < packet->messageelements.ieee80211.wtpradioinformation->count; i++) {
struct capwap_array* wtpradioinformation = (struct capwap_array*)capwap_get_message_element_data(packet, CAPWAP_ELEMENT_80211_WTPRADIOINFORMATION);
for (i = 0; i < wtpradioinformation->count; i++) {
struct capwap_80211_wtpradioinformation_element* radio;
radio = *(struct capwap_80211_wtpradioinformation_element**)capwap_array_get_item_pointer(packet->messageelements.ieee80211.wtpradioinformation, i);
radio = *(struct capwap_80211_wtpradioinformation_element**)capwap_array_get_item_pointer(wtpradioinformation, i);
capwap_packet_txmng_add_message_element(txmngpacket, CAPWAP_ELEMENT_80211_WTPRADIOINFORMATION, radio);
}
}