[Prev][Next][Index][Thread]

# Re: More force_input() and $do_command()...

- Date: Sun, 7 Jul 1996 14:55:10 PDT
- From:
- cc: MOO-Cows.parc@xerox.com
- In-Reply-to: "Gustavo Glusman's message of \"Sat, 06 Jul 1996 23:50:26 PDT\" <v03007601ae0508d63f10@[132.76.55.130]>"

    Gustavo Glusman writes:
    > Forcing input on a non-connected positive-number object does *not* call
    > :do_login_command.

    Quite right; I wrote without thinking very hard or looking at the sources last
    time.  I've now done at least the latter, so here's the correct story:

    Every line of forced input goes to either L:do_login_command() or
    L:do_command(), depending *only* on whether the object being forced is negative
    or not (respectively).  The tricky point, though, is the value of L in the
    above.  For inbound connections, L is the listening object.  For outbound
    connections, L is always #0.  What about for *non*-connections?  Well, that
    there's what we call a little "bug" in the code: the appropriate field in the
    task queue structure is never explicitly filled in by the code, so it gets some
    random (and probably large) value.  This is extremely unlikely to be a valid
    object number, so the above verb call is simply skipped, leading to the results
    that Gustavo saw in his experiment:

    > Objnum       Connection    is_player()        Result of force_input()
    > ------       ----------    -----------        -----------------------
    >   #2           active         yes                  $do_command
    > #-12          incoming        no                   $do_login_command
    >  #-5            none          no                   None
    > #131            none          no                   None
    > #133            none          yes                  None

    The simplest fix is to treat the forcing case like the outbound one and
    initialize L to #0.  To do this, add this line:
    	tq->handler = 0;
    just after this line:
    	tq->player = player;
    in the function find_tqueue() in the file "tasks.c".

    With luck, the next maintainer will add this patch in the next release.
    (Speaking of the next maintainer, where *is* he?  He was supposed to get back
    to me some weeks ago, once he'd gotten settled in his new job...)

    	Pavel

Follow-Ups:

- Re: More force_input() and $do_command()...

- From: "Junkie's 'R' Us" <junky@photocraftlab.com>

References:

- Re: More force_input() and $do_command()...

- From: Gustavo Glusman <bmgustav@bioinformatics.weizmann.ac.il>

- Prev: Re: More force_input() and $do_command()...
- Next: Re: More force_input() and $do_command()...
- Index: MOO-cows
- Thread: MOO-cows

Home | Subject Index | Thread Index