2015-04-07 07:46:55 +02:00
|
|
|
|
|
|
|
#include "capwap.h"
|
2015-04-12 19:19:29 +02:00
|
|
|
#include "dbg.h"
|
2015-04-07 07:46:55 +02:00
|
|
|
|
2018-03-12 11:22:06 +01:00
|
|
|
int cw_check_missing_mand(struct cw_MsgData *msgdata, mavl_t keys )
|
2015-04-07 07:46:55 +02:00
|
|
|
{
|
2018-03-12 11:22:06 +01:00
|
|
|
mlistelem_t * elem;
|
|
|
|
char *mandkey, *result;
|
|
|
|
|
|
|
|
mlist_foreach(elem, msgdata->mand_keys){
|
|
|
|
mandkey = mlistelem_get_str(elem);
|
|
|
|
|
|
|
|
result = mavl_get_str(keys,mandkey);
|
|
|
|
if (result == NULL){
|
|
|
|
printf("Missing\n");
|
|
|
|
}
|
|
|
|
else printf("Ok\n");
|
|
|
|
|
|
|
|
|
|
|
|
}
|
2015-04-10 17:14:55 +02:00
|
|
|
|
2018-03-12 11:22:06 +01:00
|
|
|
/* cw_action_in_t as;
|
2015-04-07 07:46:55 +02:00
|
|
|
|
|
|
|
as.capwap_state = a->capwap_state;
|
|
|
|
as.msg_id = a->msg_id;
|
|
|
|
as.vendor_id = 0;
|
|
|
|
as.elem_id = 0;
|
|
|
|
as.proto=0;
|
2018-03-12 11:22:06 +01:00
|
|
|
*/
|
2018-02-26 18:28:12 +01:00
|
|
|
/// TODO XXXX
|
|
|
|
/*
|
2015-04-10 17:14:55 +02:00
|
|
|
DEFINE_AVLITER(it,conn->actions->in);
|
|
|
|
int n=0;
|
|
|
|
avliter_foreach_from(&it,&as) {
|
2015-04-12 19:19:29 +02:00
|
|
|
cw_action_in_t * ai = avliter_get(&it);
|
|
|
|
|
2016-03-09 19:22:07 +01:00
|
|
|
if (ai->msg_id != as.msg_id || ai->capwap_state != as.capwap_state)
|
2015-04-10 17:14:55 +02:00
|
|
|
break;
|
2015-04-12 19:19:29 +02:00
|
|
|
if (!ai->mand)
|
2015-04-10 17:14:55 +02:00
|
|
|
continue;
|
|
|
|
|
2016-02-26 18:52:29 +01:00
|
|
|
void * rc = mavl_get(conn->mand,(void*)ai->item_id);
|
2015-04-10 17:14:55 +02:00
|
|
|
if (!rc) {
|
2015-04-12 19:19:29 +02:00
|
|
|
out[n++]=ai;
|
2015-04-10 17:14:55 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|
2018-02-26 18:28:12 +01:00
|
|
|
return n;
|
|
|
|
*/
|
2015-04-07 07:46:55 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2018-03-12 11:22:06 +01:00
|
|
|
|