fix parsing of nntp error responses before initial 20x response, patch by ch.ey@gmx.net, r=me, sr=mscott

This commit is contained in:
bienvenu%nventure.com 2004-10-27 16:31:38 +00:00
Родитель 38b52cd75a
Коммит 1af5469d92
1 изменённых файлов: 7 добавлений и 4 удалений

Просмотреть файл

@ -1582,12 +1582,15 @@ PRInt32 nsNNTPProtocol::NewsResponse(nsIInputStream * inputStream, PRUint32 leng
#endif
}
NS_MsgSACopy(&m_responseText, line+4);
m_previousResponseCode = m_responseCode;
m_previousResponseCode = m_responseCode;
PR_sscanf(line, "%d", &m_responseCode);
if (m_responseCode && PL_strlen(line) > 3)
NS_MsgSACopy(&m_responseText, line + 4);
else
NS_MsgSACopy(&m_responseText, line);
if (m_responseCode == MK_NNTP_RESPONSE_AUTHINFO_DENIED) {
/* login failed */
AlertError(MK_NNTP_AUTH_FAILED, m_responseText);