summaryrefslogtreecommitdiff
path: root/cesar/bsu
diff options
context:
space:
mode:
authorlaranjeiro2010-06-07 15:58:28 +0000
committerlaranjeiro2010-06-07 15:58:28 +0000
commit4bc35cc73cbfaf21750318100c5bfd777f86d814 (patch)
tree9fdc51ec98dac773ddae8176ff04beb18a10d5ac /cesar/bsu
parentf0e796b75a49086411f878a49bf9624f7ef73bf5 (diff)
cesar/cp: fix discover procedure to turn around all stations, refs #1529
git-svn-id: svn+ssh://pessac/svn/cesar/trunk@7181 017c9cb6-072f-447c-8318-d5b54f68fe89
Diffstat (limited to 'cesar/bsu')
-rw-r--r--cesar/bsu/beacon/src/beacon.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/cesar/bsu/beacon/src/beacon.c b/cesar/bsu/beacon/src/beacon.c
index d29f63274a..5a9d5bb16a 100644
--- a/cesar/bsu/beacon/src/beacon.c
+++ b/cesar/bsu/beacon/src/beacon.c
@@ -206,12 +206,14 @@ bsu_beacon_write_bmi_persistent (bitstream_t *stream,
* Write the discover beacon entry.
* \param stream the bitstream context.
* \param discover the discover beacon entry to write.
+ * \param type the beacon type.
*/
static void
bsu_beacon_write_bmi_discover (bitstream_t *stream,
- bsu_beacon_bmi_discover_t *discover)
+ bsu_beacon_bmi_discover_t *discover,
+ bsu_beacon_type_t type)
{
- if (discover->present)
+ if (discover->present && type == BSU_BEACON_TYPE_CENTRAL)
{
bitstream_write (stream, BSU_BEACON_ENTRY_HEADER_DISCOVER, 8);
bitstream_write (stream, BSU_BEACON_ENTRY_SIZE_DISCOVER, 8);
@@ -500,7 +502,7 @@ bsu_beacon_write (bsu_beacon_t *beacon, bsu_beacon_type_t type,
bsu_beacon_write_bmi_region (&stream, &beacon->bmis.region);
bsu_beacon_write_bmi_mac_address (&stream, mac_config,
&beacon->bmis.mac_address_present);
- bsu_beacon_write_bmi_discover (&stream, &beacon->bmis.discover);
+ bsu_beacon_write_bmi_discover (&stream, &beacon->bmis.discover, type);
bsu_beacon_write_bmi_discover_info (&stream,
&beacon->bmis.discover_info);
offset = bsu_beacon_write_bmi_bpsto (&stream,