summaryrefslogtreecommitdiff
path: root/cesar/cp/av/sta
diff options
context:
space:
mode:
authorNélio Laranjeiro2012-07-02 16:18:08 +0200
committerNélio Laranjeiro2012-07-23 16:20:41 +0200
commite1d08f1096c410d60a399c017b78b012ee48b35d (patch)
tree43d67a265769be0fd3195c29419eef2cb0312c87 /cesar/cp/av/sta
parentfafd97d92a5a7695e558bebde8adc1a91c8362e3 (diff)
cesar/cp/av/sta/mgr: move sta_mgr_set_tracking to common dir, refs #3222
Diffstat (limited to 'cesar/cp/av/sta')
-rw-r--r--cesar/cp/av/sta/mgr/src/sta_mgr.c21
-rw-r--r--cesar/cp/av/sta/mgr/sta_mgr.h35
-rw-r--r--cesar/cp/av/sta/mgr/test/utest/src/sta_mgr.c5
3 files changed, 2 insertions, 59 deletions
diff --git a/cesar/cp/av/sta/mgr/src/sta_mgr.c b/cesar/cp/av/sta/mgr/src/sta_mgr.c
index 543e97dfca..5b0009a072 100644
--- a/cesar/cp/av/sta/mgr/src/sta_mgr.c
+++ b/cesar/cp/av/sta/mgr/src/sta_mgr.c
@@ -157,27 +157,6 @@ cp_av_sta_mgr_sta_remove (cp_t *ctx, cp_sta_t * station)
}
void
-cp_av_sta_mgr_set_tracking (cp_t *ctx, cp_snid_t snid, cp_nid_t nid)
-{
- dbg_assert (ctx);
- dbg_assert (HPAV_NID_IS_VALID (nid));
-#if CONFIG_DEBUG
- bool found = false;
- cp_net_t *net;
- for (net = cp_sta_mgr_get_first_avln (ctx);
- net;
- net = cp_sta_mgr_get_next_avln (ctx, net))
- {
- if (cp_net_get_snid (ctx, net) == snid
- && cp_net_get_nid (ctx, net) == nid)
- found = true;
- }
- dbg_assert (found);
-#endif
- ctx->sta_mgr.sta_own_data.snid = snid;
-}
-
-void
cp_av_sta_mgr_garbage (cp_t *ctx)
{
cp_sta_t *sta;
diff --git a/cesar/cp/av/sta/mgr/sta_mgr.h b/cesar/cp/av/sta/mgr/sta_mgr.h
deleted file mode 100644
index bd52c8ce8d..0000000000
--- a/cesar/cp/av/sta/mgr/sta_mgr.h
+++ /dev/null
@@ -1,35 +0,0 @@
-#ifndef cp_av_sta_mgr_h
-#define cp_av_sta_mgr_h
-/* Cesar project {{{
- *
- * Copyright (C) 2008 Spidcom
- *
- * <<<Licence>>>
- *
- * }}} */
-/**
- * \file cp/av/sta/mgr/sta_mgr.h
- * \brief Station Manager.
- * \ingroup cp_av_sta_mgr
- *
- * Station and AVLN manager.
- */
-#include "cp/sta/mgr/net.h"
-
-BEGIN_DECLS
-
-/**
- * Set the SNID of the station to track the correct AVLN.
- * \param ctx the module context.
- * \param snid the station SNID.
- * \param nid the network identifier to track.
- *
- * Be careful, this function does not modify our AVLN snid to do some use
- * cp_sta_own_data_set_snid.
- */
-void
-cp_av_sta_mgr_set_tracking (cp_t *ctx, cp_snid_t snid, cp_nid_t nid);
-
-END_DECLS
-
-#endif /* cp_av_sta_mgr_h */
diff --git a/cesar/cp/av/sta/mgr/test/utest/src/sta_mgr.c b/cesar/cp/av/sta/mgr/test/utest/src/sta_mgr.c
index 0fa32a4da5..478e0ff9e5 100644
--- a/cesar/cp/av/sta/mgr/test/utest/src/sta_mgr.c
+++ b/cesar/cp/av/sta/mgr/test/utest/src/sta_mgr.c
@@ -15,7 +15,6 @@
#include "common/std.h"
#include "lib/test.h"
#include "test_sta_mgr.h"
-#include "cp/av/sta/mgr/sta_mgr.h"
void
cp_sta_mgr_elects_sta_partial_ack (cp_t *ctx);
@@ -1570,7 +1569,7 @@ test_case__set_tracking (test_t t)
{
/* No network is present and the debug mode is activated, this
* should assert. */
- cp_av_sta_mgr_set_tracking (&cp, 0x1, 0x1ll);
+ cp_sta_mgr_set_tracking (&cp, 0x1, 0x1ll);
}
dbg_fatal_try_catch (const char *fatal_message)
{
@@ -1581,7 +1580,7 @@ test_case__set_tracking (test_t t)
/* Add an AVLN. */
cp_net_t *net = cp_sta_mgr_add_avln (&cp, 0x10, 0x10ll);
/* Request to track this network. */
- cp_av_sta_mgr_set_tracking (
+ cp_sta_mgr_set_tracking (
&cp, cp_net_get_snid (&cp, net),
cp_net_get_nid (&cp, net));
test_fail_unless (