I changed the faulting code this way (again just guessing, probably in
a wrong way)
self.events.send('NEIGH_NEW',
(Neigh(bestdev=ip_table[key].bestdev,
devs=ip_table[key].devs,
idn=self.ntk_client[key],
ip=key,
netid=self.netid_table[key],
ntkd=self.ip_to_id(key))))
Now it goes into the function Event.send but it crashes inside.
I post the result of debugging. Then I'll go and study how Event class
works. I see that it seems well documented.
(Pdb) w
/root/netsukuku/trunk/pyntk/ntk/core/radar.py(371)run()
-> self.radar()
/root/netsukuku/trunk/pyntk/ntk/core/radar.py(390)radar()
-> self.neigh.store(self.get_all_avg_rtt())
> /root/netsukuku/trunk/pyntk/ntk/core/radar.py(239)store()
-> self.events.send('NEIGH_NEW',
(Pdb) l
234 # create a TCP connection to the neighbour
235 self.ntk_client[key] = rpc.TCPClient(ip_to_str(key))
236
237 # send a message notifying we added a node
238 pdb.set_trace()
239 -> self.events.send('NEIGH_NEW',
240 (Neigh(bestdev=ip_table[key].bestdev,
241 devs=ip_table[key].devs,
242 idn=self.ntk_client[key],
243 ip=key,
244 netid=self.netid_table[key],
(Pdb) s
> /root/netsukuku/trunk/pyntk/ntk/core/radar.py(240)store()
-> (Neigh(bestdev=ip_table[key].bestdev,
(Pdb) s
> /root/netsukuku/trunk/pyntk/ntk/core/radar.py(241)store()
-> devs=ip_table[key].devs,
(Pdb) s
> /root/netsukuku/trunk/pyntk/ntk/core/radar.py(242)store()
-> idn=self.ntk_client[key],
(Pdb) s
> /root/netsukuku/trunk/pyntk/ntk/core/radar.py(243)store()
-> ip=key,
(Pdb) s
> /root/netsukuku/trunk/pyntk/ntk/core/radar.py(244)store()
-> netid=self.netid_table[key],
(Pdb) s
> /root/netsukuku/trunk/pyntk/ntk/core/radar.py(245)store()
-> ntkd=self.ip_to_id(key))))
(Pdb) s
--Call--
> /root/netsukuku/trunk/pyntk/ntk/core/radar.py(121)ip_to_id()
-> def ip_to_id(self, ipn):
(Pdb) r
--Return--
> /root/netsukuku/trunk/pyntk/ntk/core/radar.py(134)ip_to_id()->False
-> return False
(Pdb) n
--Call--
> /root/netsukuku/trunk/pyntk/ntk/core/radar.py(56)__init__()
-> def __init__(self, bestdev, devs, idn=None, ip=None, netid=None, ntkd=None):
(Pdb) r
--Return--
> /root/netsukuku/trunk/pyntk/ntk/core/radar.py(76)__init__()->None
-> self.netid = netid
(Pdb) n
--Call--
> /root/netsukuku/trunk/pyntk/ntk/lib/event.py(73)send()
-> def send(self, event, msg):
(Pdb) n
> /root/netsukuku/trunk/pyntk/ntk/lib/event.py(74)send()
-> if event not in self.events:
(Pdb) n
> /root/netsukuku/trunk/pyntk/ntk/lib/event.py(77)send()
-> if event in self.listeners:
(Pdb) n
> /root/netsukuku/trunk/pyntk/ntk/lib/event.py(78)send()
-> for dst in self.listeners[event]:
(Pdb) n
> /root/netsukuku/trunk/pyntk/ntk/lib/event.py(79)send()
-> self._send(dst, msg)
(Pdb) s
--Call--
> /root/netsukuku/trunk/pyntk/ntk/lib/event.py(81)_send()
-> def _send(self, dst, msg):
(Pdb) n
> /root/netsukuku/trunk/pyntk/ntk/lib/event.py(83)_send()
-> dst(*msg)
(Pdb) dst
<bound method Etp.etp_new_changed of <ntk.core.qspn.Etp instance at 0x403b6e8c>>
(Pdb) msg
<ntk.core.radar.Neigh object at 0x403d3f44>
(Pdb) n
TypeError: 'etp_new_changed() argument after * must be a sequence'
> /root/netsukuku/trunk/pyntk/ntk/lib/event.py(83)_send()
-> dst(*msg)
(Pdb)
_______________________________________________
Netsukuku mailing list
[email protected]
http://lists.dyne.org/mailman/listinfo/netsukuku