Bug 2344

Summary: Attribute names can't have spaces
Product: ns-3 Reporter: 497003619
Component: coreAssignee: Tom Henderson <tomh>
Status: RESOLVED FIXED    
Severity: normal CC: 497003619, matis18, ns-bugs, pdbarnes, sebastien.deronne, tomh
Priority: P5 Keywords: bug
Version: pre-release   
Hardware: All   
OS: All   
URL: https://www.nsnam.org/docs/doxygen/classns3_1_1_aparf_wifi_manager.html#details
See Also: https://www.nsnam.org/bugzilla/show_bug.cgi?id=2149
Bug Depends on: 2149    
Bug Blocks:    
Attachments: patch to remove spaces
Remove spaces and adapt test
Patch to check for spaces in attribute names
Fix attribute names with spaces
Fix attribute names with spaces

Description 497003619 2016-03-22 05:55:00 UTC
The Attributes of AparfWifiManager, "SuccessThreshold 1" & "SuccessThreshold 2", contains space in the attributes name. So when users use ConfigStore to input a configure file which includes these two attributes will encounter an error caused by that totally unnecessary space.

The error is introduced in RawTextConfigLoad::Strip() the statements "NS_ASSERT (start == 0);".

So it is hard to define whether the error is caused by AparfWifiManager or ConfigStore. But I suggest to correct the Attributes and also set a restriction when defining the Attributes as well.
Comment 1 497003619 2016-03-22 06:00:59 UTC
As further discovered, the attributes set for AparfWifiManager are not in a good manner. A lot of them contains space. Please help to correct these error
Comment 2 Tom Henderson 2016-03-22 20:13:28 UTC
Created attachment 2350 [details]
patch to remove spaces
Comment 3 Tom Henderson 2016-03-22 20:19:15 UTC
It could be perhaps fixed in two steps, as suggested above:

1) remove spaces (patch attached)
2) add some support in the core module to disallow spaces in attribute names
Comment 4 sebastien.deronne 2016-03-23 04:33:38 UTC
I suggest you push this patch, it should indeed be forbidden to used spaces in attributes name.
Comment 5 Tom Henderson 2016-03-24 01:18:01 UTC
(In reply to sebastien.deronne from comment #4)
> I suggest you push this patch, it should indeed be forbidden to used spaces
> in attributes name.

I decided to hold it until post-release so that bug 2149 (deprecation of renamed attributes) could be done.

I marked bug 2149 as a dependency.
Comment 6 Matías Richart 2016-04-20 09:02:12 UTC
Created attachment 2394 [details]
Remove spaces and adapt test

I also modify the test case which uses these attributes.
Comment 7 Peter Barnes 2016-08-05 19:36:19 UTC
Created attachment 2513 [details]
Patch to check for spaces in attribute names
Comment 8 Peter Barnes 2016-08-09 15:39:29 UTC
Created attachment 2535 [details]
Fix attribute names with spaces

This fixes attribute names with spaces:

src/internet/model/ipv6-extension.cc
src/traffic-control/model/fq-codel-queue-disc.cc
src/wifi/model/ampdu-tag.cc
src/wifi/model/aparf-wifi-manager.cc
src/wifi/test/power-rate-adaptation-test.cc

This includes everything from patch 2394, and new attributes introduced since then
Comment 9 Peter Barnes 2016-08-09 15:49:43 UTC
Created attachment 2536 [details]
Fix attribute names with spaces

(Whoops, previous patch included patch 2513 which is the actual checker.)

Fix attribute names with spaces

This fixes attribute names with spaces:

src/internet/model/ipv6-extension.cc
src/traffic-control/model/fq-codel-queue-disc.cc
src/wifi/model/ampdu-tag.cc
src/wifi/model/aparf-wifi-manager.cc
src/wifi/test/power-rate-adaptation-test.cc

This includes everything from patch 2394, and new attributes introduced since then
Comment 10 Tom Henderson 2016-09-10 17:32:24 UTC
pushed in 12315:8c4420df0d19 and 12316:9677c1b23cc9