[openbeosnetteam] Re: panic when creating socket of unknown type
- From: Romain <romain.haiku@xxxxxxxxxxx>
- To: Haiku network <openbeosnetteam@xxxxxxxxxxxxx>
- Date: Thu, 16 Apr 2009 14:14:09 +0200
>Sorry, I intended to answer that one, it just got buried under
>a lot of other mails.
No problem, i just feared it got lost because there was quite a lot of
posts this week.
>> I tried to move the Add call to the net_socket_private
>>constructor, and
>> then I felt in the problem of my previous email
>>(see bellow).
>This particular issue is fixed in r30188, thanks for your
>investigation!
nice. There is another issue i saw in create_socket in case of error: The
mutex is destroyed before calling the socket destructor, but this socket is
also destroyed in the destructor. This should be removed from
create_socket.
>> I can try to provide a patch, but I am afraid that I will do bad
>> things
>> without help since two points are not clear to me:
>> - Is it ok to add all sockets in sSocketList as soon as they are
>> created
>> (this impacts socket_get_next_stats)?
>This would not be the correct solution, as a socket can be in other
>lists as well exclusively (ie. in its parent socket "pending" and
>"connected" lists).
ok. pending_children sockets are the ones waiting for an accept call, and
connected_children sockets the ones that were accepted ?
>> - Is it ok to load the net_socket module as soon as the stack is
>> created
>> (It seems this was supposed to be done automatically only when
>> needed) ?
>I will look into this problem now. You can't just load the module, as
>you would then no longer be able to unload the stack.
ok. I will watch the commits to see how it will be fixed :)
Other related posts: