mirror of
https://github.com/vanitasvitae/Smack.git
synced 2025-09-10 17:49:38 +02:00
Update XMPPError to RFC6120
Fixes SMACK-445
This commit is contained in:
parent
67722aea93
commit
d5195c4004
4 changed files with 77 additions and 138 deletions
|
@ -317,12 +317,12 @@ public class OutgoingFileTransfer extends FileTransfer {
|
|||
private void handleXMPPException(XMPPException e) {
|
||||
XMPPError error = e.getXMPPError();
|
||||
if (error != null) {
|
||||
int code = error.getCode();
|
||||
if (code == 403) {
|
||||
String condition = error.getCondition();
|
||||
if (XMPPError.Condition.forbidden.equals(condition)) {
|
||||
setStatus(Status.refused);
|
||||
return;
|
||||
}
|
||||
else if (code == 400) {
|
||||
else if (XMPPError.Condition.bad_request.equals(condition)) {
|
||||
setStatus(Status.error);
|
||||
setError(Error.not_acceptable);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue