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

Re: Break sequences acting up?

Bryan Stansell bryan@conserver.com
Tue, 18 May 2004 16:55:52 -0700 (PDT)


On Tue, May 18, 2004 at 12:05:27PM -0700, Bryan Stansell wrote:
> to see the rest of the output.  it would help me determine where the
> bug actually is (gotta be a bug...just not sure how to reproduce it -
> can't so far).

no need for the debug output...i was able to reproduce it.  it didn't
*look* like there was a problem when under solaris (where i first
tried it...though closer examination of debug output did show the
problem) but it was loud and clear under linux.

i've attached a patch for 8.1.5, but it works with 8.1.1 (and all
versions in between) as well (and possibly earlier, but i haven't
checked).

depending on the break sequences you use, you may or may not see the
problem.  if you have \d or \z sequences with non-\d/\z characters, you
could very well hit the problem (but it depends on how things are
ordered).  a simple series of \z and \d (one or more) won't trigger the
bug.

Bryan
*** group.c.old	Fri May  7 08:39:51 2004
--- group.c	Tue May 18 16:52:41 2004
***************
*** 3933,3943 ****
--- 3933,3952 ----
      }
  
      if (pCEServing->wbuf->used > 1) {
+ 	char *iac = StringChar(pCEServing->wbuf, 0, (char)IAC);
+ 	CONDDEBUG((1, "Kiddie(): hunting for new IAC for [%s]",
+ 		   pCEServing->server));
+ 	if (iac == (char *)0)
+ 	    pCEServing->wbufIAC = 0;
+ 	else
+ 	    pCEServing->wbufIAC =
+ 		(iac - pCEServing->wbuf->string) + 2;
  	CONDDEBUG((1,
  		   "Kiddie(): watching writability for fd %d 'cause we have buffered data",
  		   FileFDNum(pCEServing->cofile)));
  	FD_SET(FileFDNum(pCEServing->cofile), &winit);
      } else {
+ 	pCEServing->wbufIAC = 0;
  	if (FileBufEmpty(pCEServing->cofile)) {
  	    CONDDEBUG((1,
  		       "Kiddie(): removing writability for fd %d 'cause we don't have buffered data",