[DGD] state[previous_object()] in kernel??

Felix A. Croes felix at dworkin.nl
Sat Jul 31 01:55:43 CEST 2010


Krister Svanlund <krister.svanlund at gmail.com> wrote:

> Actually no, I've read through the file several time and just can't
> understand why it should be a mapping where, according to me, it never
> should contain more then one element ([the_conn_object:
> the_current_state]). This is the under the assumption that the
> connection object never changes for a single user.

But you previously wrote that it might have to do with logging in
twice as the same user; what made you change your mind?

Your first assumption was correct.  Each connection to the server
will get a new connection object, so logging in twice as admin will
link two connection objects to the same user object, for the duration
of the login+password sequence.

In user::login(), connection(previous_object()) will formally establish
the link with the connection object, as well as break the link with the
previous connection object, if there is any.  The function is defined
in kernel/lib/user.c.

Regards,
Felix Croes



More information about the DGD mailing list