[X2Go-Commits] [libx2goclient] 01/13: src/x2goclient-openssh-bugs.{c, h}: implement bugs structure updating mechanism.
git-admin at x2go.org
git-admin at x2go.org
Sat Jun 27 14:42:19 CEST 2020
This is an automated email from the git hooks/post-receive script.
x2go pushed a commit to branch master
in repository libx2goclient.
commit cbabdf0e8b0e8e064b8ea569b1910311843281e0
Author: Mihai Moldovan <ionic at ionic.de>
Date: Sat Jun 20 07:17:37 2020 +0200
src/x2goclient-openssh-bugs.{c,h}: implement bugs structure updating mechanism.
Currently empty, content follows.
---
src/x2goclient-openssh-bugs.c | 31 +++++++++++++++++++++++++++++++
src/x2goclient-openssh-bugs.h | 15 ++++++++-------
2 files changed, 39 insertions(+), 7 deletions(-)
diff --git a/src/x2goclient-openssh-bugs.c b/src/x2goclient-openssh-bugs.c
index 505d142..525656b 100644
--- a/src/x2goclient-openssh-bugs.c
+++ b/src/x2goclient-openssh-bugs.c
@@ -29,6 +29,7 @@
#endif
#include "x2goclient-openssh-bugs.h"
+#include "x2goclient-openssh-version.h"
X2GoClientOpenSSHBugs* x2goclient_openssh_bugs_new (void) {
return (g_slice_new0 (X2GoClientOpenSSHBugs));
@@ -50,3 +51,33 @@ static X2GoClientOpenSSHBugs* x2goclient_openssh_bugs_copy (const X2GoClientOpen
}
G_DEFINE_BOXED_TYPE (X2GoClientOpenSSHBugs, x2goclient_openssh_bugs, &x2goclient_openssh_bugs_copy, &x2goclient_openssh_bugs_free)
+
+
+gboolean x2goclient_openssh_bugs_update (X2GoClientOpenSSHBugs *self, const X2GoClientOpenSSHVersion * const version, GError **gerr) {
+ gboolean ret = FALSE;
+
+ g_return_val_if_fail (((NULL == gerr) || (NULL == *gerr)), ret);
+
+ /* Basic sanity checks on structs. */
+ if (!(self)) {
+ g_set_error_literal (gerr, X2GOCLIENT_OPENSSH_BUGS_ERROR, X2GOCLIENT_OPENSSH_BUGS_ERROR_INVALID_STRUCT, "No bugs struct passed, cannot update it.");
+ return (ret);
+ }
+
+ if (!(version)) {
+ g_set_error_literal (gerr, X2GOCLIENT_OPENSSH_BUGS_ERROR, X2GOCLIENT_OPENSSH_BUGS_ERROR_INVALID_VERSION_STRUCT, "No version struct passed, cannot extract information.");
+ return (ret);
+ }
+
+ /* Reset everything. */
+ *self = (const X2GoClientOpenSSHBugs) { 0 };
+
+ if (8 >= version->major) {
+ if (2 >= version->minor) {
+ }
+ }
+
+ ret = TRUE;
+
+ return (ret);
+}
diff --git a/src/x2goclient-openssh-bugs.h b/src/x2goclient-openssh-bugs.h
index afe8737..ef0ae5d 100644
--- a/src/x2goclient-openssh-bugs.h
+++ b/src/x2goclient-openssh-bugs.h
@@ -27,6 +27,8 @@
#include <glib-object.h>
+#include "x2goclient-openssh-version.h"
+
G_BEGIN_DECLS
/*
@@ -50,20 +52,19 @@ GType x2goclient_openssh_bugs_get_type (void) G_GNUC_CONST;
X2GoClientOpenSSHBugs* x2goclient_openssh_bugs_new (void);
void x2goclient_openssh_bugs_free (X2GoClientOpenSSHBugs *openssh_bugs);
+
+gboolean x2goclient_network_bugs_update (X2GoClientOpenSSHBugs *self, const X2GoClientOpenSSHVersion * const version, GError **gerr);
+
+
/*
* Error handling helpers.
*/
#define X2GOCLIENT_OPENSSH_BUGS_ERROR g_quark_from_static_string ("x2goclient-openssh-bugs")
-/*
- * Empty enums are ill-formed, so keep this commented out until we put at least
- * one value in here.
- */
-#if 0
enum {
- X2GOCLIENT_OPENSSH_BUGS_ERROR_... = 0,
+ X2GOCLIENT_OPENSSH_BUGS_ERROR_INVALID_STRUCT = 0,
+ X2GOCLIENT_OPENSSH_BUGS_ERROR_INVALID_VERSION_STRUCT,
};
-#endif
G_END_DECLS
--
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