pull/183/head
M66B 5 years ago
parent a9930e020c
commit 1c864c9e94

@ -113,7 +113,7 @@ public interface DaoIdentity {
int setIdentitySignKeyAlias(long id, String alias);
@Query("UPDATE identity SET max_size = :max_size WHERE id = :id")
int setIdentityMaxSize(long id, Integer max_size);
int setIdentityMaxSize(long id, Long max_size);
@Query("UPDATE identity SET error = :error WHERE id = :id")
int setIdentityError(long id, String error);

@ -634,12 +634,10 @@ public class EmailService implements AutoCloseable {
return (SMTPTransport) iservice;
}
Integer getMaxSize() {
SMTPTransport transport = getTransport();
String size = transport.getExtensionParameter("SIZE");
Long getMaxSize() {
String size = getTransport().getExtensionParameter("SIZE");
if (!TextUtils.isEmpty(size) && TextUtils.isDigitsOnly(size))
return Integer.parseInt(size);
return Long.parseLong(size);
return null;

@ -116,7 +116,7 @@ public class EntityIdentity {
public String state;
public String error;
public Long last_connected;
public Integer max_size;
public Long max_size;
String getProtocol() {
return (starttls ? "smtp" : "smtps");

@ -826,7 +826,7 @@ public class FragmentIdentity extends FragmentBase {
last_connected = identity.last_connected;
// Check SMTP server
Integer max_size = null;
Long max_size = null;
if (check) {
// Create transport
String protocol = (starttls ? "smtp" : "smtps");

@ -555,7 +555,7 @@ public class ServiceSend extends ServiceBase {
throw new IOException("Test");
db.identity().setIdentityState(ident.id, "connected");
Integer max_size = iservice.getMaxSize();
Long max_size = iservice.getMaxSize();
if (max_size != null)
db.identity().setIdentityMaxSize(ident.id, max_size);

Loading…
Cancel
Save