More work on CW VM code ..
FossilOrigin-Name: 3b0cb324535527b32d0e938b03151c75f6100ca2059fc121e2c4d350a8caf8a4
This commit is contained in:
@ -1,5 +1,6 @@
|
||||
|
||||
#include "capwap.h"
|
||||
#include "capwap_items.h"
|
||||
#include "intavltree.h"
|
||||
#include "cw_log.h"
|
||||
#include "dbg.h"
|
||||
@ -12,7 +13,7 @@ int cw_in_check_disc_resp(struct conn *conn, struct cw_action_in *a, uint8_t * d
|
||||
int n = cw_check_missing_mand(mlist, conn, a);
|
||||
cw_dbg_missing_mand(DBG_ELEM, conn, mlist, n, a);
|
||||
|
||||
cw_dbg(DBG_CW_INFO,"This response came from: %s\n",sock_addr2str(conn->addr));
|
||||
cw_dbg(DBG_CW_INFO,"This response came from: %s\n",sock_addr2str(&conn->addr));
|
||||
|
||||
|
||||
/* if mandatory elements are missing, ignore this response */
|
||||
@ -23,10 +24,20 @@ int cw_in_check_disc_resp(struct conn *conn, struct cw_action_in *a, uint8_t * d
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* we have all AC information in the incomming buffer */
|
||||
cw_itemstore_t discs;
|
||||
|
||||
|
||||
discs = cw_itemstore_get_avltree_c(conn->remote, CW_ITEM_DISCOVERIES,
|
||||
cw_itemstore_create);
|
||||
|
||||
if ( !discs ) {
|
||||
cw_log(LOG_ERR,"Can't allocate store for disc resp");
|
||||
return 0;
|
||||
}
|
||||
|
||||
cw_itemstore_set_avltree(discs,discs->count,conn->incomming);
|
||||
conn->incomming = cw_itemstore_create();
|
||||
|
||||
|
||||
/* ok, send response */
|
||||
return 0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user