[Commits] [SCM] claws branch, master, updated. 3.16.0-221-g9e44f32

ticho at claws-mail.org ticho at claws-mail.org
Tue Jun 26 18:21:25 CEST 2018


The branch, master has been updated
       via  9e44f32faf5f8c335ae21b8c68872005bb8534cc (commit)
      from  70d4cce5c4200119be1a50ce23b1c227c0056f67 (commit)

Summary of changes:
 src/ldapserver.c |   12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)


- Log -----------------------------------------------------------------
commit 9e44f32faf5f8c335ae21b8c68872005bb8534cc
Author: Andrej Kacian <ticho at claws-mail.org>
Date:   Tue Jun 26 18:20:26 2018 +0200

    Fix some variable type mismatches in ldapsvr_connect() on Windows.

diff --git a/src/ldapserver.c b/src/ldapserver.c
index 831dd48..98fd9fe 100644
--- a/src/ldapserver.c
+++ b/src/ldapserver.c
@@ -758,6 +758,9 @@ PFldap_start_tls_s Win32_ldap_start_tls_s = NULL;
 LDAP *ldapsvr_connect(LdapControl *ctl) {
 	LDAP *ld = NULL;
 	gint rc;
+#ifndef G_OS_UNIX
+	intptr_t op;
+#endif
 	gint version;
 	gchar *uri = NULL;
 	gchar *pwd;
@@ -794,8 +797,7 @@ LDAP *ldapsvr_connect(LdapControl *ctl) {
 
 		if ((void *)op != LDAP_OPT_ON) {
 			debug_print("Enabling SSL/TLS\n");
-			op = LDAP_OPT_ON;
-			rc = ldap_set_option(ld, LDAP_OPT_SSL, (void *)&op);
+			rc = ldap_set_option(ld, LDAP_OPT_SSL, LDAP_OPT_ON);
 			if (rc != LDAP_SUCCESS) {
 				log_error(LOG_PROTOCOL, _("LDAP error (options): %d (%s)\n"),
 						rc, ldaputil_get_error(ld));
@@ -806,9 +808,9 @@ LDAP *ldapsvr_connect(LdapControl *ctl) {
 					log_error(LOG_PROTOCOL, _("LDAP error (options): %d (%s)\n"),
 							rc, ldaputil_get_error(ld));
 				} else {
-					log_print(LOG_PROTOCOL, _("LDAP (options): SSL/TLS enabled (%d)\n"), op);
+					log_print(LOG_PROTOCOL, _("LDAP (options): SSL/TLS enabled (%d)\n"), (gint)op);
 				}
-				debug_print("SSL/TLS now %d\n", op);
+				debug_print("SSL/TLS now %d\n", (gint)op);
 			}
 		}
 
@@ -857,7 +859,7 @@ LDAP *ldapsvr_connect(LdapControl *ctl) {
 			}
 			debug_print("Setting STARTTLS\n");
 			rc = Win32_ldap_start_tls_s(ld, &serv_rc, NULL, NULL, NULL);
-			debug_print("ldap_start_tls_s: %d server %d %s\n",
+			debug_print("ldap_start_tls_s: %d server %ld %s\n",
 					rc, serv_rc, ldaputil_get_error(ld));
 #else
 			debug_print("Setting STARTTLS\n");

-----------------------------------------------------------------------


hooks/post-receive
-- 
Claws Mail


More information about the Commits mailing list