[glib-networking] Update all GLIB_CHECK_VERSION usage
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib-networking] Update all GLIB_CHECK_VERSION usage
- Date: Mon, 7 Jan 2019 20:25:35 +0000 (UTC)
commit 463f3111619462212b5471d47b5e2df8fbe8745e
Author: Michael Catanzaro <mcatanzaro igalia com>
Date: Mon Jan 7 14:15:22 2019 -0600
Update all GLIB_CHECK_VERSION usage
GLib decided to release version 2.59.0 instead of 2.59.1 like I was
expecting. Seems there is a .0 release every second release cycle. Not
very consistent. OK then.
tls/gnutls/gtlsconnection-gnutls.c | 24 ++++++++++++------------
tls/tests/connection.c | 8 ++++----
tls/tests/dtls-connection.c | 6 +++---
3 files changed, 19 insertions(+), 19 deletions(-)
---
diff --git a/tls/gnutls/gtlsconnection-gnutls.c b/tls/gnutls/gtlsconnection-gnutls.c
index 31ce8cf..3b2afa4 100644
--- a/tls/gnutls/gtlsconnection-gnutls.c
+++ b/tls/gnutls/gtlsconnection-gnutls.c
@@ -130,7 +130,7 @@ enum
PROP_INTERACTION,
PROP_PEER_CERTIFICATE,
PROP_PEER_CERTIFICATE_ERRORS,
-#if GLIB_CHECK_VERSION(2, 59, 1)
+#if GLIB_CHECK_VERSION(2, 59, 0)
PROP_ADVERTISED_PROTOCOLS,
PROP_NEGOTIATED_PROTOCOL,
#endif
@@ -218,7 +218,7 @@ typedef struct
GTlsInteraction *interaction;
gchar *interaction_id;
-#if GLIB_CHECK_VERSION(2, 59, 1)
+#if GLIB_CHECK_VERSION(2, 59, 0)
gchar **advertised_protocols;
gchar *negotiated_protocol;
#endif
@@ -465,7 +465,7 @@ g_tls_connection_gnutls_finalize (GObject *object)
g_free (priv->interaction_id);
g_clear_object (&priv->interaction);
-#if GLIB_CHECK_VERSION(2, 59, 1)
+#if GLIB_CHECK_VERSION(2, 59, 0)
g_clear_pointer (&priv->advertised_protocols, g_strfreev);
g_clear_pointer (&priv->negotiated_protocol, g_free);
#endif
@@ -548,7 +548,7 @@ g_tls_connection_gnutls_get_property (GObject *object,
g_value_set_flags (value, priv->peer_certificate_errors);
break;
-#if GLIB_CHECK_VERSION(2, 59, 1)
+#if GLIB_CHECK_VERSION(2, 59, 0)
case PROP_ADVERTISED_PROTOCOLS:
g_value_set_boxed (value, priv->advertised_protocols);
break;
@@ -652,7 +652,7 @@ g_tls_connection_gnutls_set_property (GObject *object,
priv->interaction = g_value_dup_object (value);
break;
-#if GLIB_CHECK_VERSION(2, 59, 1)
+#if GLIB_CHECK_VERSION(2, 59, 0)
case PROP_ADVERTISED_PROTOCOLS:
g_clear_pointer (&priv->advertised_protocols, g_strfreev);
priv->advertised_protocols = g_value_dup_boxed (value);
@@ -1068,7 +1068,7 @@ end_gnutls_io (GTlsConnectionGnutls *gnutls,
else if (status == GNUTLS_E_INAPPROPRIATE_FALLBACK)
{
g_set_error_literal (error, G_TLS_ERROR,
-#if GLIB_CHECK_VERSION(2, 59, 1)
+#if GLIB_CHECK_VERSION(2, 59, 0)
G_TLS_ERROR_INAPPROPRIATE_FALLBACK,
#else
G_TLS_ERROR_MISC,
@@ -2078,7 +2078,7 @@ handshake_thread (GTask *task,
static void
begin_handshake (GTlsConnectionGnutls *gnutls)
{
-#if GLIB_CHECK_VERSION(2, 59, 1)
+#if GLIB_CHECK_VERSION(2, 59, 0)
GTlsConnectionGnutlsPrivate *priv = g_tls_connection_gnutls_get_instance_private (gnutls);
if (priv->advertised_protocols)
@@ -2101,7 +2101,7 @@ begin_handshake (GTlsConnectionGnutls *gnutls)
G_TLS_CONNECTION_GNUTLS_GET_CLASS (gnutls)->begin_handshake (gnutls);
}
-#if GLIB_CHECK_VERSION(2, 59, 1)
+#if GLIB_CHECK_VERSION(2, 59, 0)
static void
update_negotiated_protocol (GTlsConnectionGnutls *gnutls)
{
@@ -2160,7 +2160,7 @@ finish_handshake (GTlsConnectionGnutls *gnutls,
_("Unacceptable TLS certificate"));
}
-#if GLIB_CHECK_VERSION(2, 59, 1)
+#if GLIB_CHECK_VERSION(2, 59, 0)
if (!*error && priv->advertised_protocols)
update_negotiated_protocol (gnutls);
#endif
@@ -3090,7 +3090,7 @@ g_tls_connection_gnutls_dtls_shutdown_finish (GDtlsConnection *conn,
return g_task_propagate_boolean (G_TASK (result), error);
}
-#if GLIB_CHECK_VERSION(2, 59, 1)
+#if GLIB_CHECK_VERSION(2, 59, 0)
static void
g_tls_connection_gnutls_dtls_set_advertised_protocols (GDtlsConnection *conn,
const gchar * const *protocols)
@@ -3140,7 +3140,7 @@ g_tls_connection_gnutls_class_init (GTlsConnectionGnutlsClass *klass)
g_object_class_override_property (gobject_class, PROP_INTERACTION, "interaction");
g_object_class_override_property (gobject_class, PROP_PEER_CERTIFICATE, "peer-certificate");
g_object_class_override_property (gobject_class, PROP_PEER_CERTIFICATE_ERRORS, "peer-certificate-errors");
-#if GLIB_CHECK_VERSION(2, 59, 1)
+#if GLIB_CHECK_VERSION(2, 59, 0)
g_object_class_override_property (gobject_class, PROP_ADVERTISED_PROTOCOLS, "advertised-protocols");
g_object_class_override_property (gobject_class, PROP_NEGOTIATED_PROTOCOL, "negotiated-protocol");
#endif
@@ -3161,7 +3161,7 @@ g_tls_connection_gnutls_dtls_connection_iface_init (GDtlsConnectionInterface *if
iface->shutdown = g_tls_connection_gnutls_dtls_shutdown;
iface->shutdown_async = g_tls_connection_gnutls_dtls_shutdown_async;
iface->shutdown_finish = g_tls_connection_gnutls_dtls_shutdown_finish;
-#if GLIB_CHECK_VERSION(2, 59, 1)
+#if GLIB_CHECK_VERSION(2, 59, 0)
iface->set_advertised_protocols = g_tls_connection_gnutls_dtls_set_advertised_protocols;
iface->get_negotiated_protocol = g_tls_connection_gnutls_dtls_get_negotiated_protocol;
#endif
diff --git a/tls/tests/connection.c b/tls/tests/connection.c
index 41b66b7..de87f8b 100644
--- a/tls/tests/connection.c
+++ b/tls/tests/connection.c
@@ -79,7 +79,7 @@ typedef struct {
gboolean server_should_close;
gboolean server_running;
GTlsCertificate *server_certificate;
-#if GLIB_CHECK_VERSION(2, 59, 1)
+#if GLIB_CHECK_VERSION(2, 59, 0)
const gchar * const *server_protocols;
#endif
@@ -305,7 +305,7 @@ on_incoming_connection (GSocketService *service,
if (test->database)
g_tls_connection_set_database (G_TLS_CONNECTION (test->server_connection), test->database);
-#if GLIB_CHECK_VERSION(2, 59, 1)
+#if GLIB_CHECK_VERSION(2, 59, 0)
if (test->server_protocols)
{
g_tls_connection_set_advertised_protocols (G_TLS_CONNECTION (test->server_connection),
@@ -1916,7 +1916,7 @@ test_fallback (TestConnection *test,
#pragma GCC diagnostic pop
#endif
-#if GLIB_CHECK_VERSION(2, 59, 1)
+#if GLIB_CHECK_VERSION(2, 59, 0)
g_set_error_literal (&test->expected_server_error, G_TLS_ERROR, G_TLS_ERROR_INAPPROPRIATE_FALLBACK, "");
#else
g_set_error_literal (&test->expected_server_error, G_TLS_ERROR, G_TLS_ERROR_MISC, "");
@@ -2085,7 +2085,7 @@ test_alpn (TestConnection *test,
const char * const *server_protocols,
const char *negotiated_protocol)
{
-#if GLIB_CHECK_VERSION(2, 59, 1)
+#if GLIB_CHECK_VERSION(2, 59, 0)
GIOStream *connection;
GError *error = NULL;
diff --git a/tls/tests/dtls-connection.c b/tls/tests/dtls-connection.c
index a589650..c65f693 100644
--- a/tls/tests/dtls-connection.c
+++ b/tls/tests/dtls-connection.c
@@ -89,7 +89,7 @@ typedef struct {
gboolean expect_server_error;
GError *server_error;
gboolean server_running;
-#if GLIB_CHECK_VERSION(2, 59, 1)
+#if GLIB_CHECK_VERSION(2, 59, 0)
const gchar * const *server_protocols;
#endif
@@ -400,7 +400,7 @@ on_incoming_connection (GSocket *socket,
if (test->database)
g_dtls_connection_set_database (G_DTLS_CONNECTION (test->server_connection), test->database);
-#if GLIB_CHECK_VERSION(2, 59, 1)
+#if GLIB_CHECK_VERSION(2, 59, 0)
if (test->server_protocols)
{
g_dtls_connection_set_advertised_protocols (G_DTLS_CONNECTION (test->server_connection),
@@ -743,7 +743,7 @@ test_alpn (TestConnection *test,
const char * const *server_protocols,
const char *negotiated_protocol)
{
-#if GLIB_CHECK_VERSION(2, 59, 1)
+#if GLIB_CHECK_VERSION(2, 59, 0)
GDatagramBased *connection;
GError *error = NULL;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]