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
|
|
|
|
|
|
|
int cw_check_missing_mand(cw_action_in_t ** out, struct conn * conn, cw_action_in_t *a)
|
|
|
|
{
|
2015-04-10 17:14:55 +02:00
|
|
|
|
|
|
|
|
2015-04-07 07:46:55 +02:00
|
|
|
cw_action_in_t as;
|
|
|
|
|
|
|
|
as.capwap_state = a->capwap_state;
|
|
|
|
as.msg_id = a->msg_id;
|
|
|
|
as.vendor_id = 0;
|
|
|
|
as.elem_id = 0;
|
|
|
|
as.proto=0;
|
|
|
|
|
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
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
return n;
|
2015-04-07 07:46:55 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|