Add proper ifdefs around master_passphrase() calls.
authorAndrej Kacian <ticho@claws-mail.org>
Thu, 14 Dec 2017 22:24:20 +0000 (23:24 +0100)
committerAndrej Kacian <ticho@claws-mail.org>
Thu, 14 Dec 2017 22:24:20 +0000 (23:24 +0100)
src/addressbook.c
src/compose.c

index fef1ee1e89283c3cdb07cac622066c72266a365b..a1544d9eb700757510233296241fbdd8e14b0910 100644 (file)
@@ -4731,14 +4731,16 @@ static void addressbook_lup_clicked( GtkButton *button, gpointer data ) {
                ldap_ctl = ldap_server->control;
                if (ldap_ctl != NULL &&
                                ldap_ctl->bindDN != NULL && strlen(ldap_ctl->bindDN) > 0) {
+#ifndef PASSWORD_CRYPTO_OLD
                        /* LDAP server is password-protected. */
                        if (master_passphrase() == NULL) {
                                /* User did not enter master passphrase, do not start a search. */
                                return;
                        }
+#endif /* PASSWORD_CRYPTO_OLD */
                }
        }
-#endif
+#endif /* USE_LDAP */
 
        searchTerm =
                gtk_editable_get_chars( GTK_EDITABLE(addrbook.entry), 0, -1 );
index 1938aadbf39e25157980b2ec92ea4763448eb922..3841d828b0a9bd483ec451c0792f62433d9fc1f8 100644 (file)
@@ -7246,6 +7246,7 @@ static void compose_create_header_entry(Compose *compose)
                         NULL);
 
 #ifdef USE_LDAP
+#ifndef PASSWORD_CRYPTO_OLD
        GSList *pwd_servers = addrindex_get_password_protected_ldap_servers();
        if (pwd_servers != NULL && master_passphrase() == NULL) {
                gboolean enable = FALSE;
@@ -7258,7 +7259,8 @@ static void compose_create_header_entry(Compose *compose)
                g_slist_foreach(pwd_servers, _ldap_srv_func, &enable);
                compose->passworded_ldap_servers = pwd_servers;
        }
-#endif
+#endif /* PASSWORD_CRYPTO_OLD */
+#endif /* USE_LDAP */
 
        address_completion_register_entry(GTK_ENTRY(entry), TRUE);