зеркало из https://github.com/mozilla/pjs.git
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:
Родитель
e8e7ae0361
Коммит
da582b3a6c
|
@ -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))
|
||||
|
|
Загрузка…
Ссылка в новой задаче