add ability to pass results of commands back to front end code so the fe can handle errors, bug 20071 r=cavin, sr=sspitzer

This commit is contained in:
bienvenu%netscape.com 2002-10-01 18:45:08 +00:00
parent b1308fc696
commit 0fd4bbe14f

View File

@ -693,7 +693,24 @@ void nsImapServerResponseParser::response_data()
else if (!PL_strcasecmp(fNextToken, "XAOL-OPTION"))
skip_to_CRLF();
else
SetSyntaxError(PR_TRUE);
{
// check if custom command
nsXPIDLCString customCommand;
fServerConnection.GetCurrentUrl()->GetCommand(getter_Copies(customCommand));
if (customCommand.Equals(fNextToken))
{
nsCAutoString customCommandResponse;
while (Connected() && !at_end_of_line())
{
fNextToken = GetNextToken();
customCommandResponse.Append(fNextToken);
customCommandResponse.Append(" ");
}
fServerConnection.GetCurrentUrl()->SetCustomCommandResult(customCommandResponse.get());
}
else
SetSyntaxError(PR_TRUE);
}
break;
default:
if (IsNumericString(fNextToken))