Thursday, May 5, 2011

Bugfix deleted routes win32

The bug was not really a new bug, it had to do with win32 exit.
A long sleep(1000) in main.c caused the delay between the given command ctrl+c and the closing of olsrd.exe. Also, a break in scheduler.c was not a solution for a quick exit, because it caused that the kernel routes not to be realeased after exit.
I tested the bugfix between 2 instances of olsrd.exe: one running the one with the bug, and one running the fixed one, and the routes were deleted on the fixed one, while they remained on the "bugged" one. I also tested what happens if the fixed one got a new neighbour after it received ctrl+c command, but didn't manage to close.
The route would be added again, even after the ctrl+c command in the kernel routes, but would still be deleted after the exit. Or, it didn't actually close anymore, and it started again.
A next test would be with more than 2 instances, with at least one running the bug one, and the other two running the fixed one, in order to find out what happens after the ctrl+c command is send and a new neighbor appears and the routing table has multiple routes.

No comments:

Post a Comment