[evolution-kolab] libekolabutil: cleanup (removed commented old code)



commit c3d167e851f6a35612c4f1a0b68410064137fb9e
Author: Christian Hilberg <hilberg kernelconcepts de>
Date:   Mon Aug 6 18:11:36 2012 +0200

    libekolabutil: cleanup (removed commented old code)

 src/libekolabutil/kolab-util-ldap.c |   41 +++++++++++++---------------------
 1 files changed, 16 insertions(+), 25 deletions(-)
---
diff --git a/src/libekolabutil/kolab-util-ldap.c b/src/libekolabutil/kolab-util-ldap.c
index 3355369..2c7ad43 100644
--- a/src/libekolabutil/kolab-util-ldap.c
+++ b/src/libekolabutil/kolab-util-ldap.c
@@ -2,17 +2,17 @@
 /*
  * evolution-kolab
  * Copyright (C) Silvan Marco Fin 2010 <silvan kernelconcepts de>
- * 
+ *
  * evolution-kolab is free software: you can redistribute it and/or modify it
  * under the terms of the GNU Lesser General Public License as published
  * by the Free Software Foundation, either version 3 of the License, or
  * (at your option) any later version.
- * 
+ *
  * evolution-kolab is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  * See the GNU Lesser General Public License for more details.
- * 
+ *
  * You should have received a copy of the GNU Lesser General Public License
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
@@ -40,7 +40,7 @@ kolab_util_ldap_init (KolabUtilLdap *self)
 	curl_easy_setopt (self->kc_handle, CURLOPT_NOPROGRESS, 1);
 	curl_easy_setopt (self->kc_handle, CURLOPT_SSL_VERIFYPEER, 1);
 	curl_easy_setopt (self->kc_handle, CURLOPT_SSL_VERIFYHOST, 2);
-	
+
 	curl_easy_setopt (self->kc_handle, CURLOPT_SSLVERSION, CURL_SSLVERSION_SSLv3);
 
 	g_assert (self->kc_handle != NULL);
@@ -59,44 +59,36 @@ kolab_util_ldap_class_init (KolabUtilLdapClass *klass)
 {
 	GObjectClass* object_class = G_OBJECT_CLASS (klass);
 	/* not used, so far
-	 * GObjectClass* parent_class = G_OBJECT_CLASS (klass); 
+	 * GObjectClass* parent_class = G_OBJECT_CLASS (klass);
 	 */
-	
+
 	curl_global_init (CURL_GLOBAL_ALL);
 
 	object_class->finalize = kolab_util_ldap_finalize;
 }
 
-/* TODO: check wether curl_global_init() and curl_global_cleanup() have to be  
+/* TODO: check wether curl_global_init() and curl_global_cleanup() have to be
  * called in a class init/finalization method (class destructor). Perhaps this is
- * not desireable, since libcurl might already be initialized or yet be in use 
+ * not desireable, since libcurl might already be initialized or yet be in use
  * by some other utility class.
  */
 
 CURLcode
-kolab_util_ldap_set_searchurl (KolabUtilLdap *self, const gchar *url) 
+kolab_util_ldap_set_searchurl (KolabUtilLdap *self, const gchar *url)
 {
 	return curl_easy_setopt (self->kc_handle, CURLOPT_URL, url);
 }
-#if 0
-static CURLcode 
-kolab_util_ldap_set_jobopts (KolabUtilLdap *self)
-{
-	CURLcode curlcode = 0;
 
-	return curlcode;
-}
-#endif
 gssize
 kolab_util_ldap_get (KolabUtilLdap *self)
 {
 	gssize nbytes = 0;
-	CURLcode curlcode;	
+	CURLcode curlcode;
 
 	curlcode = curl_easy_perform(self->kc_handle);
 
 	g_assert(curlcode == 0); /* FIXME: error handling */
-	
+
 	return nbytes;
 }
 
@@ -105,23 +97,23 @@ parse_ldap_encryption_mode(gchar *token)
 {
 	if (g_str_equal ("tls", token))
 		return LDAP_TLS;
-	else if (g_str_equal ("ssl", token)) 
+	else if (g_str_equal ("ssl", token))
 		return LDAP_SSL;
 	else /* if (g_str_equal("no", token)) */
 		return LDAP_NOENC;
-	
+
 }
 
-CURLcode 
+CURLcode
 kolab_util_ldap_set_encryption_mode(KolabUtilLdap *self,
                                     KolabUtilLdapEncryptionMode mode)
 {
 	CURLcode curl_code;
 
 	g_return_val_if_fail (KOLAB_IS_UTIL_LDAP(self), -1);
-	
+
 	g_printerr ("Mode: %d\n", mode);
-	
+
 	switch (mode) {
 	case LDAP_TLS:
 		curl_code = curl_easy_setopt (self->kc_handle, CURLOPT_SSLVERSION, CURL_SSLVERSION_TLSv1);
@@ -164,4 +156,3 @@ kolab_util_ldap_set_pkcs11pin (KolabUtilLdap *self,
 
 	return curl_code;
 }
-



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]