[X2Go-Commits] [libx2goclient] 01/09: src/x2goclient-network.c: make accessor functions more resilient.
git-admin at x2go.org
git-admin at x2go.org
Thu Aug 15 17:40:09 CEST 2019
This is an automated email from the git hooks/post-receive script.
x2go pushed a commit to branch master
in repository libx2goclient.
commit 9e1e952ef09a0f662a6808f1c7d68b64e00719a5
Author: Mihai Moldovan <ionic at ionic.de>
Date: Thu Aug 15 11:33:27 2019 +0200
src/x2goclient-network.c: make accessor functions more resilient.
Allows vfuncs to be pure virtual.
---
src/x2goclient-network.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/src/x2goclient-network.c b/src/x2goclient-network.c
index f88e06e..b1d3792 100644
--- a/src/x2goclient-network.c
+++ b/src/x2goclient-network.c
@@ -73,15 +73,21 @@ enum {
static GParamSpec *net_obj_properties[X2GO_NET_N_PROPERTIES] = { NULL, };
static GSocketAddress* x2goclient_network_parse_sockspec (X2GoClientNetwork *self, const GString *sockspec) {
+ X2GoClientNetworkClass *class = X2GOCLIENT_NETWORK_GET_CLASS (self);
+
g_return_val_if_fail (X2GOCLIENT_IS_NETWORK (self), NULL);
+ g_return_val_if_fail (class->parse_sockspec, NULL);
- return X2GOCLIENT_NETWORK_GET_CLASS (self)->parse_sockspec (self, sockspec);
+ return (class->parse_sockspec (self, sockspec));
}
gboolean x2goclient_network_connect (X2GoClientNetwork *self) {
+ X2GoClientNetworkClass *class = X2GOCLIENT_NETWORK_GET_CLASS (self);
+
g_return_val_if_fail (X2GOCLIENT_IS_NETWORK (self), FALSE);
+ g_return_val_if_fail (class->connect, FALSE);
- return X2GOCLIENT_NETWORK_GET_CLASS (self)->connect (self);
+ return (class->connect (self));
}
static void x2goclient_network_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *param_spec) {
--
Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/libx2goclient.git
More information about the x2go-commits
mailing list