mirror of
https://github.com/moparisthebest/k-9
synced 2024-12-25 00:58:50 -05:00
Fixed a bug in the IMAP response parser
Also got rid of ImapResponse.more() which isn't necessary anymore.
This commit is contained in:
parent
ad8b025b6f
commit
66b7805a57
@ -79,7 +79,6 @@ public class ImapResponseParser {
|
||||
}
|
||||
}
|
||||
}
|
||||
response.mCompleted = true;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -480,33 +479,23 @@ public class ImapResponseParser {
|
||||
}
|
||||
|
||||
/**
|
||||
* Represents a single response from the IMAP server. Tagged responses will
|
||||
* have a non-null tag. Untagged responses will have a null tag. The object
|
||||
* will contain all of the available tokens at the time the response is
|
||||
* received. In general, it will either contain all of the tokens of the
|
||||
* response or all of the tokens up until the first LITERAL. If the object
|
||||
* does not contain the entire response the caller must call more() to
|
||||
* continue reading the response until more returns false.
|
||||
* Represents a single response from the IMAP server.
|
||||
*
|
||||
* <p>
|
||||
* Tagged responses will have a non-null tag. Untagged responses will have a null tag. The
|
||||
* object will contain all of the available tokens at the time the response is received.
|
||||
* </p>
|
||||
*/
|
||||
public class ImapResponse extends ImapList {
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 6886458551615975669L;
|
||||
private boolean mCompleted;
|
||||
private IImapResponseCallback mCallback;
|
||||
|
||||
boolean mCommandContinuationRequested;
|
||||
String mTag;
|
||||
|
||||
public boolean more() throws IOException {
|
||||
if (mCompleted) {
|
||||
return false;
|
||||
}
|
||||
readTokens(this);
|
||||
return true;
|
||||
}
|
||||
|
||||
public String getAlertText() {
|
||||
if (size() > 1 && equalsIgnoreCase("[ALERT]", get(1))) {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
|
@ -1450,8 +1450,6 @@ public class ImapStore extends Store {
|
||||
handleUntaggedResponse(response);
|
||||
}
|
||||
|
||||
while (response.more());
|
||||
|
||||
} while (response.mTag == null);
|
||||
} catch (IOException ioe) {
|
||||
throw ioExceptionHandler(mConnection, ioe);
|
||||
@ -1535,8 +1533,6 @@ public class ImapStore extends Store {
|
||||
handleUntaggedResponse(response);
|
||||
}
|
||||
|
||||
while (response.more());
|
||||
|
||||
} while (response.mTag == null);
|
||||
} catch (IOException ioe) {
|
||||
throw ioExceptionHandler(mConnection, ioe);
|
||||
@ -1877,7 +1873,6 @@ public class ImapStore extends Store {
|
||||
eolOut.write('\n');
|
||||
eolOut.flush();
|
||||
}
|
||||
while (response.more());
|
||||
} while (response.mTag == null);
|
||||
|
||||
String newUid = getUidFromMessageId(message);
|
||||
|
Loading…
Reference in New Issue
Block a user