Introducing mavl and mbag.

FossilOrigin-Name: 383bc0c7d65716c38a10aea87ab94c240e581cd2193f55fdfcbe644ef3dec0ff
This commit is contained in:
7u83@mail.ru
2015-04-19 21:27:44 +00:00
parent 341e098a6d
commit 381c910eec
46 changed files with 772 additions and 987 deletions

View File

@ -30,10 +30,10 @@ int cw_in_check_disc_resp(struct conn *conn, struct cw_action_in *a, uint8_t * d
}
/* we have all AC information in the incomming buffer */
cw_itemstore_t discs;
mbag_t discs;
discs = cw_itemstore_get_avltree_c(conn->remote, CW_ITEM_DISCOVERIES,
cw_itemstore_create);
discs = mbag_get_avltree_c(conn->remote, CW_ITEM_DISCOVERIES,
mbag_create);
if ( !discs ) {
cw_log(LOG_ERR,"Can't allocate store for disc resp");
@ -41,8 +41,8 @@ int cw_in_check_disc_resp(struct conn *conn, struct cw_action_in *a, uint8_t * d
return -1;
}
cw_itemstore_set_avltree(discs,discs->count,conn->incomming);
conn->incomming = cw_itemstore_create();
mbag_set_avltree(discs,discs->count,conn->incomming);
conn->incomming = mbag_create();
return 0;