On Sun, Mar 15, 2009 at 07:27:30PM +0000, <Francesco Losciale>:
> If we try to restore 'return self.socket.fileno()' replacing 'return
> self.socket._fileno' (note that my patch doesn't do this), and try to start
> just two netkit vhosts, we can see that 'bad file description' is raised at
> this moment into stacklesssocket.__del__. At this point just UDP stuff is
> used, so i have decided to make a little mod in radar.py.
> I want to emphasize that i don't know if this mod is semantically correct
> (probably is not), but, if we replace into Radar.reply method this line (my
> patch doesn't do this)
>
>
> #rpc.BcastClient(devs=[_rpc_caller.dev]).radar.time_register(radar_id,
> self.netid)
> self.broadcast.radar.time_register(radar_id, self.netid)
We can use self.broadcast.radar.time_register(radar_id, self.netid). The
difference is just in the device used to send the broadcast message. With
self.broadcast all the available devices are used. This isn't optimal.
Btw, the problem isn't here.
> My impression is that should be something wrong with socket managing but
> not in rpc, microsock and in other deeper modules.
An experiment to do:
1) When the radar creates TCPClient, send a message through that
channel and create a simple echo module that replies to it.
~> def is_listlist_empty(L):
~> """L is a list of lists.
~> Returns true if L=[[],[], ...]"""
~> - return sum(filter(isnot_empty, L)) == 0
~> + for l in L:
~> + if len(filter(isnot_empty, l)) != 0:
~> + return False
~> + return True
ops, my mistake: just replace 'filter' with 'map' and it will work.
--
:wq!
"I don't know nothing" The One Who reached the Thinking Matter '.'
[ Alpt --- Freaknet Medialab ]
[ GPG Key ID 441CF0EE ]
[ Key fingerprint = 8B02 26E8 831A 7BB9 81A9 5277 BFF8 037E 441C F0EE ]
_______________________________________________
Netsukuku mailing list
[email protected]
http://lists.dyne.org/mailman/listinfo/netsukuku