[interfacekit] Re: BSession


Hi!


Axel Dörfler wrote:
How can this make any sense?
There are several possibilities for a port write (or read) to fail, it doesn't have to be that the port no longer exists. For example, BeOS has a limit of how much memory can be in all ports in the system, this is not related to the application.
And if this happens, the app should not fail?
Not at all. Not something as important as the app_server.
I said "app" not "app_server".

An even more important thing to consider is B_INTERRUPTED - that can happen in all user space code and it should probably be resistant against it.
I know about it for a long time, but I haven't modified BSession. Lazy me! :-)
You should put "ToDo" items in the code, then. That would not only be a reminder for you, but also a hint for someone who is reviewing the code.
I'm sorry, I didn't know someone was code reviewing what I am writing. :-|. Since I was the only one who used that code I did not thought that I had to make it clear for others to watch/view. I know what I have have to do with or without "TODO"s.

No, all datas will be dumped until the next code is recognized.
I know about this... and I had in plan to suffix each instruction with... AS_END_INSTRUCTION.

How could this help? What you could do is something similar to what TCP is doing: have a packet counter.

And manually calculate the byte count of a massage? Don't you think that is a bit... odd and unpractical? Remember that the tail of an instruction may be in another BSession message.

Why manually calculate the byte count? If a packet number doesn't match, the app_server could reset the connection and ask for the whole thing again.
Ah, I misunderstood what you said, and so did you.
I was referring to a message, you were referring to a packet.
Yes, a packet counter may be good, but I don't really see the need for such a think here. A simple reply(ack) would be just fine.


In 99.99999% of cases this won't happen. Unless a bad user or program will write to a ServerWindow port. I have discussed this with Michael and he said it is not concerned by security.

If we can do 100% we should do it. This is not "just" a user application that would die, this is a system component; the standards should be a big higher here.
app_server would not die! just one of its threads!
If it would just sit on a port, there probably wouldn't be a problem, but who guarantees that it won't crash (in which case the whole app_server would be taken down)?
I do. So does DW. We did/will take that into account.


See ya, Adi.



---------------------------------------------------------------
Lucram pentru tine. Analizam. Cautam zilnic.
Alegem ceea ce te intereseaza. Te anuntam.
http://www.REDUCERI.ro/


Other related posts: