eiginn / coreemu

Automatically exported from code.google.com/p/coreemu
BSD 2-Clause "Simplified" License
0 stars 1 forks source link

RJ45 node positions do not update #131

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create a scenario with one standard Router, one wireless LAN, and one RJ45 
node.
2. Connect both the router and the RJ45 node to the wireless LAN.
3. Start the emulation.

What is the expected output? What do you see instead?
When the Router is moved far away from the RJ45 node, the link is broken 
appropriately.  If instead the RJ45 node is moved, the link is never broken 
(the icon moves, but its position in the daemon is never sent to the mobility 
model in the daemon).

What version of the product are you using? On what operating system?
The latest nightly build as of April 5, 2012.

Please provide any additional information below.
Attached is a patch to correct this issue.

The RJ45 node inherits from both PyCoreNode and PyCoreNetIf, both of which 
provide a "setposition" method.  Since PyCoreNode is inherited first, its 
setposition is used, instead of the one from PyCoreNetIf.  So, I added an 
override RJ45Node.setposition with an explicit call to PyCoreNetIf.setposition 
to properly call the poshook function.  Also, it explicitly calls 
PyCoreObj.setposition in order to properly record its position when the node is 
created.

Original issue reported on code.google.com by tom5760@gmail.com on 5 Apr 2012 at 5:23

Attachments:

GoogleCodeExporter commented 9 years ago
It seems like the GUI is also not sending the RJ45 position updates when you 
move it on the canvas...

Original comment by ahrenh...@gmail.com on 6 Apr 2012 at 5:22

GoogleCodeExporter commented 9 years ago
Are you sure?  I'm using the nightly build, and with the patch, it works fine.  
I can drag around RJ45 nodes and they are disconnected/reconnected to the wifi 
network.

Original comment by tom5760@gmail.com on 6 Apr 2012 at 5:29

GoogleCodeExporter commented 9 years ago
You're right -- I was right-clicking my WLAN, link to all routers, pressing 
start -- but my RJ45 wasn't linked, oops!

patch applied to r394

Original comment by ahrenh...@gmail.com on 6 Apr 2012 at 5:43