This is an automated email from the git hooks/post-receive script. x2go pushed a change to branch master in repository libx2goclient. from 19ca400 src/x2goclient-openssh-version: x2goclient_openssh_version_parse (). new c107c90 src/x2goclient-openssh-version.c: use preprocessor magic in x2goclient_openssh_version_parse () to shorten the error macros. new 60bcf28 src/x2goclient-network-ssh.h: add missing error constants for x2goclient_str_to_int () conversion in src/x2goclient-network-ssh.c. new 1496e50 src/x2goclient-openssh-version.{c,h}: rework version parsing algorithm. new 98a195c src/x2goclient-utils.c: fix gtk-doc issues (mostly in annotations). new 50c8261 src/x2goclient-utils.h: hide macros gtk-doc and g-ir-scanner stumble upon. new 9033b62 src/x2goclient-utils.c: replace _Bool* parameters with gboolean* for gobject-introspection only. new da42a78 src/x2goclient-network-ssh.c: add openssh-version property to X2GoClientNetworkSSH. new cd67ff2 misc: copyright date update. new 43044e2 misc: update modeline to match style more accurately. The 9 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "adds" were already present in the repository and have only been added to this reference. Summary of changes: debian/copyright | 19 +- src/test/sshtest.c | 6 +- src/x2goclient-agent-start-kdrive.c | 6 +- src/x2goclient-agent-start-kdrive.h | 6 +- src/x2goclient-agent-start-nx.c | 6 +- src/x2goclient-agent-start-nx.h | 6 +- src/x2goclient-network-ssh.c | 67 ++++++- src/x2goclient-network-ssh.h | 12 +- src/x2goclient-network.c | 6 +- src/x2goclient-network.h | 6 +- src/x2goclient-object.c | 6 +- src/x2goclient-object.h | 6 +- src/x2goclient-openssh-version.c | 356 +++++++++++++++++++-------------- src/x2goclient-openssh-version.h | 7 +- src/x2goclient-proxy-start-nx.c | 6 +- src/x2goclient-proxy-start-nx.h | 6 +- src/x2goclient-renderer-start-kdrive.c | 6 +- src/x2goclient-renderer-start-kdrive.h | 6 +- src/x2goclient-session-resume.c | 6 +- src/x2goclient-session-resume.h | 6 +- src/x2goclient-session-runcommand.c | 6 +- src/x2goclient-session-runcommand.h | 6 +- src/x2goclient-session-suspend.c | 6 +- src/x2goclient-session-suspend.h | 6 +- src/x2goclient-session-terminate.c | 6 +- src/x2goclient-session-terminate.h | 6 +- src/x2goclient-utils.c | 27 +-- src/x2goclient-utils.h | 24 ++- src/x2goclient.h | 6 +- update-po.sh | 4 +- update-pot.sh | 4 +- 31 files changed, 395 insertions(+), 257 deletions(-) -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/libx2goclient.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository libx2goclient. commit 50c826155dde7b738753c5ce39e218fe03f1e796 Author: Mihai Moldovan <ionic@ionic.de> Date: Mon Apr 27 23:39:45 2020 +0200 src/x2goclient-utils.h: hide macros gtk-doc and g-ir-scanner stumble upon. --- src/x2goclient-utils.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/x2goclient-utils.h b/src/x2goclient-utils.h index 02727a3..5e90c6a 100644 --- a/src/x2goclient-utils.h +++ b/src/x2goclient-utils.h @@ -31,11 +31,23 @@ G_BEGIN_DECLS +/* + * We don't want to document these macros... and we'll also probably make them + * internal at a later date anyway via an internal usage macro. + * + * Also, g-ir-scanner seems to choke on the PASTER symbol for weird reasons. + * Probably because g-ir-scanner can't handle and automatically skips va-args + * macros. + */ +#ifndef __GTK_DOC_IGNORE__ +#ifndef __GI_SCANNER__ #define EMPTY(...) #define DEFER(...) __VA_ARGS__ EMPTY() #define OBSTRUCT(...) __VA_ARGS__ DEFER(EMPTY)() #define EXPAND(...) __VA_ARGS__ #define PASTER(x, y) x ## _ ## y +#endif /* !defined (__GI_SCANNER__) */ +#endif /* !defined (__GTK_DOC_IGNORE__) */ void x2goclient_clear_strings (gpointer data); -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/libx2goclient.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository libx2goclient. commit 1496e50dc0a6acdeb9433c758fc07b8c34eef4a1 Author: Mihai Moldovan <ionic@ionic.de> Date: Mon Apr 27 19:42:02 2020 +0200 src/x2goclient-openssh-version.{c,h}: rework version parsing algorithm. Instead of copy-pasting the same number version parsing code three times in a row, use a loop and some mighty processor magic to get the job done. That'll increase code size instead of decrease it (ironically), but it also looks a bit cleaner and encapsulates the version parsing part nicely. Additionally, this also fixes a few parsing bugs. --- src/x2goclient-openssh-version.c | 344 ++++++++++++++++++++++----------------- src/x2goclient-openssh-version.h | 3 + 2 files changed, 198 insertions(+), 149 deletions(-) diff --git a/src/x2goclient-openssh-version.c b/src/x2goclient-openssh-version.c index 28b50c3..5258fce 100644 --- a/src/x2goclient-openssh-version.c +++ b/src/x2goclient-openssh-version.c @@ -22,6 +22,8 @@ Boston, MA 02110-1301, USA. */ +#include <string.h> + #include <glib.h> #include <glib/gprintf.h> @@ -53,7 +55,65 @@ G_DEFINE_BOXED_TYPE (X2GoClientOpenSSHVersion, x2goclient_openssh_version, &x2go #define ERROR_QUARK EXPAND(X2GOCLIENT_OPENSSH_VERSION_ERROR) #define GENERATE_ERROR_(preamble, component, error) preamble ## _ ## component ## _ ## error -#define GENERATE_ERROR(component, error) GENERATE_ERROR_(X2GOCLIENT_OPENSSH_VERSION_ERROR, component, error) +#define GENERATE_ERROR(component, error) GENERATE_ERROR_ (X2GOCLIENT_OPENSSH_VERSION_ERROR, component, error) +#define GENERATE_ERROR_MSG_(component, msg) #component " " msg +#define GENERATE_ERROR_MSG(out_var, idx_var, msg) \ + do {\ + if (0 == idx_var) {\ + out_var = GENERATE_ERROR_MSG_ ("Major", msg);\ + }\ + else if (1 == idx_var) {\ + out_var = GENERATE_ERROR_MSG_ ("Minor", msg);\ + }\ + else {\ + out_var = GENERATE_ERROR_MSG_ ("Patch", msg);\ + }\ + } while (0) +#define GENERATE_ERROR_CODE(out_var, idx_var, error) \ + do {\ + if (0 == idx_var) {\ + out_var = GENERATE_ERROR (MAJOR, error);\ + }\ + else if (1 == idx_var) {\ + out_var = GENERATE_ERROR (MINOR, error);\ + }\ + else {\ + out_var = GENERATE_ERROR (PATCH, error);\ + }\ + } while (0) +#define SET_VER_COMPONENT(out_struct, idx_var, value) \ + do {\ + if (0 == idx_var) {\ + out_struct->major = value;\ + }\ + else if (1 == idx_var) {\ + out_struct->minor = value;\ + }\ + else {\ + out_struct->patch = value;\ + }\ + } while (0) +#define CHECK_VER_COMPONENT(out_struct, idx_var, err) \ + do {\ + if (0 == idx_var) {\ + if (0 > out_struct->major) {\ + err = TRUE;\ + break;\ + }\ + }\ + else if (1 == idx_var) {\ + if (0 > out_struct->minor) {\ + err = TRUE;\ + break;\ + }\ + }\ + else {\ + if (0 > out_struct->patch) {\ + err = TRUE;\ + break;\ + }\ + }\ + } while (0) void x2goclient_openssh_version_parse (X2GoClientOpenSSHVersion *openssh_version, const gchar *version_string, GError **gerr) { /* Basic sanity checks on struct and string. */ @@ -85,186 +145,172 @@ void x2goclient_openssh_version_parse (X2GoClientOpenSSHVersion *openssh_version return; } - /* Skip preamble, scan for major version number separator (dot). */ + /* Skip preamble. */ tmp += 8; - const gchar *dot_search = g_strstr_len (tmp, -1, "."); - if (!(dot_search)) { - g_set_error_literal (gerr, ERROR_QUARK, X2GOCLIENT_OPENSSH_VERSION_ERROR_NO_MAJOR_SEPARATOR, "Version string does not contain major version number separator."); - - x2goclient_openssh_version_free (struct_work_copy); - struct_work_copy = NULL; - return; - } + _Bool vers_err = FALSE; - g_assert (tmp < dot_search); - - /* Sanity check on major version number - must be numeric/all digits. */ - const gchar *int_search = NULL; - for (int_search = tmp; int_search < dot_search; ++int_search) { - if (!(g_ascii_isdigit (*int_search))) { - g_set_error_literal (gerr, ERROR_QUARK, X2GOCLIENT_OPENSSH_VERSION_ERROR_MAJOR_NOT_NUMERIC, "Major version number is not numeric."); + /* + * Loop over the major, minor and patch version numbers. + * + * Most of the conversion code is exactly the same, only error codes, + * messages and preludes (i.e., things to do before actually converting the + * version number) differ slightly. + * + * We can usually abstract this with a bit (a lot?) of preprocessor magic. + */ + for (size_t num_i = 0; num_i < 3; ++num_i) { + const gchar *end_search = NULL; + if (0 == num_i) { + /* Scan for major version number separator (dot). */ + end_search = g_strstr_len (tmp, -1, "."); + if (!(end_search)) { + /* No separator is an error. */ + g_set_error_literal (gerr, ERROR_QUARK, X2GOCLIENT_OPENSSH_VERSION_ERROR_NO_MAJOR_SEPARATOR, "Version string does not contain major version number separator."); + + vers_err = TRUE; + + break; + } + } + else if (1 == num_i) { + if ('.' != *tmp) { + g_set_error_literal (gerr, ERROR_QUARK, X2GOCLIENT_OPENSSH_VERSION_ERROR_NOT_AT_MAJOR_SEPARATOR, "Major version number parsing did not stop at separator."); - x2goclient_openssh_version_free (struct_work_copy); - struct_work_copy = NULL; + vers_err = TRUE; - return; - } - } + break; + } + else { + /* Skip dot character. */ + ++tmp; + } - /* Copy and convert major version number. */ - gchar *tmp_copy = g_strndup (tmp, dot_search - tmp); - struct_work_copy->major = -1; + /* Scan for minor version number separator (p). */ + end_search = g_strstr_len (tmp, -1, "p"); + if (!(end_search)) { + /* No separator is an error. */ + g_set_error_literal (gerr, ERROR_QUARK, X2GOCLIENT_OPENSSH_VERSION_ERROR_NO_MINOR_SEPARATOR, "Version string does not contain minor version number separator."); - _Bool conv_err = TRUE, - min_err = TRUE, - max_err = TRUE; - const gchar *end = NULL; - long long conv = x2goclient_str_to_int (tmp_copy, TRUE, 0, TRUE, G_MAXUINT32, &end, &conv_err, &min_err, &max_err); + vers_err = TRUE; - if (conv_err) { - if (min_err) { - g_set_error_literal (gerr, ERROR_QUARK, GENERATE_ERROR (MAJOR, UNDERFLOW), "Major version number is too small to fit into long long type."); - } - else if (max_err) { - g_set_error_literal (gerr, ERROR_QUARK, GENERATE_ERROR (MAJOR, OVERFLOW), "Major version number is too big to fit into long long type."); + break; + } } else { - end = NULL; - g_set_error_literal (gerr, ERROR_QUARK, GENERATE_ERROR (MAJOR, NOT_NUMERIC), "Major version number is not numeric."); - } - } - else { - if (min_err) { - g_set_error_literal (gerr, ERROR_QUARK, GENERATE_ERROR (MAJOR, NEGATIVE), "Major version number is not numeric."); - } - else if (max_err) { - g_set_error_literal (gerr, ERROR_QUARK, GENERATE_ERROR (MAJOR, TOO_BIG), "Major version number is too big."); - } - else { - struct_work_copy->major = conv; - } - } - - if (end) { - /* Map end pointer to original string. */ - tmp += (end - tmp_copy); - } - - g_free (tmp_copy); - tmp_copy = NULL; - - if (0 > struct_work_copy->major) { - x2goclient_openssh_version_free (struct_work_copy); - struct_work_copy = NULL; - - return; - } + if ('p' != *tmp) { + g_set_error_literal (gerr, ERROR_QUARK, X2GOCLIENT_OPENSSH_VERSION_ERROR_NOT_AT_MINOR_SEPARATOR, "Minor version number parsing did not stop at separator."); - /* Copy and convert minor version number. */ - tmp_copy = g_strdup (tmp); - struct_work_copy->minor = -1; + vers_err = TRUE; - conv_err = min_err = max_err = TRUE; - end = NULL; - conv = x2goclient_str_to_int (tmp_copy, TRUE, 0, TRUE, G_MAXUINT32, &end, &conv_err, &min_err, &max_err); + break; + } + else { + /* Skip 'p' character. */ + ++tmp; + } - if (conv_err) { - if (min_err) { - g_set_error_literal (gerr, ERROR_QUARK, GENERATE_ERROR (MINOR, UNDERFLOW), "Minor version number is too small to fit into long long type."); - } - else if (max_err) { - g_set_error_literal (gerr, ERROR_QUARK, GENERATE_ERROR (MINOR, OVERFLOW), "Minor version number is too big to fit into long long type."); - } - else { - end = NULL; - g_set_error_literal (gerr, ERROR_QUARK, GENERATE_ERROR (MINOR, NOT_NUMERIC), "Minor version number is not numeric."); - } - } - else { - if (min_err) { - g_set_error_literal (gerr, ERROR_QUARK, GENERATE_ERROR (MINOR, NEGATIVE), "Minor version number is not numeric."); - } - else if (max_err) { - g_set_error_literal (gerr, ERROR_QUARK, GENERATE_ERROR (MINOR, TOO_BIG), "Minor version number is too big."); - } - else { - struct_work_copy->minor = conv; + /* + * Set end to actual end of string. We'll parse the patch version number + * opportunistically, since its terminator is not typically fixed, but + * might be one of multiple characters. + * + * In the worst case, i.e., if there are no characters left, end_search + * will point to tmp. + */ + end_search = tmp + strlen (tmp); } - } - if (end) { - /* Map end pointer to original string. */ - tmp += (end - tmp_copy); - } + g_assert (end_search); - g_free (tmp_copy); - tmp_copy = NULL; + if (2 > num_i) { + g_assert (tmp < end_search); - /* - * Handle error and additionally scan for the next character which MUST be a - * 'p' according to our scheme. - */ - if ((0 > struct_work_copy->minor) || ('p' != *tmp)) { - x2goclient_openssh_version_free (struct_work_copy); - struct_work_copy = NULL; + /* Sanity check on version number - must be numeric/all digits. */ + const gchar *int_search = NULL; + for (int_search = tmp; int_search < end_search; ++int_search) { + if (!(g_ascii_isdigit (*int_search))) { + gint err_code = -1; + const gchar *err_msg = NULL; - return; - } - else { - /* Skip 'p' character. */ - ++tmp; - } + GENERATE_ERROR_CODE (err_code, num_i, NOT_NUMERIC); + GENERATE_ERROR_MSG (err_msg, num_i, "version number is not numeric."); - /* Copy and convert patch version number. */ - tmp_copy = g_strdup (tmp); - struct_work_copy->patch = -1; + g_set_error_literal (gerr, ERROR_QUARK, err_code, err_msg); - conv_err = min_err = max_err = TRUE; - end = NULL; - conv = x2goclient_str_to_int (tmp_copy, TRUE, 0, TRUE, G_MAXUINT32, &end, &conv_err, &min_err, &max_err); + vers_err = TRUE; - if (conv_err) { - if (min_err) { - g_set_error_literal (gerr, ERROR_QUARK, GENERATE_ERROR (PATCH, UNDERFLOW), "Patch version number is too small to fit into long long type."); + break; + } + } } - else if (max_err) { - g_set_error_literal (gerr, ERROR_QUARK, GENERATE_ERROR (PATCH, OVERFLOW), "Patch version number is too big to fit into long long type."); + + /* Copy and convert version number. */ + gchar *tmp_copy = g_strndup (tmp, end_search - tmp); + SET_VER_COMPONENT (struct_work_copy, num_i, -1); + + _Bool conv_err = TRUE, + min_err = TRUE, + max_err = TRUE; + const gchar *end = NULL; + const gchar *err_msg = NULL; + gint err_code = -1; + long long conv = x2goclient_str_to_int (tmp_copy, TRUE, 0, TRUE, G_MAXUINT32, &end, &conv_err, &min_err, &max_err); + + if (conv_err) { + if (min_err) { + GENERATE_ERROR_CODE (err_code, num_i, UNDERFLOW); + GENERATE_ERROR_MSG (err_msg, num_i, "version number is too small to fit into long long type."); + } + else if (max_err) { + GENERATE_ERROR_CODE (err_code, num_i, OVERFLOW); + GENERATE_ERROR_MSG (err_msg, num_i, "version number is too big to fit into long long type."); + } + else { + GENERATE_ERROR_CODE (err_code, num_i, NOT_NUMERIC); + GENERATE_ERROR_MSG (err_msg, num_i, "version number is not numeric."); + + end = NULL; + } + + g_set_error_literal (gerr, ERROR_QUARK, err_code, err_msg); } else { - end = NULL; - g_set_error_literal (gerr, ERROR_QUARK, GENERATE_ERROR (PATCH, NOT_NUMERIC), "Patch version number is not numeric."); - } - } - else { - if (min_err) { - g_set_error_literal (gerr, ERROR_QUARK, GENERATE_ERROR (PATCH, NEGATIVE), "Patch version number is not numeric."); - } - else if (max_err) { - g_set_error_literal (gerr, ERROR_QUARK, GENERATE_ERROR (PATCH, TOO_BIG), "Patch version number is too big."); + if (min_err) { + GENERATE_ERROR_CODE (err_code, num_i, NEGATIVE); + GENERATE_ERROR_MSG (err_msg, num_i, "version number is not numeric."); + + g_set_error_literal (gerr, ERROR_QUARK, err_code, err_msg); + } + else if (max_err) { + GENERATE_ERROR_CODE (err_code, num_i, TOO_BIG); + GENERATE_ERROR_MSG (err_msg, num_i, "version number is too big."); + + g_set_error_literal (gerr, ERROR_QUARK, err_code, err_msg); + } + else { + SET_VER_COMPONENT (struct_work_copy, num_i, conv); + } } - else { - struct_work_copy->patch = conv; + + if (end) { + /* Map end pointer to original string. */ + tmp += (end - tmp_copy); } - } - if (end) { - /* Map end pointer to original string. */ - tmp += (end - tmp_copy); - } + g_free (tmp_copy); + tmp_copy = NULL; - g_free (tmp_copy); - tmp_copy = NULL; + CHECK_VER_COMPONENT (struct_work_copy, num_i, vers_err); + } - if (0 > struct_work_copy->patch) { + if (vers_err) { x2goclient_openssh_version_free (struct_work_copy); struct_work_copy = NULL; - - return; } /* Scan for a comma which should follow any additional version data. */ - end = g_strstr_len (tmp, -1, ","); + const gchar *end = g_strstr_len (tmp, -1, ","); if (!(end)) { /* * Alternatively, scan for whitespace and we'll treat that as the @@ -274,8 +320,8 @@ void x2goclient_openssh_version_parse (X2GoClientOpenSSHVersion *openssh_version if (!(end)) { /* - * No separator means or trailing whitespace means that we'll have to - * fast-forward to the actual end. + * No separator or trailing whitespace means that we'll have to fast- + * forward to the actual end. */ end = (tmp + (strlen (tmp))); } diff --git a/src/x2goclient-openssh-version.h b/src/x2goclient-openssh-version.h index fcb5f83..0226ea2 100644 --- a/src/x2goclient-openssh-version.h +++ b/src/x2goclient-openssh-version.h @@ -55,6 +55,9 @@ enum { X2GOCLIENT_OPENSSH_VERSION_ERROR_INVALID_VERSION_STRING, X2GOCLIENT_OPENSSH_VERSION_ERROR_INVALID_PREAMBLE, X2GOCLIENT_OPENSSH_VERSION_ERROR_NO_MAJOR_SEPARATOR, + X2GOCLIENT_OPENSSH_VERSION_ERROR_NO_MINOR_SEPARATOR, + X2GOCLIENT_OPENSSH_VERSION_ERROR_NOT_AT_MAJOR_SEPARATOR, + X2GOCLIENT_OPENSSH_VERSION_ERROR_NOT_AT_MINOR_SEPARATOR, X2GOCLIENT_OPENSSH_VERSION_ERROR_MAJOR_NOT_NUMERIC, X2GOCLIENT_OPENSSH_VERSION_ERROR_MAJOR_UNDERFLOW, X2GOCLIENT_OPENSSH_VERSION_ERROR_MAJOR_OVERFLOW, -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/libx2goclient.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository libx2goclient. commit 60bcf282910fb5e1f4ae8be40ee0b7cf6d01689e Author: Mihai Moldovan <ionic@ionic.de> Date: Sat Apr 25 23:32:30 2020 +0200 src/x2goclient-network-ssh.h: add missing error constants for x2goclient_str_to_int () conversion in src/x2goclient-network-ssh.c. --- src/x2goclient-network-ssh.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/x2goclient-network-ssh.h b/src/x2goclient-network-ssh.h index 1af7d70..bfa1fdf 100644 --- a/src/x2goclient-network-ssh.h +++ b/src/x2goclient-network-ssh.h @@ -53,7 +53,11 @@ X2GoClientNetworkSSH* x2goclient_network_ssh_new (const gchar *session_path); #define X2GOCLIENT_NETWORK_SSH_ERROR g_quark_from_static_string ("x2goclient-network-ssh") enum { - X2GOCLIENT_NETWORK_SSH_ERROR_PORT_CONV = 0, + X2GOCLIENT_NETWORK_SSH_ERROR_PORT_CONV_NOT_NUMERIC = 0, + X2GOCLIENT_NETWORK_SSH_ERROR_PORT_CONV_UNDERFLOW, + X2GOCLIENT_NETWORK_SSH_ERROR_PORT_CONV_OVERFLOW, + X2GOCLIENT_NETWORK_SSH_ERROR_PORT_CONV_TOO_BIG, + X2GOCLIENT_NETWORK_SSH_ERROR_PORT_CONV_NEGATIVE_ZERO, X2GOCLIENT_NETWORK_SSH_ERROR_IPV6_CONV, X2GOCLIENT_NETWORK_SSH_ERROR_IPV4_CONV, X2GOCLIENT_NETWORK_SSH_ERROR_ALIAS_CONV, -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/libx2goclient.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository libx2goclient. commit c107c90c816fa722de9a8891660ef582655bacfd Author: Mihai Moldovan <ionic@ionic.de> Date: Wed Apr 22 17:42:44 2020 +0200 src/x2goclient-openssh-version.c: use preprocessor magic in x2goclient_openssh_version_parse () to shorten the error macros. --- src/x2goclient-openssh-version.c | 44 ++++++++++++++++++++++------------------ src/x2goclient-utils.h | 6 ++++++ 2 files changed, 30 insertions(+), 20 deletions(-) diff --git a/src/x2goclient-openssh-version.c b/src/x2goclient-openssh-version.c index 6fb193a..28b50c3 100644 --- a/src/x2goclient-openssh-version.c +++ b/src/x2goclient-openssh-version.c @@ -51,15 +51,19 @@ static X2GoClientOpenSSHVersion* x2goclient_openssh_version_copy (X2GoClientOpen G_DEFINE_BOXED_TYPE (X2GoClientOpenSSHVersion, x2goclient_openssh_version, &x2goclient_openssh_version_copy, &x2goclient_openssh_version_free) +#define ERROR_QUARK EXPAND(X2GOCLIENT_OPENSSH_VERSION_ERROR) +#define GENERATE_ERROR_(preamble, component, error) preamble ## _ ## component ## _ ## error +#define GENERATE_ERROR(component, error) GENERATE_ERROR_(X2GOCLIENT_OPENSSH_VERSION_ERROR, component, error) + void x2goclient_openssh_version_parse (X2GoClientOpenSSHVersion *openssh_version, const gchar *version_string, GError **gerr) { /* Basic sanity checks on struct and string. */ if (!(openssh_version)) { - g_set_error_literal (gerr, X2GOCLIENT_OPENSSH_VERSION_ERROR, X2GOCLIENT_OPENSSH_VERSION_ERROR_INVALID_STRUCT, "No version struct passed, cannot store extracted information."); + g_set_error_literal (gerr, ERROR_QUARK, X2GOCLIENT_OPENSSH_VERSION_ERROR_INVALID_STRUCT, "No version struct passed, cannot store extracted information."); return; } if (!(version_string)) { - g_set_error_literal (gerr, X2GOCLIENT_OPENSSH_VERSION_ERROR, X2GOCLIENT_OPENSSH_VERSION_ERROR_INVALID_VERSION_STRING, "No version string passed, cannot extract information."); + g_set_error_literal (gerr, ERROR_QUARK, X2GOCLIENT_OPENSSH_VERSION_ERROR_INVALID_VERSION_STRING, "No version string passed, cannot extract information."); return; } @@ -73,7 +77,7 @@ void x2goclient_openssh_version_parse (X2GoClientOpenSSHVersion *openssh_version /* Start with the fixed preamble. */ const gchar *tmp = version_string; if (!(g_str_has_prefix (tmp, "OpenSSH_"))) { - g_set_error_literal (gerr, X2GOCLIENT_OPENSSH_VERSION_ERROR, X2GOCLIENT_OPENSSH_VERSION_ERROR_INVALID_PREAMBLE, "Preamble in version string does not match expected value 'OpenSSH_'."); + g_set_error_literal (gerr, ERROR_QUARK, X2GOCLIENT_OPENSSH_VERSION_ERROR_INVALID_PREAMBLE, "Preamble in version string does not match expected value 'OpenSSH_'."); x2goclient_openssh_version_free (struct_work_copy); struct_work_copy = NULL; @@ -85,7 +89,7 @@ void x2goclient_openssh_version_parse (X2GoClientOpenSSHVersion *openssh_version tmp += 8; const gchar *dot_search = g_strstr_len (tmp, -1, "."); if (!(dot_search)) { - g_set_error_literal (gerr, X2GOCLIENT_OPENSSH_VERSION_ERROR, X2GOCLIENT_OPENSSH_VERSION_ERROR_NO_MAJOR_SEPARATOR, "Version string does not contain major version number separator."); + g_set_error_literal (gerr, ERROR_QUARK, X2GOCLIENT_OPENSSH_VERSION_ERROR_NO_MAJOR_SEPARATOR, "Version string does not contain major version number separator."); x2goclient_openssh_version_free (struct_work_copy); struct_work_copy = NULL; @@ -99,7 +103,7 @@ void x2goclient_openssh_version_parse (X2GoClientOpenSSHVersion *openssh_version const gchar *int_search = NULL; for (int_search = tmp; int_search < dot_search; ++int_search) { if (!(g_ascii_isdigit (*int_search))) { - g_set_error_literal (gerr, X2GOCLIENT_OPENSSH_VERSION_ERROR, X2GOCLIENT_OPENSSH_VERSION_ERROR_MAJOR_NOT_NUMERIC, "Major version number is not numeric."); + g_set_error_literal (gerr, ERROR_QUARK, X2GOCLIENT_OPENSSH_VERSION_ERROR_MAJOR_NOT_NUMERIC, "Major version number is not numeric."); x2goclient_openssh_version_free (struct_work_copy); struct_work_copy = NULL; @@ -120,22 +124,22 @@ void x2goclient_openssh_version_parse (X2GoClientOpenSSHVersion *openssh_version if (conv_err) { if (min_err) { - g_set_error_literal (gerr, X2GOCLIENT_OPENSSH_VERSION_ERROR, X2GOCLIENT_OPENSSH_VERSION_ERROR_MAJOR_UNDERFLOW, "Major version number is too small to fit into long long type."); + g_set_error_literal (gerr, ERROR_QUARK, GENERATE_ERROR (MAJOR, UNDERFLOW), "Major version number is too small to fit into long long type."); } else if (max_err) { - g_set_error_literal (gerr, X2GOCLIENT_OPENSSH_VERSION_ERROR, X2GOCLIENT_OPENSSH_VERSION_ERROR_MAJOR_OVERFLOW, "Major version number is too big to fit into long long type."); + g_set_error_literal (gerr, ERROR_QUARK, GENERATE_ERROR (MAJOR, OVERFLOW), "Major version number is too big to fit into long long type."); } else { end = NULL; - g_set_error_literal (gerr, X2GOCLIENT_OPENSSH_VERSION_ERROR, X2GOCLIENT_OPENSSH_VERSION_ERROR_MAJOR_NOT_NUMERIC, "Major version number is not numeric."); + g_set_error_literal (gerr, ERROR_QUARK, GENERATE_ERROR (MAJOR, NOT_NUMERIC), "Major version number is not numeric."); } } else { if (min_err) { - g_set_error_literal (gerr, X2GOCLIENT_OPENSSH_VERSION_ERROR, X2GOCLIENT_OPENSSH_VERSION_ERROR_MAJOR_NEGATIVE, "Major version number is not numeric."); + g_set_error_literal (gerr, ERROR_QUARK, GENERATE_ERROR (MAJOR, NEGATIVE), "Major version number is not numeric."); } else if (max_err) { - g_set_error_literal (gerr, X2GOCLIENT_OPENSSH_VERSION_ERROR, X2GOCLIENT_OPENSSH_VERSION_ERROR_MAJOR_TOO_BIG, "Major version number is too big."); + g_set_error_literal (gerr, ERROR_QUARK, GENERATE_ERROR (MAJOR, TOO_BIG), "Major version number is too big."); } else { struct_work_copy->major = conv; @@ -167,22 +171,22 @@ void x2goclient_openssh_version_parse (X2GoClientOpenSSHVersion *openssh_version if (conv_err) { if (min_err) { - g_set_error_literal (gerr, X2GOCLIENT_OPENSSH_VERSION_ERROR, X2GOCLIENT_OPENSSH_VERSION_ERROR_MINOR_UNDERFLOW, "Minor version number is too small to fit into long long type."); + g_set_error_literal (gerr, ERROR_QUARK, GENERATE_ERROR (MINOR, UNDERFLOW), "Minor version number is too small to fit into long long type."); } else if (max_err) { - g_set_error_literal (gerr, X2GOCLIENT_OPENSSH_VERSION_ERROR, X2GOCLIENT_OPENSSH_VERSION_ERROR_MINOR_OVERFLOW, "Minor version number is too big to fit into long long type."); + g_set_error_literal (gerr, ERROR_QUARK, GENERATE_ERROR (MINOR, OVERFLOW), "Minor version number is too big to fit into long long type."); } else { end = NULL; - g_set_error_literal (gerr, X2GOCLIENT_OPENSSH_VERSION_ERROR, X2GOCLIENT_OPENSSH_VERSION_ERROR_MINOR_NOT_NUMERIC, "Minor version number is not numeric."); + g_set_error_literal (gerr, ERROR_QUARK, GENERATE_ERROR (MINOR, NOT_NUMERIC), "Minor version number is not numeric."); } } else { if (min_err) { - g_set_error_literal (gerr, X2GOCLIENT_OPENSSH_VERSION_ERROR, X2GOCLIENT_OPENSSH_VERSION_ERROR_MINOR_NEGATIVE, "Minor version number is not numeric."); + g_set_error_literal (gerr, ERROR_QUARK, GENERATE_ERROR (MINOR, NEGATIVE), "Minor version number is not numeric."); } else if (max_err) { - g_set_error_literal (gerr, X2GOCLIENT_OPENSSH_VERSION_ERROR, X2GOCLIENT_OPENSSH_VERSION_ERROR_MINOR_TOO_BIG, "Minor version number is too big."); + g_set_error_literal (gerr, ERROR_QUARK, GENERATE_ERROR (MINOR, TOO_BIG), "Minor version number is too big."); } else { struct_work_copy->minor = conv; @@ -222,22 +226,22 @@ void x2goclient_openssh_version_parse (X2GoClientOpenSSHVersion *openssh_version if (conv_err) { if (min_err) { - g_set_error_literal (gerr, X2GOCLIENT_OPENSSH_VERSION_ERROR, X2GOCLIENT_OPENSSH_VERSION_ERROR_PATCH_UNDERFLOW, "Patch version number is too small to fit into long long type."); + g_set_error_literal (gerr, ERROR_QUARK, GENERATE_ERROR (PATCH, UNDERFLOW), "Patch version number is too small to fit into long long type."); } else if (max_err) { - g_set_error_literal (gerr, X2GOCLIENT_OPENSSH_VERSION_ERROR, X2GOCLIENT_OPENSSH_VERSION_ERROR_PATCH_OVERFLOW, "Patch version number is too big to fit into long long type."); + g_set_error_literal (gerr, ERROR_QUARK, GENERATE_ERROR (PATCH, OVERFLOW), "Patch version number is too big to fit into long long type."); } else { end = NULL; - g_set_error_literal (gerr, X2GOCLIENT_OPENSSH_VERSION_ERROR, X2GOCLIENT_OPENSSH_VERSION_ERROR_PATCH_NOT_NUMERIC, "Patch version number is not numeric."); + g_set_error_literal (gerr, ERROR_QUARK, GENERATE_ERROR (PATCH, NOT_NUMERIC), "Patch version number is not numeric."); } } else { if (min_err) { - g_set_error_literal (gerr, X2GOCLIENT_OPENSSH_VERSION_ERROR, X2GOCLIENT_OPENSSH_VERSION_ERROR_PATCH_NEGATIVE, "Patch version number is not numeric."); + g_set_error_literal (gerr, ERROR_QUARK, GENERATE_ERROR (PATCH, NEGATIVE), "Patch version number is not numeric."); } else if (max_err) { - g_set_error_literal (gerr, X2GOCLIENT_OPENSSH_VERSION_ERROR, X2GOCLIENT_OPENSSH_VERSION_ERROR_PATCH_TOO_BIG, "Patch version number is too big."); + g_set_error_literal (gerr, ERROR_QUARK, GENERATE_ERROR (PATCH, TOO_BIG), "Patch version number is too big."); } else { struct_work_copy->patch = conv; diff --git a/src/x2goclient-utils.h b/src/x2goclient-utils.h index 1a100d2..02727a3 100644 --- a/src/x2goclient-utils.h +++ b/src/x2goclient-utils.h @@ -31,6 +31,12 @@ G_BEGIN_DECLS +#define EMPTY(...) +#define DEFER(...) __VA_ARGS__ EMPTY() +#define OBSTRUCT(...) __VA_ARGS__ DEFER(EMPTY)() +#define EXPAND(...) __VA_ARGS__ +#define PASTER(x, y) x ## _ ## y + void x2goclient_clear_strings (gpointer data); long long x2goclient_str_to_int (const gchar *restrict str, _Bool min, long long limit_min, _Bool max, long long limit_max, const gchar **restrict end, _Bool *restrict conv_err, _Bool *restrict min_err, _Bool *restrict max_err); -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/libx2goclient.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository libx2goclient. commit 9033b62931a32db0a2d0af3f1afc2493cb862af7 Author: Mihai Moldovan <ionic@ionic.de> Date: Thu Apr 30 23:59:19 2020 +0200 src/x2goclient-utils.c: replace _Bool* parameters with gboolean* for gobject-introspection only. stdbool, also called _Bool, is a standard type as of C99, but for some reason inexpressible in GIRepository format, c.f., https://gitlab.gnome.org/GNOME/gobject-introspection/-/merge_requests/24 . Older versions of gobject-introspection mapped _Bool to gboolean, but as of the previously mentioned PR, this is not the case any longer. The PR that got merged in the end is https://gitlab.gnome.org/GNOME/gobject-introspection/-/merge_requests/45 , which removed this mapping, but at the same time also added a new one from _Bool to a basic type. This may sound weird at first, but has emerged out of the situation that they wanted to retain compatibility with _Bool in general. What this leads to can be seen here: while _Bool-type function parameters will work fine with gobject-introspection, derived types such as _Bool* will generate warnings. We can override the type to gboolean* in such cases, because function parameters are typically widened and not narrowed, so a wider type should work equally fine - both on big endian and little endian platforms. Additionally, this is a pointer, and all pointers are fixed-sized. However, care must be taken when actually reading from or writing to this location, as different sizes and endian values might lead to strange effects. --- src/x2goclient-utils.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/x2goclient-utils.c b/src/x2goclient-utils.c index 882e43e..8370360 100644 --- a/src/x2goclient-utils.c +++ b/src/x2goclient-utils.c @@ -44,11 +44,15 @@ void x2goclient_clear_strings (gpointer data) { * @limit_max: (in): the maximum limit to check for * @end: (out) (optional) (nullable): pointer to final string after the scanned * value - * @conv_err: (out) (not nullable): will be set to true on conversion errors - * @min_err: (out) (not nullable): will be set to true if value falls short of - * minimum limit and on underflows - * @max_err: (out) (not nullable): will be set to true if value exceeds maximum - * limit and on overflows + * @conv_err: (out) (not nullable) (type gboolean*): will be set to true on + * conversion errors + * @min_err: (out) (not nullable) (type gboolean*): will be set to true if + * value falls short of + * minimum limit and on + * underflows + * @max_err: (out) (not nullable) (type gboolean*): will be set to true if + * value exceeds maximum limit + * and on overflows * * Takes a string and converts it into a #long long integer. * -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/libx2goclient.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository libx2goclient. commit cd67ff2a0d392caec38a66723df1ee070861e220 Author: Mihai Moldovan <ionic@ionic.de> Date: Wed May 13 16:29:42 2020 +0200 misc: copyright date update. --- debian/copyright | 19 ++++++++++--------- src/test/sshtest.c | 4 ++-- src/x2goclient-agent-start-kdrive.c | 4 ++-- src/x2goclient-agent-start-kdrive.h | 4 ++-- src/x2goclient-agent-start-nx.c | 4 ++-- src/x2goclient-agent-start-nx.h | 4 ++-- src/x2goclient-network-ssh.c | 4 ++-- src/x2goclient-network-ssh.h | 4 ++-- src/x2goclient-network.c | 4 ++-- src/x2goclient-network.h | 4 ++-- src/x2goclient-object.c | 4 ++-- src/x2goclient-object.h | 4 ++-- src/x2goclient-openssh-version.c | 2 +- src/x2goclient-openssh-version.h | 2 +- src/x2goclient-proxy-start-nx.c | 4 ++-- src/x2goclient-proxy-start-nx.h | 4 ++-- src/x2goclient-renderer-start-kdrive.c | 4 ++-- src/x2goclient-renderer-start-kdrive.h | 4 ++-- src/x2goclient-session-resume.c | 4 ++-- src/x2goclient-session-resume.h | 4 ++-- src/x2goclient-session-runcommand.c | 4 ++-- src/x2goclient-session-runcommand.h | 4 ++-- src/x2goclient-session-suspend.c | 4 ++-- src/x2goclient-session-suspend.h | 4 ++-- src/x2goclient-session-terminate.c | 4 ++-- src/x2goclient-session-terminate.h | 4 ++-- src/x2goclient-utils.c | 4 ++-- src/x2goclient-utils.h | 4 ++-- src/x2goclient.h | 4 ++-- update-po.sh | 4 ++-- update-pot.sh | 4 ++-- 31 files changed, 68 insertions(+), 67 deletions(-) diff --git a/debian/copyright b/debian/copyright index 65474d6..aedaa07 100644 --- a/debian/copyright +++ b/debian/copyright @@ -12,8 +12,8 @@ Files: ChangeLog po/POTFILES.in src/Makefile.am src/x2goclient.pc.in -Copyright: 2019, Mike Gabriel <mike.gabriel@das-netzwerkteam.de> - 2019, Mihai Moldovan <ionic@ionic.de> +Copyright: 2019-2020, Mike Gabriel <mike.gabriel@das-netzwerkteam.de> + 2019-2020, Mihai Moldovan <ionic@ionic.de> License: GPL-2+ Comment: Assuming license as found in COPYING file. @@ -39,13 +39,14 @@ Files: src/x2goclient-agent-start-kdrive.c src/x2goclient-session-suspend.h src/x2goclient-session-terminate.c src/x2goclient-session-terminate.h -Copyright: 2019, Mike Gabriel <mike.gabriel@das-netzwerkteam.de> - 2019, Mihai Moldovan <ionic@ionic.de> +Copyright: 2019-2020, Mike Gabriel <mike.gabriel@das-netzwerkteam.de> + 2019-2020, Mihai Moldovan <ionic@ionic.de> License: GPL-2+ Files: update-po.sh update-pot.sh -Copyright: 2017, Mike Gabriel <mike.gabriel@das-netzwerkteam.de> +Copyright: 2017-2020, Mike Gabriel <mike.gabriel@das-netzwerkteam.de> + 2019-2020, Mihai Moldovan <ionic@ionic.de> License: GPL-3 Files: po/libx2goclient.pot @@ -166,16 +167,16 @@ Files: po/libx2goclient.pot po/zh_CN.po po/zh_HK.po po/zh_TW.po -Copyright: 2019, Mike Gabriel <mike.gabriel@das-netzwerkteam.de> - 2019, Mihai Moldovan <ionic@ionic.de> +Copyright: 2019-2020, Mike Gabriel <mike.gabriel@das-netzwerkteam.de> + 2019-2020, Mihai Moldovan <ionic@ionic.de> License: GPL-2+ Comment: Using same license and copyright holdership as given for the libx2goclient shared library. Files: debian/* -Copyright: 2019, Mike Gabriel <mike.gabriel@das-netzwerkteam.de> - 2019, Mihai Moldovan <ionic@ionic.de> +Copyright: 2019-2020, Mike Gabriel <mike.gabriel@das-netzwerkteam.de> + 2019-2020, Mihai Moldovan <ionic@ionic.de> License: GPL-2+ or GPL-3 License: GPL-2+ diff --git a/src/test/sshtest.c b/src/test/sshtest.c index 1c9e6dd..67856ba 100644 --- a/src/test/sshtest.c +++ b/src/test/sshtest.c @@ -2,8 +2,8 @@ /* sshtest.c - Testing application for X2Go Client SSH network handling - Copyright (C) 2019 Mike Gabriel - Copyright (C) 2019 Mihai Moldovan + Copyright (C) 2019-2020 Mike Gabriel + Copyright (C) 2019-2020 Mihai Moldovan All rights reserved. The libx2goclient library is free software; you can redistribute it and/or diff --git a/src/x2goclient-agent-start-kdrive.c b/src/x2goclient-agent-start-kdrive.c index 96d34b4..034b021 100644 --- a/src/x2goclient-agent-start-kdrive.c +++ b/src/x2goclient-agent-start-kdrive.c @@ -2,8 +2,8 @@ /* x2goclient-agent-start-kdrive.c - Start server-side X2Go Session (kdrive Xserver agent backend) - Copyright (C) 2019 Mike Gabriel - Copyright (C) 2019 Mihai Moldovan + Copyright (C) 2019-2020 Mike Gabriel + Copyright (C) 2019-2020 Mihai Moldovan All rights reserved. The libx2goclient library is free software; you can redistribute it and/or diff --git a/src/x2goclient-agent-start-kdrive.h b/src/x2goclient-agent-start-kdrive.h index f1c6442..132dd88 100644 --- a/src/x2goclient-agent-start-kdrive.h +++ b/src/x2goclient-agent-start-kdrive.h @@ -2,8 +2,8 @@ /* x2goclient-agent-start-kdrive.h - Start server-side X2Go Session (kdrive Xserver agent backend) - Copyright (C) 2019 Mike Gabriel - Copyright (C) 2019 Mihai Moldovan + Copyright (C) 2019-2020 Mike Gabriel + Copyright (C) 2019-2020 Mihai Moldovan All rights reserved. The libx2goclient library is free software; you can redistribute it and/or diff --git a/src/x2goclient-agent-start-nx.c b/src/x2goclient-agent-start-nx.c index 9b37ae2..0daace2 100644 --- a/src/x2goclient-agent-start-nx.c +++ b/src/x2goclient-agent-start-nx.c @@ -2,8 +2,8 @@ /* x2goclient-agent-start-nx.c - Start server-side X2Go Session (NX Xserver agent backend aka x2goagent) - Copyright (C) 2019 Mike Gabriel - Copyright (C) 2019 Mihai Moldovan + Copyright (C) 2019-2020 Mike Gabriel + Copyright (C) 2019-2020 Mihai Moldovan All rights reserved. The libx2goclient library is free software; you can redistribute it and/or diff --git a/src/x2goclient-agent-start-nx.h b/src/x2goclient-agent-start-nx.h index 1f7b33f..463cd39 100644 --- a/src/x2goclient-agent-start-nx.h +++ b/src/x2goclient-agent-start-nx.h @@ -2,8 +2,8 @@ /* x2goclient-agent-start-nx.h - Start server-side X2Go Session (NX Xserver agent backend aka x2goagent) - Copyright (C) 2019 Mike Gabriel - Copyright (C) 2019 Mihai Moldovan + Copyright (C) 2019-2020 Mike Gabriel + Copyright (C) 2019-2020 Mihai Moldovan All rights reserved. The libx2goclient library is free software; you can redistribute it and/or diff --git a/src/x2goclient-network-ssh.c b/src/x2goclient-network-ssh.c index 9fc110a..c0ae124 100644 --- a/src/x2goclient-network-ssh.c +++ b/src/x2goclient-network-ssh.c @@ -2,8 +2,8 @@ /* x2goclient-network.c - X2Go Client SSH network handling - Copyright (C) 2019 Mike Gabriel - Copyright (C) 2019 Mihai Moldovan + Copyright (C) 2019-2020 Mike Gabriel + Copyright (C) 2019-2020 Mihai Moldovan All rights reserved. The libx2goclient library is free software; you can redistribute it and/or diff --git a/src/x2goclient-network-ssh.h b/src/x2goclient-network-ssh.h index bfa1fdf..ed5b097 100644 --- a/src/x2goclient-network-ssh.h +++ b/src/x2goclient-network-ssh.h @@ -2,8 +2,8 @@ /* x2goclient-network-ssh.h - X2Go Client SSH network handling - Copyright (C) 2019 Mike Gabriel - Copyright (C) 2019 Mihai Moldovan + Copyright (C) 2019-2020 Mike Gabriel + Copyright (C) 2019-2020 Mihai Moldovan All rights reserved. The libx2goclient library is free software; you can redistribute it and/or diff --git a/src/x2goclient-network.c b/src/x2goclient-network.c index 667e99a..ce68357 100644 --- a/src/x2goclient-network.c +++ b/src/x2goclient-network.c @@ -2,8 +2,8 @@ /* x2goclient-network.c - X2Go Client high-level network handling - Copyright (C) 2019 Mike Gabriel - Copyright (C) 2019 Mihai Moldovan + Copyright (C) 2019-2020 Mike Gabriel + Copyright (C) 2019-2020 Mihai Moldovan All rights reserved. The libx2goclient library is free software; you can redistribute it and/or diff --git a/src/x2goclient-network.h b/src/x2goclient-network.h index 9f2c0be..1d7c9e2 100644 --- a/src/x2goclient-network.h +++ b/src/x2goclient-network.h @@ -2,8 +2,8 @@ /* x2goclient-network.h - X2Go Client high-level network handling - Copyright (C) 2019 Mike Gabriel - Copyright (C) 2019 Mihai Moldovan + Copyright (C) 2019-2020 Mike Gabriel + Copyright (C) 2019-2020 Mihai Moldovan All rights reserved. The libx2goclient library is free software; you can redistribute it and/or diff --git a/src/x2goclient-object.c b/src/x2goclient-object.c index ce538b4..6cf0305 100644 --- a/src/x2goclient-object.c +++ b/src/x2goclient-object.c @@ -2,8 +2,8 @@ /* x2goclient-object.c - X2Go Client session object definition / initialization - Copyright (C) 2019 Mike Gabriel - Copyright (C) 2019 Mihai Moldovan + Copyright (C) 2019-2020 Mike Gabriel + Copyright (C) 2019-2020 Mihai Moldovan All rights reserved. The libx2goclient library is free software; you can redistribute it and/or diff --git a/src/x2goclient-object.h b/src/x2goclient-object.h index 2c3db7a..a0f6e6b 100644 --- a/src/x2goclient-object.h +++ b/src/x2goclient-object.h @@ -2,8 +2,8 @@ /* x2goclient-object.h - X2Go Client session object definition / initialization - Copyright (C) 2019 Mike Gabriel - Copyright (C) 2019 Mihai Moldovan + Copyright (C) 2019-2020 Mike Gabriel + Copyright (C) 2019-2020 Mihai Moldovan All rights reserved. The libx2goclient library is free software; you can redistribute it and/or diff --git a/src/x2goclient-openssh-version.c b/src/x2goclient-openssh-version.c index 5258fce..9b678ac 100644 --- a/src/x2goclient-openssh-version.c +++ b/src/x2goclient-openssh-version.c @@ -2,7 +2,7 @@ /* x2goclient-openssh-version.c - Simple OpenSSH Glib Boxed wrapper implementation - Copyright (C) 2019 Mike Gabriel + Copyright (C) 2019-2020 Mike Gabriel Copyright (C) 2019-2020 Mihai Moldovan All rights reserved. diff --git a/src/x2goclient-openssh-version.h b/src/x2goclient-openssh-version.h index 0226ea2..69a45fd 100644 --- a/src/x2goclient-openssh-version.h +++ b/src/x2goclient-openssh-version.h @@ -2,7 +2,7 @@ /* x2goclient-openssh-version.h - Simple OpenSSH version struct and Glib Boxed wrapper - Copyright (C) 2019 Mike Gabriel + Copyright (C) 2019-2020 Mike Gabriel Copyright (C) 2019-2020 Mihai Moldovan All rights reserved. diff --git a/src/x2goclient-proxy-start-nx.c b/src/x2goclient-proxy-start-nx.c index 0ede788..73a7610 100644 --- a/src/x2goclient-proxy-start-nx.c +++ b/src/x2goclient-proxy-start-nx.c @@ -2,8 +2,8 @@ /* x2goclient-proxy-start-nx.c - Start client-side X2Go Session (NX proxy backend) - Copyright (C) 2019 Mike Gabriel - Copyright (C) 2019 Mihai Moldovan + Copyright (C) 2019-2020 Mike Gabriel + Copyright (C) 2019-2020 Mihai Moldovan All rights reserved. The libx2goclient library is free software; you can redistribute it and/or diff --git a/src/x2goclient-proxy-start-nx.h b/src/x2goclient-proxy-start-nx.h index 08d05d0..553d1eb 100644 --- a/src/x2goclient-proxy-start-nx.h +++ b/src/x2goclient-proxy-start-nx.h @@ -2,8 +2,8 @@ /* x2goclient-proxy-start-nx.h - Start server-side X2Go Session (NX proxy backend) - Copyright (C) 2019 Mike Gabriel - Copyright (C) 2019 Mihai Moldovan + Copyright (C) 2019-2020 Mike Gabriel + Copyright (C) 2019-2020 Mihai Moldovan All rights reserved. The libx2goclient library is free software; you can redistribute it and/or diff --git a/src/x2goclient-renderer-start-kdrive.c b/src/x2goclient-renderer-start-kdrive.c index 0eedcab..1b19696 100644 --- a/src/x2goclient-renderer-start-kdrive.c +++ b/src/x2goclient-renderer-start-kdrive.c @@ -2,8 +2,8 @@ /* x2goclient-renderer-start-kdrive.c - Start client-side X2Go Session (kdrive Xserver rendering backend) - Copyright (C) 2019 Mike Gabriel - Copyright (C) 2019 Mihai Moldovan + Copyright (C) 2019-2020 Mike Gabriel + Copyright (C) 2019-2020 Mihai Moldovan All rights reserved. The libx2goclient library is free software; you can redistribute it and/or diff --git a/src/x2goclient-renderer-start-kdrive.h b/src/x2goclient-renderer-start-kdrive.h index 34db297..9639a39 100644 --- a/src/x2goclient-renderer-start-kdrive.h +++ b/src/x2goclient-renderer-start-kdrive.h @@ -2,8 +2,8 @@ /* x2goclient-renderer-start-kdrive.h - Start client-side X2Go Session (kdrive Xserver rendering backend) - Copyright (C) 2019 Mike Gabriel - Copyright (C) 2019 Mihai Moldovan + Copyright (C) 2019-2020 Mike Gabriel + Copyright (C) 2019-2020 Mihai Moldovan All rights reserved. The libx2goclient library is free software; you can redistribute it and/or diff --git a/src/x2goclient-session-resume.c b/src/x2goclient-session-resume.c index 7994a28..06cc4c8 100644 --- a/src/x2goclient-session-resume.c +++ b/src/x2goclient-session-resume.c @@ -2,8 +2,8 @@ /* x2goclient-session-resume.c - Resume a suspended X2Go Session - Copyright (C) 2019 Mike Gabriel - Copyright (C) 2019 Mihai Moldovan + Copyright (C) 2019-2020 Mike Gabriel + Copyright (C) 2019-2020 Mihai Moldovan All rights reserved. The libx2goclient library is free software; you can redistribute it and/or diff --git a/src/x2goclient-session-resume.h b/src/x2goclient-session-resume.h index 658acea..2da7a34 100644 --- a/src/x2goclient-session-resume.h +++ b/src/x2goclient-session-resume.h @@ -2,8 +2,8 @@ /* x2goclient-session-resume.h - Resume a suspended X2Go Session - Copyright (C) 2019 Mike Gabriel - Copyright (C) 2019 Mihai Moldovan + Copyright (C) 2019-2020 Mike Gabriel + Copyright (C) 2019-2020 Mihai Moldovan All rights reserved. The libx2goclient library is free software; you can redistribute it and/or diff --git a/src/x2goclient-session-runcommand.c b/src/x2goclient-session-runcommand.c index 2b233c3..3903634 100644 --- a/src/x2goclient-session-runcommand.c +++ b/src/x2goclient-session-runcommand.c @@ -2,8 +2,8 @@ /* x2goclient-session-runcommand.c - Launch server-side X(2Go)session or single command - Copyright (C) 2019 Mike Gabriel - Copyright (C) 2019 Mihai Moldovan + Copyright (C) 2019-2020 Mike Gabriel + Copyright (C) 2019-2020 Mihai Moldovan All rights reserved. The libx2goclient library is free software; you can redistribute it and/or diff --git a/src/x2goclient-session-runcommand.h b/src/x2goclient-session-runcommand.h index 4e04e39..4896ff2 100644 --- a/src/x2goclient-session-runcommand.h +++ b/src/x2goclient-session-runcommand.h @@ -2,8 +2,8 @@ /* x2goclient-session-runcommand.h - Launch server-side X(2Go)session or single command - Copyright (C) 2019 Mike Gabriel - Copyright (C) 2019 Mihai Moldovan + Copyright (C) 2019-2020 Mike Gabriel + Copyright (C) 2019-2020 Mihai Moldovan All rights reserved. The libx2goclient library is free software; you can redistribute it and/or diff --git a/src/x2goclient-session-suspend.c b/src/x2goclient-session-suspend.c index 86cc5d2..edb8b14 100644 --- a/src/x2goclient-session-suspend.c +++ b/src/x2goclient-session-suspend.c @@ -2,8 +2,8 @@ /* x2goclient-session-suspend.c - Suspend a running X2Go Sessions - Copyright (C) 2019 Mike Gabriel - Copyright (C) 2019 Mihai Moldovan + Copyright (C) 2019-2020 Mike Gabriel + Copyright (C) 2019-2020 Mihai Moldovan All rights reserved. The libx2goclient library is free software; you can redistribute it and/or diff --git a/src/x2goclient-session-suspend.h b/src/x2goclient-session-suspend.h index a66b5c2..d9ff1f4 100644 --- a/src/x2goclient-session-suspend.h +++ b/src/x2goclient-session-suspend.h @@ -2,8 +2,8 @@ /* x2goclient-session-suspend.h - Suspend a running X2Go Session - Copyright (C) 2019 Mike Gabriel - Copyright (C) 2019 Mihai Moldovan + Copyright (C) 2019-2020 Mike Gabriel + Copyright (C) 2019-2020 Mihai Moldovan All rights reserved. The libx2goclient library is free software; you can redistribute it and/or diff --git a/src/x2goclient-session-terminate.c b/src/x2goclient-session-terminate.c index 67c21d0..a9ee750 100644 --- a/src/x2goclient-session-terminate.c +++ b/src/x2goclient-session-terminate.c @@ -2,8 +2,8 @@ /* x2goclient-session-terminate.c - Terminate a running or suspended X2Go Session - Copyright (C) 2019 Mike Gabriel - Copyright (C) 2019 Mihai Moldovan + Copyright (C) 2019-2020 Mike Gabriel + Copyright (C) 2019-2020 Mihai Moldovan All rights reserved. The libx2goclient library is free software; you can redistribute it and/or diff --git a/src/x2goclient-session-terminate.h b/src/x2goclient-session-terminate.h index a3e7b54..49e15d9 100644 --- a/src/x2goclient-session-terminate.h +++ b/src/x2goclient-session-terminate.h @@ -2,8 +2,8 @@ /* x2goclient-session-terminate.h - Terminate a running or suspended X2Go Session - Copyright (C) 2019 Mike Gabriel - Copyright (C) 2019 Mihai Moldovan + Copyright (C) 2019-2020 Mike Gabriel + Copyright (C) 2019-2020 Mihai Moldovan All rights reserved. The libx2goclient library is free software; you can redistribute it and/or diff --git a/src/x2goclient-utils.c b/src/x2goclient-utils.c index 8370360..aaa4e3c 100644 --- a/src/x2goclient-utils.c +++ b/src/x2goclient-utils.c @@ -2,8 +2,8 @@ /* x2goclient-utils.c - Miscellaneous utilities for X2Go Client - Copyright (C) 2019 Mike Gabriel - Copyright (C) 2019 Mihai Moldovan + Copyright (C) 2019-2020 Mike Gabriel + Copyright (C) 2019-2020 Mihai Moldovan All rights reserved. The libx2goclient library is free software; you can redistribute it and/or diff --git a/src/x2goclient-utils.h b/src/x2goclient-utils.h index 5e90c6a..a556a66 100644 --- a/src/x2goclient-utils.h +++ b/src/x2goclient-utils.h @@ -2,8 +2,8 @@ /* x2goclient-utils.h - Miscellaneous utilities for X2Go Client - Copyright (C) 2019 Mike Gabriel - Copyright (C) 2019 Mihai Moldovan + Copyright (C) 2019-2020 Mike Gabriel + Copyright (C) 2019-2020 Mihai Moldovan All rights reserved. The libx2goclient library is free software; you can redistribute it and/or diff --git a/src/x2goclient.h b/src/x2goclient.h index 604f63f..00ca140 100644 --- a/src/x2goclient.h +++ b/src/x2goclient.h @@ -2,8 +2,8 @@ /* x2goclient.h - X2Go Client (C shared library implementation) - Copyright (C) 2019 Mike Gabriel - Copyright (C) 2019 Mike Mihai Moldovan + Copyright (C) 2019-2020 Mike Gabriel + Copyright (C) 2019-2020 Mike Mihai Moldovan All rights reserved. The libx2goclient library is free software; you can redistribute it and/or diff --git a/update-po.sh b/update-po.sh index 547eb86..7ec6359 100755 --- a/update-po.sh +++ b/update-po.sh @@ -1,7 +1,7 @@ #!/bin/bash -# Copyright (C) 2017 by Mike Gabriel <mike.gabriel@das-netzwerkteam.de> -# Copyright (C) 2019 by Mihai Moldovan <ionic@ionic.de> +# Copyright (C) 2017-2020 by Mike Gabriel <mike.gabriel@das-netzwerkteam.de> +# Copyright (C) 2019-2020 by Mihai Moldovan <ionic@ionic.de> # # This package is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/update-pot.sh b/update-pot.sh index acc3865..b363565 100755 --- a/update-pot.sh +++ b/update-pot.sh @@ -2,8 +2,8 @@ set -x -# Copyright (C) 2017 by Mike Gabriel <mike.gabriel@das-netzwerkteam.de> -# Copyright (C) 2019 by Mihai Moldovan <ionic@ionic.de> +# Copyright (C) 2017-2020 by Mike Gabriel <mike.gabriel@das-netzwerkteam.de> +# Copyright (C) 2019-2020 by Mihai Moldovan <ionic@ionic.de> # # This package is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/libx2goclient.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository libx2goclient. commit da42a78369a92db90f7652219545bf777507d721 Author: Mihai Moldovan <ionic@ionic.de> Date: Wed May 13 15:48:28 2020 +0200 src/x2goclient-network-ssh.c: add openssh-version property to X2GoClientNetworkSSH. Skeleton only so far, fetching the actual version has to be done in other places. Reason follows. --- src/x2goclient-network-ssh.c | 61 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) diff --git a/src/x2goclient-network-ssh.c b/src/x2goclient-network-ssh.c index 0f72712..9fc110a 100644 --- a/src/x2goclient-network-ssh.c +++ b/src/x2goclient-network-ssh.c @@ -46,6 +46,7 @@ #include "x2goclient.h" #include "x2goclient-network-ssh.h" #include "x2goclient-utils.h" +#include "x2goclient-openssh-version.h" struct _X2GoClientNetworkOptionsSSH { @@ -90,6 +91,9 @@ typedef struct sockaddr_ho_ { struct _X2GoClientNetworkSSH { X2GoClientNetwork parent_instance; + /* Properties. */ + X2GoClientOpenSSHVersion *openssh_version; + char *control_path; GSubprocess *master_conn; }; @@ -97,8 +101,19 @@ struct _X2GoClientNetworkSSH { G_DEFINE_TYPE (X2GoClientNetworkSSH, x2goclient_network_ssh, X2GOCLIENT_TYPE_NETWORK); +/* See src/x2goclient-network.c regarding abbreviations. */ +enum { + X2GO_NET_SSH_PROP_OPENSSH_VERSION = 1, + X2GO_NET_SSH_N_PROPERTIES +}; + +static GParamSpec *net_ssh_obj_properties[X2GO_NET_SSH_N_PROPERTIES] = { NULL, }; + + static void x2goclient_network_ssh_dispose (GObject *object); static void x2goclient_network_ssh_finalize (GObject *object); +static void x2goclient_network_ssh_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *param_spec); +static void x2goclient_network_ssh_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *param_spec); static GSocketAddress* x2goclient_network_ssh_parse_sockspec (X2GoClientNetwork *parent, const GString *sockspec); static gboolean x2goclient_network_ssh_parent_connect (X2GoClientNetwork *parent, GError **gerr); static gboolean x2goclient_network_ssh_kill_subprocesses (X2GoClientNetworkSSH *self); @@ -110,6 +125,17 @@ static void x2goclient_network_ssh_class_init (X2GoClientNetworkSSHClass *klass) object_class->dispose = &x2goclient_network_ssh_dispose; object_class->dispose = &x2goclient_network_ssh_finalize; + object_class->set_property = &x2goclient_network_ssh_set_property; + object_class->get_property = &x2goclient_network_ssh_get_property; + + net_ssh_obj_properties[X2GO_NET_SSH_PROP_OPENSSH_VERSION] = g_param_spec_boxed ("openssh-version", _("Parsed OpenSSH version number"), + _("The OpenSSH client version number, parsed in a custom " + "structure."), + X2GOCLIENT_TYPE_OPENSSH_VERSION, + G_PARAM_WRITABLE); + + g_object_class_install_properties (object_class, X2GO_NET_SSH_N_PROPERTIES, net_ssh_obj_properties); + X2GoClientNetworkClass *parent_class = X2GOCLIENT_NETWORK_CLASS (klass); parent_class->connect = &x2goclient_network_ssh_parent_connect; @@ -117,6 +143,9 @@ static void x2goclient_network_ssh_class_init (X2GoClientNetworkSSHClass *klass) } static void x2goclient_network_ssh_init (X2GoClientNetworkSSH *self) { + /* Properties. */ + self->openssh_version = NULL; + self->control_path = NULL; self->master_conn = NULL; } @@ -156,6 +185,11 @@ static void x2goclient_network_ssh_dispose (GObject *object) { static void x2goclient_network_ssh_finalize (GObject *object) { X2GoClientNetworkSSH *self = X2GOCLIENT_NETWORK_SSH (object); + /* Properties. */ + x2goclient_openssh_version_free (self->openssh_version); + self->openssh_version = NULL; + + g_free (self->control_path); self->control_path = NULL; @@ -167,6 +201,33 @@ static void x2goclient_network_ssh_finalize (GObject *object) { } +static void x2goclient_network_ssh_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *param_spec) { + X2GoClientNetworkSSH *self = X2GOCLIENT_NETWORK_SSH (object); + + switch (prop_id) { + case (X2GO_NET_SSH_PROP_OPENSSH_VERSION): + x2goclient_openssh_version_free (self->openssh_version); + self->openssh_version = g_value_dup_boxed (value); + break; + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, param_spec); + break; + } +} + +static void x2goclient_network_ssh_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *param_spec) { + X2GoClientNetworkSSH *self = X2GOCLIENT_NETWORK_SSH (object); + + switch (prop_id) { + case (X2GO_NET_SSH_PROP_OPENSSH_VERSION): + g_value_set_object (value, self->openssh_version); + break; + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, param_spec); + break; + } +} + static GSocketAddress* x2goclient_network_ssh_parse_sockspec_unix_socket (const GString *sockspec) { GSocketAddress *ret = NULL; -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/libx2goclient.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository libx2goclient. commit 43044e2d060244582ff0e2fe712794054badfd6e Author: Mihai Moldovan <ionic@ionic.de> Date: Wed May 13 16:33:51 2020 +0200 misc: update modeline to match style more accurately. --- src/test/sshtest.c | 2 +- src/x2goclient-agent-start-kdrive.c | 2 +- src/x2goclient-agent-start-kdrive.h | 2 +- src/x2goclient-agent-start-nx.c | 2 +- src/x2goclient-agent-start-nx.h | 2 +- src/x2goclient-network-ssh.c | 2 +- src/x2goclient-network-ssh.h | 2 +- src/x2goclient-network.c | 2 +- src/x2goclient-network.h | 2 +- src/x2goclient-object.c | 2 +- src/x2goclient-object.h | 2 +- src/x2goclient-openssh-version.c | 2 +- src/x2goclient-openssh-version.h | 2 +- src/x2goclient-proxy-start-nx.c | 2 +- src/x2goclient-proxy-start-nx.h | 2 +- src/x2goclient-renderer-start-kdrive.c | 2 +- src/x2goclient-renderer-start-kdrive.h | 2 +- src/x2goclient-session-resume.c | 2 +- src/x2goclient-session-resume.h | 2 +- src/x2goclient-session-runcommand.c | 2 +- src/x2goclient-session-runcommand.h | 2 +- src/x2goclient-session-suspend.c | 2 +- src/x2goclient-session-suspend.h | 2 +- src/x2goclient-session-terminate.c | 2 +- src/x2goclient-session-terminate.h | 2 +- src/x2goclient-utils.c | 2 +- src/x2goclient-utils.h | 2 +- src/x2goclient.h | 2 +- 28 files changed, 28 insertions(+), 28 deletions(-) diff --git a/src/test/sshtest.c b/src/test/sshtest.c index 67856ba..770cec7 100644 --- a/src/test/sshtest.c +++ b/src/test/sshtest.c @@ -1,4 +1,4 @@ -/* -*- Mode: C; c-set-style: linux indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ +/* -*- Mode: C; c-set-style: linux indent-tabs-mode: nil; c-basic-offset: 2; tab-width: 8 -*- */ /* sshtest.c - Testing application for X2Go Client SSH network handling diff --git a/src/x2goclient-agent-start-kdrive.c b/src/x2goclient-agent-start-kdrive.c index 034b021..d64d983 100644 --- a/src/x2goclient-agent-start-kdrive.c +++ b/src/x2goclient-agent-start-kdrive.c @@ -1,4 +1,4 @@ -/* -*- Mode: C; c-set-style: linux indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ +/* -*- Mode: C; c-set-style: linux indent-tabs-mode: nil; c-basic-offset: 2; tab-width: 8 -*- */ /* x2goclient-agent-start-kdrive.c - Start server-side X2Go Session (kdrive Xserver agent backend) diff --git a/src/x2goclient-agent-start-kdrive.h b/src/x2goclient-agent-start-kdrive.h index 132dd88..6b841aa 100644 --- a/src/x2goclient-agent-start-kdrive.h +++ b/src/x2goclient-agent-start-kdrive.h @@ -1,4 +1,4 @@ -/* -*- Mode: C; c-set-style: linux indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ +/* -*- Mode: C; c-set-style: linux indent-tabs-mode: nil; c-basic-offset: 2; tab-width: 8 -*- */ /* x2goclient-agent-start-kdrive.h - Start server-side X2Go Session (kdrive Xserver agent backend) diff --git a/src/x2goclient-agent-start-nx.c b/src/x2goclient-agent-start-nx.c index 0daace2..1f7f56c 100644 --- a/src/x2goclient-agent-start-nx.c +++ b/src/x2goclient-agent-start-nx.c @@ -1,4 +1,4 @@ -/* -*- Mode: C; c-set-style: linux indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ +/* -*- Mode: C; c-set-style: linux indent-tabs-mode: nil; c-basic-offset: 2; tab-width: 8 -*- */ /* x2goclient-agent-start-nx.c - Start server-side X2Go Session (NX Xserver agent backend aka x2goagent) diff --git a/src/x2goclient-agent-start-nx.h b/src/x2goclient-agent-start-nx.h index 463cd39..9fb35b8 100644 --- a/src/x2goclient-agent-start-nx.h +++ b/src/x2goclient-agent-start-nx.h @@ -1,4 +1,4 @@ -/* -*- Mode: C; c-set-style: linux indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ +/* -*- Mode: C; c-set-style: linux indent-tabs-mode: nil; c-basic-offset: 2; tab-width: 8 -*- */ /* x2goclient-agent-start-nx.h - Start server-side X2Go Session (NX Xserver agent backend aka x2goagent) diff --git a/src/x2goclient-network-ssh.c b/src/x2goclient-network-ssh.c index c0ae124..175e12f 100644 --- a/src/x2goclient-network-ssh.c +++ b/src/x2goclient-network-ssh.c @@ -1,4 +1,4 @@ -/* -*- Mode: C; c-set-style: linux indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ +/* -*- Mode: C; c-set-style: linux indent-tabs-mode: nil; c-basic-offset: 2; tab-width: 8 -*- */ /* x2goclient-network.c - X2Go Client SSH network handling diff --git a/src/x2goclient-network-ssh.h b/src/x2goclient-network-ssh.h index ed5b097..cd3f99f 100644 --- a/src/x2goclient-network-ssh.h +++ b/src/x2goclient-network-ssh.h @@ -1,4 +1,4 @@ -/* -*- Mode: C; c-set-style: linux indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ +/* -*- Mode: C; c-set-style: linux indent-tabs-mode: nil; c-basic-offset: 2; tab-width: 8 -*- */ /* x2goclient-network-ssh.h - X2Go Client SSH network handling diff --git a/src/x2goclient-network.c b/src/x2goclient-network.c index ce68357..8686ad2 100644 --- a/src/x2goclient-network.c +++ b/src/x2goclient-network.c @@ -1,4 +1,4 @@ -/* -*- Mode: C; c-set-style: linux indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ +/* -*- Mode: C; c-set-style: linux indent-tabs-mode: nil; c-basic-offset: 2; tab-width: 8 -*- */ /* x2goclient-network.c - X2Go Client high-level network handling diff --git a/src/x2goclient-network.h b/src/x2goclient-network.h index 1d7c9e2..71b331c 100644 --- a/src/x2goclient-network.h +++ b/src/x2goclient-network.h @@ -1,4 +1,4 @@ -/* -*- Mode: C; c-set-style: linux indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ +/* -*- Mode: C; c-set-style: linux indent-tabs-mode: nil; c-basic-offset: 2; tab-width: 8 -*- */ /* x2goclient-network.h - X2Go Client high-level network handling diff --git a/src/x2goclient-object.c b/src/x2goclient-object.c index 6cf0305..ccf128b 100644 --- a/src/x2goclient-object.c +++ b/src/x2goclient-object.c @@ -1,4 +1,4 @@ -/* -*- Mode: C; c-set-style: linux indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ +/* -*- Mode: C; c-set-style: linux indent-tabs-mode: nil; c-basic-offset: 2; tab-width: 8 -*- */ /* x2goclient-object.c - X2Go Client session object definition / initialization diff --git a/src/x2goclient-object.h b/src/x2goclient-object.h index a0f6e6b..c63d8ed 100644 --- a/src/x2goclient-object.h +++ b/src/x2goclient-object.h @@ -1,4 +1,4 @@ -/* -*- Mode: C; c-set-style: linux indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ +/* -*- Mode: C; c-set-style: linux indent-tabs-mode: nil; c-basic-offset: 2; tab-width: 8 -*- */ /* x2goclient-object.h - X2Go Client session object definition / initialization diff --git a/src/x2goclient-openssh-version.c b/src/x2goclient-openssh-version.c index 9b678ac..a071938 100644 --- a/src/x2goclient-openssh-version.c +++ b/src/x2goclient-openssh-version.c @@ -1,4 +1,4 @@ -/* -*- Mode: C; c-set-style: linux indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ +/* -*- Mode: C; c-set-style: linux indent-tabs-mode: nil; c-basic-offset: 2; tab-width: 8 -*- */ /* x2goclient-openssh-version.c - Simple OpenSSH Glib Boxed wrapper implementation diff --git a/src/x2goclient-openssh-version.h b/src/x2goclient-openssh-version.h index 69a45fd..47f65b4 100644 --- a/src/x2goclient-openssh-version.h +++ b/src/x2goclient-openssh-version.h @@ -1,4 +1,4 @@ -/* -*- Mode: C; c-set-style: linux indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ +/* -*- Mode: C; c-set-style: linux indent-tabs-mode: nil; c-basic-offset: 2; tab-width: 8 -*- */ /* x2goclient-openssh-version.h - Simple OpenSSH version struct and Glib Boxed wrapper diff --git a/src/x2goclient-proxy-start-nx.c b/src/x2goclient-proxy-start-nx.c index 73a7610..1299373 100644 --- a/src/x2goclient-proxy-start-nx.c +++ b/src/x2goclient-proxy-start-nx.c @@ -1,4 +1,4 @@ -/* -*- Mode: C; c-set-style: linux indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ +/* -*- Mode: C; c-set-style: linux indent-tabs-mode: nil; c-basic-offset: 2; tab-width: 8 -*- */ /* x2goclient-proxy-start-nx.c - Start client-side X2Go Session (NX proxy backend) diff --git a/src/x2goclient-proxy-start-nx.h b/src/x2goclient-proxy-start-nx.h index 553d1eb..095a9c7 100644 --- a/src/x2goclient-proxy-start-nx.h +++ b/src/x2goclient-proxy-start-nx.h @@ -1,4 +1,4 @@ -/* -*- Mode: C; c-set-style: linux indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ +/* -*- Mode: C; c-set-style: linux indent-tabs-mode: nil; c-basic-offset: 2; tab-width: 8 -*- */ /* x2goclient-proxy-start-nx.h - Start server-side X2Go Session (NX proxy backend) diff --git a/src/x2goclient-renderer-start-kdrive.c b/src/x2goclient-renderer-start-kdrive.c index 1b19696..61279ce 100644 --- a/src/x2goclient-renderer-start-kdrive.c +++ b/src/x2goclient-renderer-start-kdrive.c @@ -1,4 +1,4 @@ -/* -*- Mode: C; c-set-style: linux indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ +/* -*- Mode: C; c-set-style: linux indent-tabs-mode: nil; c-basic-offset: 2; tab-width: 8 -*- */ /* x2goclient-renderer-start-kdrive.c - Start client-side X2Go Session (kdrive Xserver rendering backend) diff --git a/src/x2goclient-renderer-start-kdrive.h b/src/x2goclient-renderer-start-kdrive.h index 9639a39..f34180c 100644 --- a/src/x2goclient-renderer-start-kdrive.h +++ b/src/x2goclient-renderer-start-kdrive.h @@ -1,4 +1,4 @@ -/* -*- Mode: C; c-set-style: linux indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ +/* -*- Mode: C; c-set-style: linux indent-tabs-mode: nil; c-basic-offset: 2; tab-width: 8 -*- */ /* x2goclient-renderer-start-kdrive.h - Start client-side X2Go Session (kdrive Xserver rendering backend) diff --git a/src/x2goclient-session-resume.c b/src/x2goclient-session-resume.c index 06cc4c8..95f887c 100644 --- a/src/x2goclient-session-resume.c +++ b/src/x2goclient-session-resume.c @@ -1,4 +1,4 @@ -/* -*- Mode: C; c-set-style: linux indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ +/* -*- Mode: C; c-set-style: linux indent-tabs-mode: nil; c-basic-offset: 2; tab-width: 8 -*- */ /* x2goclient-session-resume.c - Resume a suspended X2Go Session diff --git a/src/x2goclient-session-resume.h b/src/x2goclient-session-resume.h index 2da7a34..aaa0e2d 100644 --- a/src/x2goclient-session-resume.h +++ b/src/x2goclient-session-resume.h @@ -1,4 +1,4 @@ -/* -*- Mode: C; c-set-style: linux indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ +/* -*- Mode: C; c-set-style: linux indent-tabs-mode: nil; c-basic-offset: 2; tab-width: 8 -*- */ /* x2goclient-session-resume.h - Resume a suspended X2Go Session diff --git a/src/x2goclient-session-runcommand.c b/src/x2goclient-session-runcommand.c index 3903634..27b2ffa 100644 --- a/src/x2goclient-session-runcommand.c +++ b/src/x2goclient-session-runcommand.c @@ -1,4 +1,4 @@ -/* -*- Mode: C; c-set-style: linux indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ +/* -*- Mode: C; c-set-style: linux indent-tabs-mode: nil; c-basic-offset: 2; tab-width: 8 -*- */ /* x2goclient-session-runcommand.c - Launch server-side X(2Go)session or single command diff --git a/src/x2goclient-session-runcommand.h b/src/x2goclient-session-runcommand.h index 4896ff2..437e829 100644 --- a/src/x2goclient-session-runcommand.h +++ b/src/x2goclient-session-runcommand.h @@ -1,4 +1,4 @@ -/* -*- Mode: C; c-set-style: linux indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ +/* -*- Mode: C; c-set-style: linux indent-tabs-mode: nil; c-basic-offset: 2; tab-width: 8 -*- */ /* x2goclient-session-runcommand.h - Launch server-side X(2Go)session or single command diff --git a/src/x2goclient-session-suspend.c b/src/x2goclient-session-suspend.c index edb8b14..00c084d 100644 --- a/src/x2goclient-session-suspend.c +++ b/src/x2goclient-session-suspend.c @@ -1,4 +1,4 @@ -/* -*- Mode: C; c-set-style: linux indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ +/* -*- Mode: C; c-set-style: linux indent-tabs-mode: nil; c-basic-offset: 2; tab-width: 8 -*- */ /* x2goclient-session-suspend.c - Suspend a running X2Go Sessions diff --git a/src/x2goclient-session-suspend.h b/src/x2goclient-session-suspend.h index d9ff1f4..02c9998 100644 --- a/src/x2goclient-session-suspend.h +++ b/src/x2goclient-session-suspend.h @@ -1,4 +1,4 @@ -/* -*- Mode: C; c-set-style: linux indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ +/* -*- Mode: C; c-set-style: linux indent-tabs-mode: nil; c-basic-offset: 2; tab-width: 8 -*- */ /* x2goclient-session-suspend.h - Suspend a running X2Go Session diff --git a/src/x2goclient-session-terminate.c b/src/x2goclient-session-terminate.c index a9ee750..846952a 100644 --- a/src/x2goclient-session-terminate.c +++ b/src/x2goclient-session-terminate.c @@ -1,4 +1,4 @@ -/* -*- Mode: C; c-set-style: linux indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ +/* -*- Mode: C; c-set-style: linux indent-tabs-mode: nil; c-basic-offset: 2; tab-width: 8 -*- */ /* x2goclient-session-terminate.c - Terminate a running or suspended X2Go Session diff --git a/src/x2goclient-session-terminate.h b/src/x2goclient-session-terminate.h index 49e15d9..4b4032e 100644 --- a/src/x2goclient-session-terminate.h +++ b/src/x2goclient-session-terminate.h @@ -1,4 +1,4 @@ -/* -*- Mode: C; c-set-style: linux indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ +/* -*- Mode: C; c-set-style: linux indent-tabs-mode: nil; c-basic-offset: 2; tab-width: 8 -*- */ /* x2goclient-session-terminate.h - Terminate a running or suspended X2Go Session diff --git a/src/x2goclient-utils.c b/src/x2goclient-utils.c index aaa4e3c..bc8c358 100644 --- a/src/x2goclient-utils.c +++ b/src/x2goclient-utils.c @@ -1,4 +1,4 @@ -/* -*- Mode: C; c-set-style: linux indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ +/* -*- Mode: C; c-set-style: linux indent-tabs-mode: nil; c-basic-offset: 2; tab-width: 8 -*- */ /* x2goclient-utils.c - Miscellaneous utilities for X2Go Client diff --git a/src/x2goclient-utils.h b/src/x2goclient-utils.h index a556a66..5b94e52 100644 --- a/src/x2goclient-utils.h +++ b/src/x2goclient-utils.h @@ -1,4 +1,4 @@ -/* -*- Mode: C; c-set-style: linux indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ +/* -*- Mode: C; c-set-style: linux indent-tabs-mode: nil; c-basic-offset: 2; tab-width: 8 -*- */ /* x2goclient-utils.h - Miscellaneous utilities for X2Go Client diff --git a/src/x2goclient.h b/src/x2goclient.h index 00ca140..fb2cd51 100644 --- a/src/x2goclient.h +++ b/src/x2goclient.h @@ -1,4 +1,4 @@ -/* -*- Mode: C; c-set-style: linux indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ +/* -*- Mode: C; c-set-style: linux indent-tabs-mode: nil; c-basic-offset: 2; tab-width: 8 -*- */ /* x2goclient.h - X2Go Client (C shared library implementation) -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/libx2goclient.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository libx2goclient. commit 98a195c17153e422df3d382b66e5f2094e5f1ca0 Author: Mihai Moldovan <ionic@ionic.de> Date: Mon Apr 27 23:39:14 2020 +0200 src/x2goclient-utils.c: fix gtk-doc issues (mostly in annotations). --- src/x2goclient-utils.c | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/src/x2goclient-utils.c b/src/x2goclient-utils.c index 39e448a..882e43e 100644 --- a/src/x2goclient-utils.c +++ b/src/x2goclient-utils.c @@ -37,21 +37,18 @@ void x2goclient_clear_strings (gpointer data) { /** * x2goclient_str_to_int: - * @str: (in) (not optional) (not nullable): input string + * @str: (in) (not nullable): input string * @min: (in): true if a minimum limit should be checked for * @limit_min: (in): the minimum limit to check for * @max: (in): true if a maximum limit should be checked for - * @limit_max: (in) the maximum limit to check for + * @limit_max: (in): the maximum limit to check for * @end: (out) (optional) (nullable): pointer to final string after the scanned * value - * @conv_err: (out) (not optional) (not nullable): will be set to true on - * conversion errors - * @min_err: (out) (not optional) (not nullable): will be set to true if value - * falls short of minimum limit - * and on underflows - * @max_err: (out) (not optional) (not nullable): will be set to true if value - * exceeds maximum limit and on - * overflows + * @conv_err: (out) (not nullable): will be set to true on conversion errors + * @min_err: (out) (not nullable): will be set to true if value falls short of + * minimum limit and on underflows + * @max_err: (out) (not nullable): will be set to true if value exceeds maximum + * limit and on overflows * * Takes a string and converts it into a #long long integer. * -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/libx2goclient.git