makes some strange smtp server like 1und1.de to work. Those send the helo reply in 2 parts, the AUTH=PLAIN... being in the 2nd one which we didn't read... ending up to no login.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13889 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
99c566f6c9
commit
7c993b4bf1
@ -926,10 +926,13 @@ SMTPProtocol::ReceiveResponse(BString &out)
|
||||
BString searchStr = "";
|
||||
|
||||
struct timeval tv;
|
||||
struct timeval nulltv;
|
||||
struct fd_set fds;
|
||||
|
||||
tv.tv_sec = long(timeout / 1e6);
|
||||
tv.tv_usec = long(timeout-(tv.tv_sec * 1e6));
|
||||
nulltv.tv_sec = 0L;
|
||||
nulltv.tv_usec = 0L;
|
||||
|
||||
/* Initialize (clear) the socket mask. */
|
||||
FD_ZERO(&fds);
|
||||
@ -969,6 +972,16 @@ SMTPProtocol::ReceiveResponse(BString &out)
|
||||
|
||||
len += r;
|
||||
out.Append(buf, r);
|
||||
|
||||
// is there anything else to read ? (smtp.1und1.de sends the 250-AUTH line in a 2nd part)
|
||||
#ifdef USESSL
|
||||
if ((use_ssl) && (SSL_pending(ssl)))
|
||||
continue;
|
||||
else
|
||||
#endif
|
||||
result = select(32, &fds, NULL, NULL, &nulltv);
|
||||
if (result > 0)
|
||||
continue;
|
||||
|
||||
if (strstr(buf, CRLF) && (out.FindFirst(searchStr) != B_ERROR))
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user