diff options
author | Daniel Teichmann <daniel.teichmann@das-netzwerkteam.de> | 2022-08-25 02:50:25 +0300 |
---|---|---|
committer | Daniel Teichmann <daniel.teichmann@das-netzwerkteam.de> | 2022-08-25 03:41:12 +0300 |
commit | 5545a4dc4f8ec191370566a47509b8a809b712b9 (patch) | |
tree | bea74409fb6d62b65727c21f5f47cb3b807a52f8 /plugins | |
parent | bdc5921037f2c85ca3da5031b9ab2439cbf60d15 (diff) |
plugins/x2go/x2go_plugin.c: Fix usage of errmsg.
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/x2go/x2go_plugin.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/plugins/x2go/x2go_plugin.c b/plugins/x2go/x2go_plugin.c index a07a17e55..f101ed886 100644 --- a/plugins/x2go/x2go_plugin.c +++ b/plugins/x2go/x2go_plugin.c @@ -1685,7 +1685,7 @@ static gboolean rmplugin_x2go_save_credentials(RemminaFile* remminafile, * * @returns FALSE if auth failed and TRUE on success. */ -static gboolean rmplugin_x2go_get_auth(RemminaProtocolWidget *gp, gchar** errmsg, +static gboolean rmplugin_x2go_get_auth(RemminaProtocolWidget *gp, gchar* errmsg, gchar** default_username, gchar** default_password) { REMMINA_PLUGIN_DEBUG("Function entry."); @@ -1746,7 +1746,7 @@ static gboolean rmplugin_x2go_get_auth(RemminaProtocolWidget *gp, gchar** errmsg save = rm_plugin_service->protocol_plugin_init_get_savepassword(gp); if (save) { if (!rmplugin_x2go_save_credentials(remminafile, s_username, - s_password, (*errmsg))) { + s_password, errmsg)) { return FALSE; } } @@ -1759,7 +1759,7 @@ static gboolean rmplugin_x2go_get_auth(RemminaProtocolWidget *gp, gchar** errmsg g_free(s_password); } } else { - (*errmsg) = g_strdup("Authentication cancelled. Aborting…"); + g_strlcpy(errmsg, _("Authentication cancelled. Aborting…"), 512); return FALSE; } @@ -2192,7 +2192,7 @@ static gboolean rmplugin_x2go_exec_x2go(gchar *host, gint argc = 0; // Sets `username` and `password`. - if (!rmplugin_x2go_get_auth(gp, &errmsg, &username, &password)) { + if (!rmplugin_x2go_get_auth(gp, errmsg, &username, &password)) { return FALSE; } @@ -2876,8 +2876,8 @@ static gboolean rmplugin_x2go_start_session(RemminaProtocolWidget *gp) (gchar*)&errmsg); if (!ret) { - REMMINA_PLUGIN_CRITICAL("%s", _(errmsg)); - rm_plugin_service->protocol_plugin_set_error(gp, "%s", _(errmsg)); + REMMINA_PLUGIN_CRITICAL("%s", errmsg); + rm_plugin_service->protocol_plugin_set_error(gp, "%s", &errmsg); return FALSE; } |