Re: proc color problem

From: Emil Nilimaa (eminil-7@student.luth.se)
Date: 07/21/00


Quoting Peter Ajamian <peter@pajamian.dhs.org>:

> Emil Nilimaa wrote:
> >
> > Ok, im using the easy color stuff, with
> > &r type of color codes.
> >
> > The problem arise when im trying to send lots of
> > colors to the player.
> > It is about 10*10 chars, each with the
> > color &b&v &n. (or less)
> >
> > This makes the game crash,
> > but ONLY for players with a slow connection.
> > The crash occurs when the player spams the command.
>
> If I remember correctly easycolor adds the color in at
the point where
> the text is actually sent to the player (or right
before).  A player
> with a slow connection who spams the command will fill
up the output
> buffer faster than it can be emptied, and you are
basically hitting this
> problem which is already documented in the easycolor
readme file...
>
> > BUGS:
> > The color code doesn't check to make sure that the
buffer doesn't exceed
> > the maximum output buffer size, but since this is
rarely a problem (would
> > require 6 full screens of text under bpl11) I didn't
bother.
>
> That should give you a starting point to at least
understand where the
> problem comes from.
>
> Hint:  The solution, in this case, is to "bother".
>
> Regards, Peter
>
>
>

Ok i couldnt figure out really how to fix the bug, but
i change the d->output  size to LARGE_BUFSIZE instead of
small,  perhaps stupid.

Perhaps would still be same bug, if a really lagged
player spammed really much though?

Any info how to fix it better would be nice.

Havent messed much with the descriptor stuffs and
buffers and it seems pretty messy :) heh

Thanks

/**********************************/
/* Emil Nilimaa                   */
/* zeudes                         */
/* www.sharune.com                */
/**********************************/


     +------------------------------------------------------------+
     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     |  http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html  |
     +------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 04/10/01 PDT