mirror of
https://github.com/M66B/FairEmail.git
synced 2025-01-02 21:24:34 +00:00
Workaround large QUOTA responses
This commit is contained in:
parent
945f7f3f08
commit
78335df3db
2 changed files with 20 additions and 1 deletions
|
@ -2953,7 +2953,10 @@ public class IMAPProtocol extends Protocol {
|
||||||
long usage = r.readLong();
|
long usage = r.readLong();
|
||||||
long limit = r.readLong();
|
long limit = r.readLong();
|
||||||
Quota.Resource res = new Quota.Resource(name, usage, limit);
|
Quota.Resource res = new Quota.Resource(name, usage, limit);
|
||||||
v.add(res);
|
if ("STORAGE".equals(name) && v.size() < 32)
|
||||||
|
v.add(res);
|
||||||
|
else
|
||||||
|
eu.faircode.email.Log.w("Dropping QUOTA " + name + "/" + usage + "/" + limit + " count=" + v.size());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
q.resources = v.toArray(new Quota.Resource[v.size()]);
|
q.resources = v.toArray(new Quota.Resource[v.size()]);
|
||||||
|
|
|
@ -379,3 +379,19 @@ diff -rupN /home/marcel/JavaMail/mail/src/main/java/com/sun/mail/imap/protocol/I
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
diff --git a/app/src/main/java/com/sun/mail/imap/protocol/IMAPProtocol.java b/app/src/main/java/com/sun/mail/imap/protocol/IMAPProtocol.java
|
||||||
|
index 3b22fdfae..07eec0664 100644
|
||||||
|
--- a/app/src/main/java/com/sun/mail/imap/protocol/IMAPProtocol.java
|
||||||
|
+++ b/app/src/main/java/com/sun/mail/imap/protocol/IMAPProtocol.java
|
||||||
|
@@ -2953,7 +2953,10 @@ public class IMAPProtocol extends Protocol {
|
||||||
|
long usage = r.readLong();
|
||||||
|
long limit = r.readLong();
|
||||||
|
Quota.Resource res = new Quota.Resource(name, usage, limit);
|
||||||
|
- v.add(res);
|
||||||
|
+ if ("STORAGE".equals(name) && v.size() < 32)
|
||||||
|
+ v.add(res);
|
||||||
|
+ else
|
||||||
|
+ eu.faircode.email.Log.w("Dropping QUOTA " + name + "/" + usage + "/" + limit + " count=" + v.size());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
q.resources = v.toArray(new Quota.Resource[v.size()]);
|
||||||
|
|
Loading…
Reference in a new issue