[glib] add G_TLS_ERROR_UNAVAILABLE



commit 68a3d6b27fec3bdbba27b414c0ed10396c79d3c6
Author: Dan Winship <danw gnome org>
Date:   Mon Dec 6 12:43:59 2010 +0100

    add G_TLS_ERROR_UNAVAILABLE

 gio/gdummytlsbackend.c |    4 ++--
 gio/gioenums.h         |    2 ++
 2 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/gio/gdummytlsbackend.c b/gio/gdummytlsbackend.c
index f2d7186..6a6b8a2 100644
--- a/gio/gdummytlsbackend.c
+++ b/gio/gdummytlsbackend.c
@@ -150,7 +150,7 @@ g_dummy_tls_certificate_initable_init (GInitable       *initable,
 				       GCancellable    *cancellable,
 				       GError         **error)
 {
-  g_set_error_literal (error, G_TLS_ERROR, G_TLS_ERROR_MISC,
+  g_set_error_literal (error, G_TLS_ERROR, G_TLS_ERROR_UNAVAILABLE,
 		       _("TLS support is not available"));
   return FALSE;
 }
@@ -262,7 +262,7 @@ g_dummy_tls_connection_initable_init (GInitable       *initable,
 				      GCancellable    *cancellable,
 				      GError         **error)
 {
-  g_set_error_literal (error, G_TLS_ERROR, G_TLS_ERROR_MISC,
+  g_set_error_literal (error, G_TLS_ERROR, G_TLS_ERROR_UNAVAILABLE,
 		       _("TLS support is not available"));
   return FALSE;
 }
diff --git a/gio/gioenums.h b/gio/gioenums.h
index 9ad291c..7aaba24 100644
--- a/gio/gioenums.h
+++ b/gio/gioenums.h
@@ -1251,6 +1251,7 @@ typedef enum
 
 /**
  * GTlsError:
+ * @G_TLS_ERROR_UNAVAILABLE: No TLS provider is available
  * @G_TLS_ERROR_MISC: Miscellaneous TLS error
  * @G_TLS_ERROR_BAD_CERTIFICATE: A certificate could not be parsed
  * @G_TLS_ERROR_NOT_TLS: The TLS handshake failed because the
@@ -1270,6 +1271,7 @@ typedef enum
  * Since: 2.28
  */
 typedef enum {
+  G_TLS_ERROR_UNAVAILABLE,
   G_TLS_ERROR_MISC,
   G_TLS_ERROR_BAD_CERTIFICATE,
   G_TLS_ERROR_NOT_TLS,



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