summaryrefslogtreecommitdiff
path: root/cesar/cp/cco/action/test/src/garbage.c
diff options
context:
space:
mode:
authorlaranjeiro2008-09-30 09:20:49 +0000
committerlaranjeiro2008-09-30 09:20:49 +0000
commit09c26c8ec80d24e4aa5a578679b9b50e1f79b4de (patch)
treef855ff41fcb75359638f4476b86384daa6bd92d9 /cesar/cp/cco/action/test/src/garbage.c
parentc49b0f3f79b3a6c716f1beed42abd73adbd4ef5b (diff)
cp/cco/action: Update the module since the changes of the station manager.
* Replace the status values of the station in the function calls cp_net_get_first. * Removed the use of the mactotei table of the Convergence layer to use the station manager. * Fixed the unit tests. git-svn-id: svn+ssh://pessac/svn/cesar/trunk@3114 017c9cb6-072f-447c-8318-d5b54f68fe89
Diffstat (limited to 'cesar/cp/cco/action/test/src/garbage.c')
-rw-r--r--cesar/cp/cco/action/test/src/garbage.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/cesar/cp/cco/action/test/src/garbage.c b/cesar/cp/cco/action/test/src/garbage.c
index 48083e8fc3..d093b7bfab 100644
--- a/cesar/cp/cco/action/test/src/garbage.c
+++ b/cesar/cp/cco/action/test/src/garbage.c
@@ -67,6 +67,7 @@ my_thread_entry (cyg_addrword_t data)
test_case_begin (test, "Verify garbage result");
+ printf ("Initialising the test ...\n");
test_begin (test, "Verify")
{
mac_ntb_init ((phy_t*) &phy, &mac_config);
@@ -76,17 +77,20 @@ my_thread_entry (cyg_addrword_t data)
cp_cco_action_init (&cp);
cp_sta_mgr_init (&cp);
cp.cl = &cl;
+ cp.mac_store = mac_store_init ();
+ cp.mac_config = &mac_config;
memset (&cl, 0, sizeof(cl_t));
net = cp_sta_mgr_get_our_avln (&cp);
+ printf ("Starting the test, please wait...\n");
for (i = 0; i < TEST_CCO_ACTION_NB_STA; i++)
{
sta = cp_net_sta_add (&cp, net, 0, i + 1);
sta->tei_lease_ms = i;
slab_release (sta);
sta = cp_net_sta_add (&cp, net, i + 1, i + 1);
- cp_sta_set_state (sta, CP_STA_STATE_AUTHENTICATED);
+ cp_net_sta_set_authenticated (&cp, net, sta, CP_NET_STA_ASSOC);
sta->tei_lease_ms = i;
slab_release (sta);
}
@@ -101,15 +105,12 @@ my_thread_entry (cyg_addrword_t data)
test_fail_if (set_empty (&net->associated_stas) == false);
test_fail_if (set_empty (&net->unassociated_stas) == false);
-
- /* Release the mac to tei table. */
- if (cl.mactotei)
- cl_mactotei_release_table (&cl);
}
test_end;
cp_cco_action_uninit (&cp);
cp_sta_mgr_uninit (&cp);
+ mac_store_uninit (cp.mac_store);
test_case_begin (test, "Memory leaks");