[glib] gtlsbackend: Default to indicating no support for DTLS in GTlsBackend
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib] gtlsbackend: Default to indicating no support for DTLS in GTlsBackend
- Date: Wed, 13 Sep 2017 16:38:58 +0000 (UTC)
commit 5e55a4e2439119f54cdd40030d5acc1f5714d9df
Author: Philip Withnall <withnall endlessm com>
Date: Mon Sep 11 09:59:50 2017 +0100
gtlsbackend: Default to indicating no support for DTLS in GTlsBackend
I’m unsure what the original reasoning for returning TRUE by default
from supports_dtls was, but it is not backwards-compatible. If a
pre-existing GTlsBackend implementation never implements the
supports_dtls vfunc, the supports_dtls() method will magically return
TRUE rather than FALSE.
Since any backend which does implement DTLS should be implementing the
supports_dtls vfunc (and no DTLS-supporting backends have actually been
merged yet; see bug #697908), it seems safer to make this slight API
break in the name of backwards compatibility than to leave it as
returning TRUE incorrectly.
Signed-off-by: Philip Withnall <withnall endlessm com>
https://bugzilla.gnome.org/show_bug.cgi?id=787485
gio/gtlsbackend.c | 6 ++----
1 files changed, 2 insertions(+), 4 deletions(-)
---
diff --git a/gio/gtlsbackend.c b/gio/gtlsbackend.c
index db156c8..80af6ad 100644
--- a/gio/gtlsbackend.c
+++ b/gio/gtlsbackend.c
@@ -143,10 +143,8 @@ g_tls_backend_supports_dtls (GTlsBackend *backend)
{
if (G_TLS_BACKEND_GET_INTERFACE (backend)->supports_dtls)
return G_TLS_BACKEND_GET_INTERFACE (backend)->supports_dtls (backend);
- else if (G_IS_DUMMY_TLS_BACKEND (backend))
- return FALSE;
- else
- return TRUE;
+
+ return FALSE;
}
/**
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]