trema / trema-edge

Transient repository for Trema OF1.3 branch
27 stars 14 forks source link

Unpacking multipart port desc fails due to variable name hiding iterator #42

Closed rakshasa closed 11 years ago

rakshasa commented 11 years ago

Renamed the new Trema::Port variable to ensure the right pointer gets iterated.

coveralls commented 11 years ago

Coverage Status

Coverage remained the same when pulling f813c241c7766dbd0ce987ccdf9f7f05e433d449 on axsh:fix-unpack-desc-multipart into 0077a744f49413e8b636f4fca0ca3877f86576dd on trema:master.

nickkaranatsios commented 11 years ago

Thanks rakshasa. Fixed in https://github.com/trema/trema-edge/commit/4cc446ed45c72c73f3e15db8b089dc36309d419e. A working example:

#<Trema::Messages::MultipartReply:0xa58eaa8 @datapath_id=2748, @transaction_id=330629128, @type=13, @flags=0, @parts=[#<Trema::Messages::PortDescMultipartReply:0xa58faac @ports=[#<Trema::Messages::Port:0xa57c31c @port_no=2, @hw_addr=#<Trema::Mac:0xa57c574 @value=222680352443718, @string="ca:86:cf:4e:4d:46">, @name="trema2-0", @config=0, @state=0, @curr=2112, @advertised=0, @supported=0, @peer=2112, @curr_speed=0, @max_speed=0>, #<Trema::Messages::Port:0xa585da4 @port_no=1, @hw_addr=#<Trema::Mac:0xa585ffc @value=213980623278340, @string="c2:9d:3f:0a:11:04">, @name="trema1-0", @config=0, @state=0, @curr=2112, @advertised=0, @supported=0, @peer=2112, @curr_speed=0, @max_speed=0>]>]>