Skip to content

Commit

Permalink
Session: do not use our own Camel.Sasl subclass (#681)
Browse files Browse the repository at this point in the history
Use the right one already provided by Camel
  • Loading branch information
Corentin Noël authored Sep 6, 2021
1 parent 49bc582 commit b9130a0
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions src/Backend/Session.vala
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,6 @@
* Authored by: Corentin Noël <[email protected]>
*/

public class Mail.Backend.SimpleSasl : Camel.Sasl {
public SimpleSasl (string service_name, string mechanism, Camel.Service service) {
Object (service_name: service_name, mechanism: mechanism, service: service);
}
}

public class Mail.Backend.Session : Camel.Session {
private static Session _session;
public static unowned Session get_default () {
Expand Down Expand Up @@ -116,7 +110,7 @@ public class Mail.Backend.Session : Camel.Session {
/* Some SASL mechanisms can attempt to authenticate without a
* user password being provided (e.g. single-sign-on credentials),
* but can fall back to a user password. Handle that case next. */
var sasl = new SimpleSasl (((Camel.Provider)service.provider).protocol, mechanism, service);
var sasl = Camel.Sasl.for_service (((Camel.Provider)service.provider).protocol, mechanism, service);
if (sasl != null) {
try_empty_password = sasl.try_empty_password_sync ();
}
Expand Down

0 comments on commit b9130a0

Please sign in to comment.