On Thu, May 31, 2001 at 05:30:56PM +0200, Eric Luyten wrote:
> > > I have seen that the problem is that Qpopper 4.0.2 ignores the POP pass
> > > command with empty string and waits for a new pass command, but Qpopper
> > > 4.0.2 doesn't shows any warning message about this.
>
> > If you enter the pass command followed by four blanks, it works correctly. Its
> > some sort of bug in pop_parse.c in the special handling of the pass command for
> > the special case of nothing after the pass command.
...
> Unless you make 'pass' follow with five spaces (one separator and four
> argument characters) Qpopper 4.0 will not return any response whatsoever.
>
> Apart from the "-ERR POP timeout from..." after 'T' seconds, that is.
>
> Weird, since pop_parse.c doesn't appear to have changed between 3.1 and 4.0
I believe either the problem existed with 3.x (I haven't tested that)
or something must have changed in the context of the return code tests
in the sequence of calls from
popper => pop_get_command => pop_parse
The problem is that in the error case of no parameter being found to
the "pass" command (which is handled specially within the pop_parse
function), pop_parse returns a -1 (implying no command found) when it
should return 0 (indicating a command was found but with no parameter.)
This causes the main loop in popper.c to treat it as if an empty line
had been entered, and wait for a new line of input without returning a
-ERR response.
I believe one correct fix is:
*** pop_parse.c 2001/05/16 01:22:13 1.1
--- pop_parse.c 2001/05/31 22:48:40
***************
*** 109,115 ****
}
return ( 1 );
} else
! return ( -1 );
}
}
else {
--- 109,116 ----
}
return ( 1 );
} else
! /* 1 valid command was entered but no valid parameter */
! return ( 0 );
}
}
else {
--
Clifton Royston -- LavaNet Systems Architect -- [EMAIL PROTECTED]
WWJD? "JWRTFM!" - Scott Dorsey (kludge) "JWG" - Eddie Aikau